
/* ===== CSS Variables ===== */
:root {
  --clr-primary: #0066ff;
  --clr-accent: #1abc9c;
  --clr-bg-start: #f5f7fa;
  --clr-bg-end: #c3cfe2;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition-fast: 0.25s ease;
}

/* ===== Global Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, var(--clr-bg-start), var(--clr-bg-end));
  color: #000000;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.3); }
::-webkit-scrollbar-thumb { background: var(--clr-primary); border-radius: 4px; }

/* ===== Header ===== */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100px;
  overflow: visible;
  backdrop-filter: blur(12px) saturate(140%);
  background: rgba(255,255,255,0.75);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}
header .logo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--clr-primary);
}
header .logo img {
  height: 250px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* ===== Navigation ===== */
nav ul {
  list-style: none;
  display: flex;
  gap: 1.8rem;
}
nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}
nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--clr-primary);
  transition: width var(--transition-fast);
}
nav a:hover { color: var(--clr-primary); }
nav a:hover::after { width: 100%; }

/* ===== Responsive Nav ===== */
.burger {
  display: none;
  font-size: 1.4rem;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--clr-primary);
}
@media (max-width: 768px) {
  nav {
    position: fixed;
    top: 70px;
    right: -110%;
    width: 70%;
    height: calc(100vh - 70px);
    background: rgba(255,255,255,0.95);
    flex-direction: column;
    padding: 2rem 1.5rem;
    transition: right 0.4s ease;
    box-shadow: -4px 0 12px rgba(0,0,0,0.05);
  }
  nav.open { right: 0; }
  nav ul { flex-direction: column; gap: 1.2rem; }
  .burger { display: block; }
}

/* === Mobile nav dark‑mode === */
@media (max-width: 768px) {
  :root.dark nav {
    /* same opacity + blur‑glass effect as your header in dark: */
    background: rgba(20,20,20,0.8);
    box-shadow: -4px 0 12px rgba(0,0,0,0.6);
  }
}
@media (max-width: 768px) {
  :root.dark .burger {
    color: var(--clr-text);
  }
}


/* ===== Main Content ===== */
main {
  flex: 1 0 auto;
  padding: 140px 2rem 2rem;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

/* ===== Hero Section ===== */
.hero-section {
  text-align: center;
  padding: 100px 20px 50px;
  background: transparent;
}

.hero-content h1 {
  font-size: 52px;
  color: var(--clr-primary);
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-content .lead {
  font-size: 22px;
  color: #444;
  font-weight: 500;
  margin-bottom: 15px;
}

.hero-content .sub {
  font-size: 17px;
  color: #666;
  max-width: 750px;
  margin: 0 auto 40px;
  line-height: 1.6;
}.hero-content .lead {
  font-size: 22px;
  color: #333;
  font-weight: 600;
  margin-bottom: 10px;
}

.hero-content .sub {
  font-size: 17px;
  color: #555;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.65;
}
/* ===== Hero Buttons ===== */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
}

.btn-hero-primary,
.btn-hero-secondary {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Основен бутон */ 
.btn-hero-primary {
  background-color: var(--clr-primary);
  color: white;
}

.btn-hero-primary:hover {
  background-color: var(--clr-accent);
  transform: translateY(-2px);
}

/* Вторичен бутон */
.btn-hero-secondary {
  background-color: #fff;
  color: var(--clr-primary);
  border: 2px solid var(--clr-primary);

}

.btn-hero-secondary:hover {
  background-color: var(--clr-primary);
  color: #fff;
  transform: translateY(-2px);
}

.hero-section p {
  animation: fadeInUp 1s ease-out forwards;
  opacity: 0;
  animation-delay: 0.3s;
}

@keyframes fadeInDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== Бутон "Прочети повече" ===== */
.btn-more {
  display: inline-block;
  margin-top: 20px;
  padding: 8px 20px;
  background-color: var(--clr-primary);
  color: white;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-more:hover {
  background-color: var(--clr-accent);
  transform: translateY(-4px);
}
/* ===== Services Section ===== */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.service-card {
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(14px);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transform-style: preserve-3d;
  transition: transform 0.5s, box-shadow 0.5s;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}
.service-card:nth-child(1)  { animation-delay: 0s; }
.service-card:nth-child(2)  { animation-delay: 0.1s; }
.service-card:nth-child(3)  { animation-delay: 0.2s; }
.service-card:nth-child(4)  { animation-delay: 0.3s; }
.service-card:nth-child(5)  { animation-delay: 0.4s; }
.service-card:nth-child(6)  { animation-delay: 0.5s; }
.service-card:nth-child(7)  { animation-delay: 0.6s; }
.service-card:nth-child(8)  { animation-delay: 0.7s; }
.service-card:nth-child(9)  { animation-delay: 0.8s; }
.service-card:nth-child(10) { animation-delay: 0.9s; }
.service-card:hover {
  transform: translateY(-10px) rotateX(6deg);
  box-shadow: var(--shadow-md);
}
.service-card i {
  font-size: 2.6rem;
  color: var(--clr-accent);
  margin-bottom: 0.8rem;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.1));
  transition: transform 0.6s ease;
}
.service-card:hover i {
  transform: rotate(360deg) scale(1.1);
}
.service-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.service-card p {
  font-size: 1rem;
  color: #555;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.testimonials {
  text-align: center;
  margin: 80px auto;
  padding: 60px 20px;
  max-width: 1300px;
}

.testimonials h2 {
  margin-bottom: 50px;
  color: var(--clr-primary);
  font-size: 32px;
  font-weight: 600;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.testimonial {
  background: rgba(255,255,255,0.6);
  border-radius: var(--radius-lg);
  padding: 30px 25px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.testimonial .stars {
  font-size: 16px;
  color: gold;
}

.testimonial p {
  font-size: 16.5px;
  color: #444;
  font-style: italic;
  line-height: 1.6;
}

/* ===== Footer ===== */
footer {
  margin-top: auto;
    background: hwb(0 22% 78%);

  border-top: 1px solid #e5e5e5;
  text-align: center;
  padding: 2.2rem 1rem 2.8rem;
  color: #555;
  font-size: 0.95rem;
}
footer .social-links {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1rem;
}
footer .social-links a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--clr-primary);
  color: #fff;
  transition: transform var(--transition-fast), background var(--transition-fast);
}
footer .social-links a:hover {
  transform: translateY(-3px);
  background: var(--clr-accent);
}
.elamorai-toast {
  position: fixed;
  bottom: 100px; /* по-нагоре от бутона */
  right: 30px;   /* отдясно, над ElamorAI */
    background: hwb(0 22% 78%);

  color: #333;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 20px;
  max-width: 330px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.4s ease;
  border: 1px solid rgba(0, 102, 255, 0.15);
}

/* === DARK THEME OVERRIDES === */
:root.dark {
  --clr-primary:   #4dabff;
  --clr-accent:    #20c997;
  --clr-bg-start:  #111418;
  --clr-bg-end:    #1f2430;
  --clr-text:      #ffffff;        /* ← all text = white */
  color-scheme:    dark;
}

/* Background + base text colour */
:root.dark body {
  background: linear-gradient(135deg, var(--clr-bg-start), var(--clr-bg-end));
  color:      var(--clr-text);
}

/* Header, nav links, footer */
:root.dark header {
  background: rgba(20,20,20, .8);
}
:root.dark nav a {
  color: var(--clr-text);
}
:root.dark footer {
  background: #121212;
  color:      var(--clr-text);
}

/* === YOUR HERO TEXT & SERVICE DESCRIPTIONS === */
:root.dark .hero-content .lead,
:root.dark .hero-content .sub,
:root.dark .services .service-card p {
  color: var(--clr-text);
}
:root.dark .service-card ul li {
  color: var(--clr-text);
}
:root.dark .testimonial p {
  color: var(--clr-text);
}
:root.dark .portfolio-subtitle {
  color: var(--clr-text);
}




/* -------------------------------------------------- */
/*  Smooth page‑wide colour fade                      */
/* -------------------------------------------------- */
html.theme-transition,
html.theme-transition * {
  will-change: background-color, color, border-color, box-shadow, fill, transform;
  transition-property: background-color, color, border-color, box-shadow, fill, transform;
  transition-duration: 0.7s;
  transition-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1); /* Material‑style ease‑in‑out */
}

/* -------------------------------------------------- */
/*  Toggle button look + icon morph                   */
/* -------------------------------------------------- */
.theme-toggle{
  position: relative;
  width: 42px; height: 42px;
  border: none;
  background: transparent;
  cursor: pointer;
  isolation: isolate;            /* keeps shadows inside */
}

.theme-toggle.theme-toggle--hidden{
  position: absolute !important;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  opacity: 0;
}

.theme-toggle .icon{
  /* both icons occupy the same box */
  position: absolute; inset: 0;
  display: flex; align-items:center; justify-content:center;
  font-size: 1.45rem;
  transition:
    transform .55s cubic-bezier(.68,-0.55,.27,1.55),
    opacity   .25s ease;
  will-change: transform, opacity;
}

/* default (LIGHT) */
.theme-toggle .sun { opacity: 0; transform: rotate(-120deg) scale(.4); }
.theme-toggle .moon{ opacity: 1; transform: rotate(   0deg) scale(1 ); color: var(--clr-primary); }

/* DARK mode overrides */
html.dark .sun { opacity: 1; transform: rotate(  0deg) scale(1 ); color: #f6c243;       }
html.dark .moon{ opacity: 0; transform: rotate( 90deg) scale(.4); }

/* tiny hover lift */
.theme-toggle:hover{ transform: translateY(-2px); }

#elamorai-button {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 60px; height: 60px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 1000;
}
#elamorai-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 2) Full‑screen wrapper & overlay */
#elamorai-wrapper {
  position: fixed; top:0; left:0;
  width:100%; height:100%;
  z-index: 999;
  display: none; /* hidden by default */
}
#elamorai-overlay {
  position: absolute; top:0; left:0;
  width:100%; height:100%;
  background: rgba(0,0,0,0.3);
}

/* 3) Chat box (on top of overlay) */
.chat-box {
  position: absolute;
  bottom: 80px; right: 20px;
  width: 320px; height: 500px;
    background: hwb(0 22% 78%);

  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  display: flex; flex-direction: column;
  overflow: hidden;
  z-index: 1000;
}

.chat-header {
  background: #0066ff; color: #fff;
  padding: 10px;
  display: flex; justify-content: space-between;
  align-items: center;
}
.chat-title { font-weight: bold; }
#chat-close {
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

#elamorai-log {
  flex: 1; padding: 10px;
  overflow-y: auto;
  background: #f5f5f5;
}

/* 4) Chat input as a real form */
.chat-input {
  display: flex; padding: 10px;
  border-top: 1px solid #ddd;
  background: #eee;
}
.chat-input input {
  flex: 1; padding: 8px;
  border: 1px solid #ccc; border-radius: 4px;
}
.chat-input button {
  margin-left: 8px;
  padding: 8px 12px;
  background: #0066ff; color: #fff;
  border: none; border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}
.chat-input button:hover {
  background: #0052cc;
}

/* request-form inputs */
#request-form input {
  width: calc(100% - 12px);
  margin-bottom: 8px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
#request-form button {
  padding: 8px 12px;
  background: #0066ff; color: #fff;
  border: none; border-radius: 4px;
  cursor: pointer;
}

/* === DARK MODE FOR AI‑CHAT ADDON === */
:root.dark #elamorai-button img {
  filter: brightness(0.8) contrast(1.2);
}

:root.dark #elamorai-overlay {
  background: rgba(255,255,255,0.1);
}

:root.dark .chat-box {
  background: #1e1e23;
  color:      var(--clr-text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

:root.dark .chat-header {
  background: #2a2a33;
  color:      #fff;
}

:root.dark #elamorai-log {
  background: #18181c;
  color:      var(--clr-text);
}

:root.dark .chat-input {
  background:    #282830;
  border-top:    1px solid #444;
}

:root.dark .chat-input input {
  background:    #1f1f24;
  color:         var(--clr-text);
  border:        1px solid #555;
}

:root.dark .chat-input button {
  background: var(--clr-primary);
  color:      #fff;
}

:root.dark #request-form {
  background: #282830;
  color:      var(--clr-text);
  padding:    10px;
}

:root.dark #request-form input {
  background:    #1f1f24;
  color:         var(--clr-text);
  border:        1px solid #555;
}

:root.dark #request-form button {
  background: var(--clr-primary);
  color:      #fff;
}

/* === DARK MODE: Contact‐card text === */
:root.dark .contact-card p,
:root.dark .contact-card ul li,
:root.dark .contact-card a {
  color: var(--clr-text);
}



/* ===== Media Tweaksz ===== */
@media (max-width: 480px) {
  .service-card { padding: 2rem 1.5rem; }
  .service-card i { font-size: 2.2rem; }
}
 
footer {
  background: #1a1a1a;
  color: #fff;
  text-align: center;
  padding: 20px 10px;
  font-size: 14px;
}

footer a {
  color: #ffd700;
  text-decoration: underline;
}

footer a:hover {
  text-decoration: none;
}

footer .social-links {
  margin-top: 10px;
}

footer .social-links a {
  margin: 0 8px;
  font-size: 18px;
  color: #fff;
}

footer .social-links a:hover {
  color: #ffd700;
}
/* ===== Cookie Banner ===== */
#cookie-banner {
  position: fixed;
  bottom: 0;    /* stick to the bottom */
  left: 0;
  right: 0;     /* full-width */
  background: rgba(30, 30, 30, 0.92);
  color: #fff;
  text-align: center;
  z-index: 2147483647;
  box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.5);
  padding: 12px 15px;
}

#cookie-banner p {
  font-size: 15px;
  margin-bottom: 12px;
}

#cookie-banner a {
  color: #ffd700;
  text-decoration: underline;
  font-weight: 500;
}

#cookie-banner .cookie-icon {
  font-size: 20px;
  margin-right: 6px;
  vertical-align: middle;
}

#cookie-banner button {
  padding: 10px 20px;
  margin: 5px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

#cookie-accept-all {
  background: #28a745;
  color: #fff;
}

#cookie-necessary {
  background: #444;
  color: #fff;
}
/* ===== Post Content Formatting ===== */
.post-content {
  white-space: pre-line;   /* respect line-breaks in markup */
  line-height: 1.8;        /* a bit more breathing room */
  font-size: 1.1rem;       /* slightly larger for readability */
  color: var(--clr-text);  /* adapts to light/dark automatically */
}

.post-content p {
  margin-bottom: 1.5rem;   /* consistent spacing between paragraphs */
}
/* ===== Blog Image Overflow Fix ===== */
.blog-image {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.service-card.blog-card {
  overflow: hidden;
}
/* ===== Contact Section ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1300px;
  margin: 0 auto;
}
@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.35);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s, box-shadow 0.4s;
}
.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.contact-card i {
  font-size: 2.8rem;
  color: var(--clr-primary);
  margin-bottom: 1rem;
}
.contact-card h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}
.contact-card p,
.contact-card ul {
  line-height: 1.6;
  color: #444;
  margin-bottom: 1rem;
}
.contact-card ul {
  padding-left: 1.2rem;
}
@media (max-width: 768px) {
  .contact-card {
    padding: 1.5rem;
  }
}

.contact-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.contact-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
}
/* ===== Form Container & Elements ===== */
.container {
  max-width: 850px;
  margin: 0 auto;
  background: rgba(255,255,255,0.9);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.container h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: var(--clr-accent);
}

form label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
  font-size: 1rem;
}

form input,
form textarea,
form select {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
}

form input:focus,
form textarea:focus,
form select:focus {
  outline: none;
  border-color: var(--clr-accent);
  box-shadow: 0 0 5px rgba(26, 188, 156, 0.5);
}

textarea {
  resize: vertical;
}

.form-group {
  margin-bottom: 1rem;
}

button {
  background-color: var(--clr-accent);
  color: white;
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 1.5rem;
  font-size: 1rem;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #16a085;
}

/* ===== Checkbox Grid ===== */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.checkbox-grid label {
  background: #f8fdfc;
  border: 2px solid #d9f2ee;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.checkbox-grid label:hover {
  background-color: #e1f7f3;
  border-color: var(--clr-accent);
}

.checkbox-grid input[type="checkbox"] {
  accent-color: var(--clr-accent);
  transform: scale(1.3);
}
/* ===== Portfolio Section ===== */
.portfolio-section {
  padding: 120px 2rem 80px;
  max-width: 1300px;
  margin: 0 auto;
  text-align: center;
}

.portfolio-title {
  font-size: 38px;
  font-weight: 700;
  color: #1a53ff;
  margin-bottom: 10px;
}

.portfolio-subtitle {
  font-size: 18px;
  color: #444;
  margin-bottom: 50px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  justify-items: center;
}

.portfolio-card {
    background: hwb(0 22% 78%);

  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  padding: 30px 20px;
  text-align: center;
  width: 100%;
  max-width: 360px;
  transition: 0.3s;
  cursor: pointer;
  overflow: hidden;
}
.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.project-name {
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 12px;
  transition: color 0.3s;
}
.portfolio-card:hover .project-name {
  color: #1a53ff;
}

.project-thumb {
  opacity: 1;
  max-height: none;
  overflow: visible;
  transition: none;
}
.portfolio-card:hover .project-thumb {
  opacity: 1;
  max-height: 400px;
}
.project-thumb img {
  max-width: 100%;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}
.portfolio-card:hover .project-thumb img {
  transform: scale(1.02);
}

/* ensure thumbs are fully visible on touch/narrow screens */
@media (max-width: 768px), (hover: none) {
  .project-thumb {
    opacity: 1 !important;
    max-height: 400px !important;
  }
}
@media (max-width: 768px) {
  .portfolio-grid {
    gap: 1.8rem;
    padding: 0 10px;
  }
  .portfolio-card {
    max-width: 100%;
  }
  .project-name {
    font-size: 19px;
    font-weight: 700;
  }
}
/* ===== Swiper Gallery ===== */
.swiper-container {
  width: 100%;
  height: 60vh;
  max-height: 600px;
  position: relative;
  margin-bottom: 2rem;
  overflow-x: hidden;
}
@media (max-width: 768px) {
  .swiper-container { height: 40vh; }
}
.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}
.swiper-zoom-container {
  width: 100%;
  height: 100%;
}
.swiper-zoom-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}
.swiper-button-prev,
.swiper-button-next {
  color: #1a53ff;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
}
.swiper-button-prev { left: 1rem; }
.swiper-button-next { right: 1rem; }
.swiper-scrollbar {
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.3);
  z-index: 10;
}
.swiper-scrollbar-drag { background: #1a53ff; }


/* ===== Enhanced Post Wrapper ===== */
.post-content {
  background: hwb(0 52% 47%);
  border-radius: .75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* ===== Plans & Pricing ===== */
.plan-comparison {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.plan {
  flex: 1;
  min-width: 260px;
  border-radius: .75rem;
  padding: 1.5rem;
    background: hwb(0 49% 51%);

}
.plan h3 {
  text-align: center;
  color: #1a53ff;
  margin-top: 0;
  font-size: 1.75rem;
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.plan li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: .75rem;
}
.plan-price {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a53ff;
  margin-top: 1rem;
}

/* ===== Purchase & Back Links ===== */
.purchase-global {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}
.purchase-global span {
  font-weight: 600;
  color: #1a53ff;
}
.back-link {
  display: inline-block;
  text-decoration: none;
  margin-top: 1rem;
}
.back-link:hover {
  text-decoration: underline;
}

/* ===== Static Gallery Overflow ===== */
.static-gallery {
  overflow-x: hidden;
}

/* ===== Button Groups & .btn Utility ===== */
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}
@media (max-width: 576px) {
  .button-group {
    flex-direction: column !important;
    gap: 0.25rem !important;
    margin-top: 1rem !important;
  }
  .button-group .btn {
    margin-bottom: 0.25rem !important;
    padding: 0.5rem 1rem !important;
    width: 100% !important;
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease,
              transform 0.1s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
/* specialized button styles */
.back-btn {
  background-color: #e0e0e0;
  color: #333;
}
.back-btn:hover {
  background-color: #d5d5d5;
}
.inquiry-btn {
  background-color: #1a53ff;
  color: #fff;
}
.inquiry-btn:hover {
  background-color: #1646cc;
}

/* ===== Fullscreen Lightbox ===== */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
}
.lightbox-overlay.show {
  display: flex;
  justify-content: center;
  align-items: center;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  cursor: default;
}
#lightbox-close {
  position: absolute;
  top: 1rem; right: 1rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  user-select: none;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: #fff;
  padding: 0 1rem;
  cursor: pointer;
  user-select: none;
  z-index: 10000;
}
#lightbox-prev { left: 1rem; }
#lightbox-next { right: 1rem; }

/* ===== Modal Dialog ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 10001;
}
.modal-overlay.show {
  display: flex;
}
.modal-content {
  background-color: #000;
  color: #fff;
  border-radius: .75rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}
.modal-content input,
.modal-content textarea {
  background-color: #222;
  color: #fff;
  border: 1px solid #444;
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-content h2 {
  margin-top: 0;
  color: #1a53ff;
}

/* ===== Alerts ===== */
.alert {
  padding: 1rem 1.5rem;
  border-radius: .5rem;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.alert-success {
  background-color: #e6f4ea;
  color: #276749;
}
.alert-danger {
  background-color: #fdecea;
  color: #9b2c2c;
}
/* ===== Animated Gradient Background ===== */
body {
  background-size: 400% 400%;
  animation: gradientBG 12s ease infinite;
}
@keyframes gradientBG {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== Service-Card Enhancements ===== */
.service-card {
  position: relative;            /* for the ::before accent */
  overflow: hidden;
  transition: transform 0.5s, box-shadow 0.5s;
}
.service-card::before {
  content: "";
  position: absolute;
  top: -20%; right: -20%;
  width: 200px; height: 200px;
  background: var(--clr-accent);
  opacity: 0.1;
  border-radius: 50%;
  transform: rotate(45deg);
  transition: transform 0.6s ease;
}
.service-card:hover::before {
  transform: rotate(225deg) scale(1.2);
}

/* Heading underline grow */
.service-card h3 {
  position: relative;
}
.service-card h3::after {
  content: "";
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%);
  width: 30px; height: 3px;
  background: var(--clr-primary);
  transition: width 0.4s;
}
.service-card:hover h3::after {
  width: 60px;
}

/* (Your existing icon-spin and hover-lift remain unchanged) */
/* ===== Disabled Buttons ===== */
button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== Select2 Multiple-Select (Light Mode) ===== */
.select2-container--default .select2-selection--multiple {
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 5px;
}
html.dark .container {
  color: #000 !important;
}
/* Portfolio & услуги */
.portfolio-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2em 1em;
}
.portfolio-title {
  font-size: 2.3em;
  margin-bottom: .3em;
  font-weight: 700;
  color: #0054c7;
}
.portfolio-subtitle {
  font-size: 1.1em;
  color: #666;
  margin-bottom: 1.2em;
}
.portfolio-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}
.portfolio-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 14px #0002;
  padding: 0 0 1em 0;
  width: 330px;
  min-height: 340px;
  transition: .2s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.portfolio-card:hover { box-shadow: 0 8px 32px #0002; transform: translateY(-4px);}
.project-thumb img { width: 100%; height: 160px; object-fit: cover; border-radius: 18px 18px 0 0; background: #f5f5f5;}
.project-name { margin: .7em 0 .2em; font-size: 1.35em; font-weight: 500; text-align: center;}
.btn {
  display:inline-block; padding:7px 18px; border-radius:10px; background:#0054c7; color:#fff; text-decoration:none; font-weight:600; margin-top:.5em; transition:.2s;}
.btn:hover { background: #003d91;}
.cat {color:#444;font-size:0.95em;margin-bottom:0.4em;}
.service-short {font-size:0.98em;color:#222;}
.service-price {margin:.7em 0;font-size:1.07em;}
/* Нежни подобрения за текста и spacing */
body { background:#070a14; color:#e9ecf5; }
.portfolio-title { color:#eaf3ff; }
.portfolio-subtitle { color:#a8b2c3; }

/* Контейнерите от твоя сайт да не пречат на новия grid */
main { min-height:60vh; }

/* =========================
   BLOG PAGE UI OVERRIDES
   (append at END of style.css)
   ========================= */

:root{
  --bg: #0b1220;
  --bg2:#0f1a31;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.88);
  --muted: rgba(255,255,255,.62);
  --title: rgba(255,255,255,.96);
  --accent: #4aa3ff;
  --accent2:#7c5cff;
  --shadow: 0 18px 55px rgba(0,0,0,.42);
  --shadow2: 0 10px 26px rgba(0,0,0,.35);
  --radius: 18px;
  --radius2: 24px;
  --maxw: 1180px;
}

html{ scroll-behavior:smooth; }
body{
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 20% -10%, rgba(74,163,255,.22), transparent 60%),
              radial-gradient(900px 600px at 90% 10%, rgba(124,92,255,.18), transparent 55%),
              linear-gradient(180deg, var(--bg), #070b13 70%);
  color: var(--text);
  min-height: 100vh;
}

/* Make sections not stretch full-width */
main{
  width: 100%;
}

/* =========================
   HERO
   ========================= */
.hero-section{
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 6vw, 86px) 16px 26px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.hero-bg{
  position:absolute;
  inset:-40%;
  background:
    radial-gradient(600px 260px at 20% 35%, rgba(74,163,255,.22), transparent 60%),
    radial-gradient(520px 320px at 78% 30%, rgba(124,92,255,.18), transparent 62%),
    radial-gradient(520px 280px at 55% 75%, rgba(0,255,200,.06), transparent 65%);
  filter: blur(22px);
  opacity: .9;
  pointer-events:none;
}
.hero-content{
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 6px;
}
.hero-content h1{
  margin: 0 0 10px;
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--title);
  text-shadow: 0 18px 70px rgba(0,0,0,.55);
}
.hero-content .lead{
  margin: 0;
  font-size: clamp(15px, 1.55vw, 18px);
  color: var(--muted);
  max-width: 56ch;
}

/* =========================
   THEME TOGGLE (floating, clean)
   ========================= */
.theme-toggle{
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 999;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,16,28,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255,255,255,.85);
  border-radius: 999px;
  padding: 10px 12px;
  box-shadow: var(--shadow2);
  display: inline-flex;
  gap: 10px;
  align-items: center;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.theme-toggle:hover{
  transform: translateY(-1px);
  background: rgba(10,16,28,.75);
  border-color: rgba(255,255,255,.22);
}
.theme-toggle:active{ transform: translateY(0px) scale(.98); }
.theme-toggle .icon{
  font-size: 15px;
  opacity: .85;
}
html:not(.dark) .theme-toggle .sun{ opacity: 1; }
html:not(.dark) .theme-toggle .moon{ opacity: .35; }
html.dark .theme-toggle .moon{ opacity: 1; }
html.dark .theme-toggle .sun{ opacity: .35; }

/* =========================
   POSTS GRID (your section has classes "services blog-posts")
   ========================= */
.services.blog-posts{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 16px 70px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Better responsiveness */
@media (max-width: 1100px){
  .services.blog-posts{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px){
  .services.blog-posts{
    grid-template-columns: 1fr;
    gap: 14px;
    padding-bottom: 46px;
  }
}

/* =========================
   BLOG CARD
   ========================= */
.service-card.blog-card{
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius2);
  padding: 14px;
  box-shadow: 0 18px 55px rgba(0,0,0,.35);
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Subtle glow on hover */
.service-card.blog-card::before{
  content:"";
  position:absolute;
  inset:-60px -40px auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 30% 30%, rgba(74,163,255,.25), transparent 60%);
  filter: blur(10px);
  opacity: .65;
  pointer-events:none;
}
.service-card.blog-card:hover{
  transform: translateY(-3px);
  border-color: rgba(74,163,255,.28);
  box-shadow: 0 26px 70px rgba(0,0,0,.48);
}

/* Image */
.blog-image{
  width: 100%;
  height: 190px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  box-shadow: 0 12px 30px rgba(0,0,0,.30);
  margin-bottom: 12px;
}

/* Title */
.service-card.blog-card h3{
  margin: 2px 2px 8px;
  font-size: 18px;
  line-height: 1.25;
  color: var(--title);
  letter-spacing: -0.01em;
}

/* Date */
.post-meta{
  margin: 0 2px 10px;
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.post-meta::before{
  content:"";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 3px rgba(74,163,255,.12);
}

/* Excerpt */
.service-card.blog-card p{
  margin: 0 2px 14px;
  color: rgba(255,255,255,.70);
  font-size: 14px;
  line-height: 1.55;
}

/* Button */
.btn-more{
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .01em;
  color: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(135deg, rgba(74,163,255,.22), rgba(124,92,255,.18));
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
  box-shadow: 0 10px 22px rgba(0,0,0,.28);
}
.btn-more::after{
  content:"→";
  font-weight: 700;
  opacity: .85;
  transform: translateY(-.5px);
}
.btn-more:hover{
  transform: translateY(-1px);
  border-color: rgba(74,163,255,.35);
  background: linear-gradient(135deg, rgba(74,163,255,.30), rgba(124,92,255,.24));
}
.btn-more:active{ transform: translateY(0px) scale(.99); }

/* No posts message */
.no-posts{
  color: rgba(255,255,255,.72) !important;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  padding: 16px 14px;
  border-radius: 16px;
}

/* =========================
   DARK/LIGHT handling
   You toggle html.dark
   ========================= */

/* Light theme (when NOT .dark) */
html:not(.dark){
  --bg: #f6f8ff;
  --bg2:#eef2ff;
  --card: rgba(0,0,0,.04);
  --card2: rgba(0,0,0,.06);
  --border: rgba(0,0,0,.10);
  --text: rgba(10,14,22,.88);
  --muted: rgba(10,14,22,.58);
  --title: rgba(10,14,22,.96);
  --shadow: 0 18px 55px rgba(10,14,22,.14);
  --shadow2: 0 10px 26px rgba(10,14,22,.12);
}

html:not(.dark) body{
  background: radial-gradient(1200px 700px at 10% -10%, rgba(74,163,255,.18), transparent 55%),
              radial-gradient(900px 600px at 90% 0%, rgba(124,92,255,.14), transparent 55%),
              linear-gradient(180deg, #f8fbff, #f0f4ff 70%);
  color: var(--text);
}

html:not(.dark) .hero-section{
  border-bottom: 1px solid rgba(0,0,0,.06);
}
html:not(.dark) .service-card.blog-card{
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  border-color: rgba(0,0,0,.08);
}
html:not(.dark) .blog-image{
  border-color: rgba(0,0,0,.08);
}
html:not(.dark) .service-card.blog-card p{
  color: rgba(10,14,22,.70);
}
html:not(.dark) .theme-toggle{
  background: rgba(255,255,255,.78);
  color: rgba(10,14,22,.78);
  border-color: rgba(0,0,0,.10);
}

/* Smooth theme transition helper (you already add .theme-transition) */
.theme-transition *{
  transition: background-color .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease;
}

/* Make sure images don't overflow */
img{ max-width:100%; height:auto; }

/* Reduce layout weirdness if some global .services styles exist */
.services.blog-posts > *{
  min-width: 0;
}
