/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0a0a0a;
    --secondary-color: #1a1a1a;
    --tertiary-color: #2a2a2a;
    --accent-color: #d4af37;
    --text-dark: #0a0a0a;
    --text-light: #b0b0b0;
    --text-lighter: #e0e0e0;
    --white: #ffffff;
    --black: #000000;
    --easing: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.4s var(--easing);
    --transition-fast: all 0.3s var(--easing);
    --transition-slow: all 0.5s var(--easing);
    --transition-duration: 0.4s;
}

html {
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-lighter);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--primary-color);
    cursor: default;
}

/* Accessible skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    position: fixed;
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    padding: 0.5rem 0.75rem;
    background: var(--accent-color);
    color: #000;
    border-radius: 6px;
    z-index: 9999;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), #e5c547);
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn,
.filter-btn {
    position: relative;
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.7);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: var(--transition);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-lighter);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-lighter);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-lighter);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-lighter);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-lighter);
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Language switch buttons in nav */
/* ===== Language switch (segmented pill) ===== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.78);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.18s var(--easing), background 0.18s var(--easing), color 0.18s var(--easing), box-shadow 0.18s var(--easing);
  user-select: none;
}

.lang-btn:hover {
  transform: translateY(-1px);
  color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.05);
}

.lang-btn:focus-visible {
  outline: 3px solid rgba(212,175,55,0.18);
  outline-offset: 3px;
}

.lang-btn .lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.06);
}

.lang-btn.is-active,
.lang-btn[aria-pressed="true"] {
  color: #0b0b0b;
  background: linear-gradient(135deg, rgba(212,175,55,0.95), rgba(184,148,31,0.92));
  box-shadow: 0 12px 28px rgba(212,175,55,0.22);
}

.lang-btn.is-active .lang-dot,
.lang-btn[aria-pressed="true"] .lang-dot {
  background: rgba(0,0,0,0.35);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.15);
}

/* Mobile: да не ти “задушава” нав-а */
@media (max-width: 768px) {
  .lang-switch {
    margin-left: auto;
  }
  .lang-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }
}

.lang.active,
.lang[aria-pressed="true"] {
    background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.06));
    color: #ffdca3;
}
.lang:not(.active):hover {
    background: rgba(255,255,255,0.03);
}

/* Mirror styles for .lang-btn used in markup */
.lang-btn {
    background: transparent;
    color: var(--text-lighter);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.lang-btn.is-active,
.lang-btn.active,
.lang-btn[aria-pressed="true"] {
    background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.06));
    color: #ffdca3;
}
.lang-btn:not(.active):hover {
    background: rgba(255,255,255,0.03);
}

/* Improved language pill visuals: add flag glyphs and refined active state */
.lang-switch {
    padding: 0.15rem;
    gap: 0.25rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
}
.lang-btn {
    position: relative;
    padding-left: 2.2rem;
    padding-right: 0.9rem;
    min-width: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.lang-btn::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    line-height: 1;
}
.lang-btn[data-lang="bg"]::before { content: "🇧🇬"; }
.lang-btn[data-lang="en"]::before { content: "🇪🇺"; }
.lang-btn .lang-dot { display: none; }

/* Stronger active appearance: gold pill with dark text */
.lang-btn.is-active,
.lang-btn[aria-pressed="true"] {
    background: linear-gradient(135deg, rgba(212,175,55,0.98), rgba(184,148,31,0.95));
    color: #081018;
    box-shadow: 0 10px 30px rgba(212,175,55,0.18);
    transform: translateY(-2px);
}

.lang-btn:focus-visible {
    outline: 3px solid rgba(212,175,55,0.18);
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .lang-btn { padding-left: 1.6rem; padding-right: 0.6rem; min-width: 48px; }
    .lang-btn::before { left: 8px; font-size: 0.88rem; }
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 100px 20px 60px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
    filter: blur(60px);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 25s ease-in-out infinite reverse;
    filter: blur(60px);
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-50px, -50px) rotate(180deg);
    }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    color: var(--text-lighter);
}

.title-line {
    display: block;
    opacity: 0;
    animation: fadeInUp 0.5s var(--easing) forwards;
}

.title-line:nth-child(1) {
    animation-delay: 0.1s;
}

.title-line:nth-child(2) {
    animation-delay: 0.2s;
}

.title-line:nth-child(3) {
    animation-delay: 0.3s;
}

.highlight {
    color: var(--accent-color);
    position: relative;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
    opacity: 0;
    animation: fadeInUp 0.5s var(--easing) 0.4s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.5s var(--easing) 0.5s forwards;
}

.btn {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: transform var(--transition-duration) var(--easing),
        background var(--transition-duration) var(--easing),
        box-shadow var(--transition-duration) var(--easing),
        color var(--transition-duration) var(--easing),
        border-color var(--transition-duration) var(--easing);
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #b8941f);
    color: var(--black);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left var(--transition-slow) var(--easing);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e5c547, var(--accent-color));
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-lighter);
    border-color: var(--accent-color);
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: var(--black);
    transform: translateY(-2px);
}

/* Project card CTA */
.project-btn {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    background: rgba(212,175,55,0.12);
    color: var(--text-lighter);
    border: 1px solid rgba(212,175,55,0.18);
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s var(--easing), background 0.18s var(--easing);
}
.project-btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(212,175,55,0.22), rgba(212,175,55,0.12));
    color: #fff;
}

/* lighter filter button focus */
.filter-btn:focus,
.project-btn:focus,
.btn:focus {
    outline: 3px solid rgba(212,175,55,0.14);
    outline-offset: 3px;
}

/* HERO SHAPE – по-ясно видима фигура */
.hero-image {
    position: absolute;
    right: -40px;
    top: 55%;
    transform: translateY(-50%);
    width: 420px;
    height: 420px;
    z-index: 1;
    opacity: 0.45;
    /* беше 0.1 – почти невидима */
    pointer-events: none;
}

.geometric-shape {
    width: 100%;
    height: 100%;
    border-radius: 65% 35% 60% 40%;
    background: radial-gradient(circle at 30% 20%,
            rgba(245, 211, 122, 0.55),
            rgba(20, 20, 20, 1) 70%);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8);
    filter: blur(0.3px);
}


@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-lighter);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--text-lighter);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* Section Styles */
/* Scroll reveal само с opacity, без transform,
   за да не пречи на hover/tilt и други ефекти */
section {
    padding: 60px 0;
    position: relative;
}

/* Елементи, които ще се появяват плавно */
.reveal {
    opacity: 0;
    transition: opacity 0.7s var(--easing);
    will-change: opacity;
}

.reveal.is-visible {
    opacity: 1;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Hero трябва винаги да е видим */
/* Hero section should always be visible */
#home {
    opacity: 1 !important;
    transform: none !important;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border-radius: 2px;
}

.section-tag {
    display: inline-block;
    padding: 0.6rem 1.75rem;
    background: rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(10px);
    color: var(--accent-color);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
    transition: var(--transition);
}

.section-tag:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.2);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-lighter);
    margin-bottom: 1.25rem;
    letter-spacing: -1px;
    line-height: 1.1;
    position: relative;
}

.section-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
    position: relative;
}

/* About Section */
.about {
    background: var(--secondary-color);
}


.about-text .lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-lighter);
    margin-bottom: 1.25rem;
    line-height: 1.8;
    letter-spacing: 0.3px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    background: linear-gradient(135deg, var(--accent-color), #e5c547);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-image {
    position: relative;
}

.image-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #d4af37 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.05) 10px,
            rgba(255, 255, 255, 0.05) 20px);
    animation: slide 20s linear infinite;
}

@keyframes slide {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(50px, 50px);
    }
}

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

.placeholder-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

/* Projects Section – по-минималистични карти */
.projects {
    background: var(--primary-color);
    padding: 80px 0;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.65rem 1.8rem;
    background: rgba(30, 30, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-lighter);
    font-weight: 500;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-lighter);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

/* Сменяме подредбата – истинска grid, 3 на ред на десктоп */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

/* Нова визия на картата */
.project-card {
    position: relative;
    border-radius: 22px;
    padding: 1.6rem 1.6rem 1.5rem;
    background: radial-gradient(circle at top left, #171717 0%, #0c0c0c 55%);
    border: 1px solid rgba(212, 175, 55, 0.16);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.35s var(--easing),
        box-shadow 0.35s var(--easing),
        border-color 0.35s var(--easing);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.9);
    border-color: rgba(212, 175, 55, 0.45);
}

/* махаме стария „heavy“ overlay */
.project-image {
    background: transparent;
    border-radius: 0;
    height: auto;
    position: static;
    overflow: visible;
    padding: 0;
}

.project-image::before {
    display: none;
}

/* нулираме старите градиенти */
.project-1,
.project-2,
.project-3,
.project-4,
.project-5,
.project-6 {
    background: none;
}

/* съдържанието вече не е overlay, а нормален layout */
.project-overlay {
    position: static;
    inset: auto;
    padding: 0;
    background: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--text-lighter);
}

/* горен ред – година + локация */
.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    opacity: 0.9;
}

.project-year,
.project-location {
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(10, 10, 10, 0.8);
    font-weight: 500;
}

/* заглавие + подзаглавие */
.project-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-lighter);
}

.project-type {
    display: inline-block;
    margin-top: 0.15rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-color);
}

/* описание – по-кратко и четимо */
.project-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
    margin-top: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* линк – без огромен жълт бутон */
.project-link {
    margin-top: 0.5rem;
    align-self: flex-start;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--accent-color);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.project-link:hover {
    background: var(--accent-color);
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
}



/* Architects Section – по-силна визуализация */
.architects {
    background: radial-gradient(circle at top, rgba(212, 175, 55, 0.06), transparent 55%),
                var(--primary-color);
    padding: 90px 0 80px;
    position: relative;
}

.architects::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 0%, rgba(212, 175, 55, 0.08), transparent 60%);
    opacity: 0.6;
    pointer-events: none;
}

.architects .container {
    position: relative;
    z-index: 1;
}

.architects-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr);
    gap: 2.25rem;
}

/* На по-широки екрани – снимка + инфо една до друга */
@media (min-width: 900px) {
    .architects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.architect-card {
    background: linear-gradient(135deg, rgba(28, 28, 28, 0.95), rgba(10, 10, 10, 0.98));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 26px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.85);
    display: grid;
    grid-template-columns: minmax(260px, 1.05fr) 1.4fr;
    overflow: hidden;
    transition: transform 0.4s var(--easing),
                box-shadow 0.4s var(--easing),
                border-color 0.4s var(--easing);
    transform-origin: center;
}

.architect-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95);
    border-color: rgba(212, 175, 55, 0.55);
}

/* На мобилни – една колона, снимката отгоре */
@media (max-width: 768px) {
    .architect-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }
    
    .architect-image {
        order: 1;
        /* Поставя изображението под текста */
    }
    
    /* Place image below content on mobile */
    .project-figure {
        flex-direction: column-reverse;
    }
    
    /* Increase touch target size for mobile */
    .nav-link {
        padding: 0.5rem 0;
        font-size: 1rem;
    }
    
    .btn {
        min-height: 48px;
        font-size: 1rem;
    }
    
    .filter-btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
}

/* СНИМКА */
.architect-image {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 320px;
    max-height: 420px;
    overflow: hidden;
    border-right: 1px solid rgba(212, 175, 55, 0.18);
    display: flex;
    align-items: stretch;
    justify-content: center;
}

@media (max-width: 768px) {
    .architect-image {
        border-right: none;
        border-bottom: 1px solid rgba(212, 175, 55, 0.18);
        max-height: 360px;
    }
}

.architect-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    filter: brightness(1.08) contrast(1.05) saturate(1.08);
    transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
                filter 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.architect-card:hover .architect-photo {
    transform: scale(1.08);
    filter: brightness(1.12) contrast(1.08) saturate(1.12);
}

/* Placeholder за останалите архитекти без снимка */
.architect-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 0%, rgba(212, 175, 55, 0.25), #111);
    color: var(--text-lighter);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.architect-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent 35%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.4rem 1.7rem;
    opacity: 0;
    transition: opacity 0.35s var(--easing);
    pointer-events: none;
}

.architect-card:hover .architect-overlay {
    opacity: 1;
    pointer-events: auto;
}

.architect-social {
    display: flex;
    gap: 1rem;
    background: rgba(6, 6, 6, 0.82);
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
}

.architect-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s var(--easing),
                background 0.3s var(--easing),
                border-color 0.3s var(--easing),
                box-shadow 0.3s var(--easing);
}

.architect-social a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-lighter);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

.architect-social svg {
    width: 18px;
    height: 18px;
}

/* ТЕКСТОВА ЧАСТ */
.architect-info {
    padding: 2rem 2.2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

@media (max-width: 768px) {
    .architect-info {
        padding: 1.75rem 1.6rem 2rem;
        text-align: center;
    }
}

.architect-name {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-lighter);
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.75rem;
    letter-spacing: -0.3px;
    position: relative;
    display: inline-block;
}

.architect-name::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 72px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    border-radius: 999px;
}

@media (max-width: 768px) {
    .architect-name::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

.architect-role {
    font-size: 0.95rem;
    color: var(--text-lighter);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin: 1.8rem 0 0.75rem;
    display: inline-block;
    padding: 0.35rem 1.1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.architect-bio {
    font-size: 0.98rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.86);
    margin: 1rem 0 1.5rem;
}

.architect-expertise {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(212, 175, 55, 0.18);
}

@media (max-width: 768px) {
    .architect-expertise {
        justify-content: center;
    }
}

.expertise-tag {
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    color: var(--text-lighter);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.expertise-tag:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Services Section */
.services {
    background: var(--secondary-color);
}

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

.service-card {
    padding: 2rem 1.5rem;
    background: rgba(42, 42, 42, 0.6);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-radius: 24px;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(212, 175, 55, 0.15);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    will-change: transform;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left var(--transition-slow) var(--easing);
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--accent-color);
    box-shadow: 0 25px 70px rgba(212, 175, 55, 0.3),
        0 0 0 1px rgba(212, 175, 55, 0.2);
    background: rgba(42, 42, 42, 0.75);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-lighter);
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.3px;
}

.service-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    font-size: 0.95rem;
    font-weight: 400;
}


/* CONTACT – истинско центриране */

.contact-content {
    display: flex;
    justify-content: center;
    /* по хоризонтала */
    align-items: flex-start;
    /* ако искаш и по вертикала */
    margin-top: 3rem;
    gap: 3rem;
}

.contact-info {
    max-width: 480px;
    width: auto;
    /* махаме 100% */
    margin: 0 auto;
    /* център в контейнера */
    text-align: center;
}

/* всеки ред (иконка + текст) да е центриран */
.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    /* център по хоризонтала */
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: rgba(42, 42, 42, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    flex-shrink: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: var(--transition);
}

.info-item:hover .info-icon {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.info-text h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-lighter);
}

.info-text p {
    color: var(--text-light);
    line-height: 1.8;
}

.info-text a {
    color: var(--text-lighter);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.info-text a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Дясна колона – форма */
.contact-form {
    background: rgba(42, 42, 42, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(10px);
    color: var(--text-lighter);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-light);
    opacity: 0.6;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(26, 26, 26, 0.7);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
    text-align: center;
}

/* Responsive – под 968px всичко подредено едно под друго и центрирано */
@media (max-width: 968px) {
    .contact-info {
        align-items: center;
        text-align: center;
    }

    .info-item {
        justify-content: center;
    }
}


@media (max-width: 480px) {
    .logo {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.85rem;
    }
}

/* Ensure elements are visible if observer hasn't triggered yet */
.project-card:not(.fade-in),
.service-card:not(.fade-in) {
    opacity: 1;
    transform: translateY(0);
}

/* за да не се скрива hero-а зад фикснатото меню */
.hero {
    padding-top: 96px;
    /* колкото е висока навигацията */
    position: relative;
    overflow: hidden;
    /* супер важно */
}

.geometric-shape {
    width: 340px;
    height: 340px;
    right: 8%;
    bottom: 18%;
}

.footer-social a {
    width: 28px;
    /* по-малка „кръгла“ зона */
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.footer-social svg {
    width: 16px;
    /* реалният размер на иконката */
    height: 16px;
}

.footer {
    background: #050608;
    padding: 2rem 0 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-logo .logo {
    width: 36px;
    height: 36px;
    border-radius: 0.6rem;
    object-fit: cover;
}

.footer-logo .logo-text {
    font-size: 0.9rem;
    letter-spacing: 0.16em;
}

/* Линковете по средата */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.85rem;
}

.footer-links a {
    opacity: 0.85;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* Иконките вдясно, подравнени и малки */
.footer-social {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-social a {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-social svg {
    width: 100%;
    height: 100%;
}

/* Долния ред */
.footer-bottom {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
}

/* Modal gallery styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
    align-items: center;
    justify-content: center;
}
.modal.open {
    display: flex;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}
.modal-panel {
    position: relative;
    width: min(1100px, 96%);
    max-height: 90vh;
    background: linear-gradient(180deg, #0b0b0b, #050505);
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8);
    padding: 1rem;
    z-index: 2;
    overflow: hidden;
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-lighter);
    font-size: 1.6rem;
    cursor: pointer;
}
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.modal-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.modal-prev, .modal-next {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-lighter);
    width: 48px;
    height: 48px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.6rem;
}
.modal-image-wrap {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.7);
    transition: filter 0.25s ease, transform 0.2s ease;
}
.modal-caption {
    color: var(--text-light);
    font-size: 0.95rem;
}
.modal-controls {
    display: flex;
    justify-content: flex-end;
}
/* When language switch is placed in modal, align it with the toggle */
.modal-controls { gap: 10px; align-items: center; }
.modal-controls .lang-switch { display: inline-flex; gap: 8px; align-items: center; }
.modal-controls .lang-btn { padding-left: 2rem; padding-right: 0.9rem; min-width: 64px; border-radius: 999px; font-weight: 800; }
.modal-controls .lang-btn::before { left: 14px; }
.modal-controls .lang-switch .lang-btn.is-active,
.modal-controls .lang-switch .lang-btn[aria-pressed="true"] {
    background: linear-gradient(135deg, rgba(212,175,55,0.98), rgba(184,148,31,0.95));
    color: #081018;
    box-shadow: 0 10px 30px rgba(212,175,55,0.18);
}

/* Single modal language toggle button (replaces two separate buttons) */
.lang-toggle {
    appearance: none;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-lighter);
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    min-width: 64px;
    padding-left: 2rem;
    font-weight: 800;
}
.lang-toggle:focus-visible { outline: 3px solid rgba(212,175,55,0.16); outline-offset: 3px; }

/* When lang toggle shows EN (meaning BG is active), style it like the dark variant */
.lang-toggle[data-mode="shows-en"], .lang-toggle[aria-pressed="false"] {
    background: rgba(10,10,10,0.95);
    color: #fff;
    border-color: rgba(255,255,255,0.04);
}

/* When lang toggle shows BG (meaning EN is active) */
.lang-toggle[data-mode="shows-bg"], .lang-toggle[aria-pressed="true"] {
    background: #ffffff;
    color: #000000;
    border-color: rgba(0,0,0,0.08);
}

/* Navbar language toggle visuals (monochrome flag icon + label). */
.lang-toggle-navbar {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-lighter);
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}
.lang-toggle-navbar::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 14px;
    background-size: contain;
    background-repeat: no-repeat;
    filter: grayscale(100%) contrast(80%);
}
/* show EN flag (EU star) when current site lang is BG (so button shows EN) */
.lang-toggle-navbar[data-mode="shows-en"]::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect width='24' height='24' fill='none'/><g fill='currentColor'><circle cx='12' cy='12' r='10'/><g transform='translate(12,12)'><path d='M-6,0 L-3.5,1 L-4.2,3.2 L-1.5,1.2 L0,4 L1.5,1.2 L4.2,3.2 L3.5,1 L6,0 L3.5,-1 L4.2,-3.2 L1.5,-1.2 L0,-4 L-1.5,-1.2 L-4.2,-3.2 L-3.5,-1 Z'/></g></g></svg>");
}
/* show BG flag (three stripes) when current site lang is EN (so button shows BG) */
.lang-toggle-navbar[data-mode="shows-bg"]::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 24'><rect width='36' height='24' fill='none'/><g fill='currentColor'><rect width='36' height='8' y='0'/><rect width='36' height='8' y='8' opacity='0.6'/><rect width='36' height='8' y='16' opacity='0.3'/></g></svg>");
}

/* position the navbar toggle to the right */
.nav-container { position: relative; }
/* Place the navbar language toggle in the normal flex flow so it stays aligned with the nav */
.lang-toggle-navbar {
    position: relative;
    margin-left: 12px;
    order: 2;
    z-index: 1100;
    align-self: center;
}

@media (max-width: 900px) {
    .lang-toggle-navbar { margin-left: 8px; order: 2; }
}
.toggle-daynight {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-lighter);
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
}

/* Explicit visual mapping by shown label:
   - when the button shows "Day" it should be white (high contrast)
   - when the button shows "Night" it should be dark
   These classes are toggled by script.js as `shows-day` / `shows-night`. */
.toggle-daynight.shows-day {
    background: #ffffff;
    color: #000000;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.toggle-daynight.shows-night {
    background: rgba(10,10,10,0.95);
    color: #ffffff;
    border-color: rgba(255,255,255,0.04);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Visual states: when aria-pressed="false" we treat it as Day (active) and make it white */
.toggle-daynight {
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

/* Day button active: white background, dark text */
.btn-day[aria-pressed="true"] {
    background: #ffffff;
    color: #000000;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Day button inactive: match modal dark style */
.btn-day[aria-pressed="false"] {
    background: rgba(255,255,255,0.03);
    color: var(--text-lighter);
    border-color: rgba(255,255,255,0.06);
}

/* Night button active: dark style (contrast for night) */
.btn-night[aria-pressed="true"] {
    background: rgba(10,10,10,0.95);
    color: #ffffff;
    border-color: rgba(255,255,255,0.04);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Night button inactive */
.btn-night[aria-pressed="false"] {
    background: rgba(255,255,255,0.03);
    color: var(--text-lighter);
}

/* When modal itself is set to night, prefer night-state visuals */
.modal-panel.night .btn-night[aria-pressed="true"] {
    background: rgba(8,8,12,0.98);
}

/* Single toggle: Day active -> white; Night active -> dark */
.toggle-daynight[aria-pressed="false"] {
    background: #ffffff;
    color: #000000;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.toggle-daynight[aria-pressed="true"] {
    background: rgba(10,10,10,0.95);
    color: #ffffff;
    border-color: rgba(255,255,255,0.04);
}

/* Night mode for modal: darker background + image filter */
.modal-panel.night {
    background: linear-gradient(180deg, #06060a, #000);
}
.modal-panel.night .modal-image {
    filter: brightness(0.65) contrast(1.05) saturate(0.85);
}

/* Stronger overrides to ensure visual mapping follows the shown label.
   These selectors are placed after the `[aria-pressed]` rules so they take precedence. */
.modal-panel .toggle-daynight.shows-day {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12) !important;
}
.modal-panel .toggle-daynight.shows-night {
    background: rgba(10,10,10,0.95) !important;
    color: #ffffff !important;
    border-color: rgba(255,255,255,0.04) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
}

@media (max-width: 768px) {
    .modal-image {
        max-height: 55vh;
    }
    .modal-prev, .modal-next {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* Responsive – на телефон всичко подредено едно под друго */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .footer-links {
        gap: 0.75rem;
    }
    
    /* CONTACT FORM */
    .contact-content {
        flex-direction: column;
        align-items: center;
        margin-top: 2.5rem;
        padding: 0 1.25rem;
        gap: 2rem;
    }
    
    .contact-form {
        width: 100%;
        max-width: 420px;
        padding: 1.5rem;
    }
}

/* Иконата да е отгоре, текстът отдолу */
.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Текстът да е центриран под иконата */
.info-text {
    text-align: left;
}

/* About layout – DESKTOP (по подразбиране) */
.about-content {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    /* текст | картинка вдясно */
    gap: 3rem;
    align-items: center;
}

/* Mobile layout for About section */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        order: 1;
        /* Поставя изображението под текста */
    }
    
    .image-placeholder {
        height: 300px;
    }
    
    .placeholder-content {
        font-size: 1.2rem;
    }
}

/* ======================
   MOBILE  (max-width: 768px)
   ====================== */
@media (max-width: 768px) {

    /* NAVBAR */
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    /* About Section Typography */
    .about-text .lead {
        font-size: 1.1rem;
        line-height: 1.7;
    }
    
    .about-text p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .stat-number {
        font-size: 2.8rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }
    
    .section-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    /* Increase touch target size for mobile */
    .nav-link {
        padding: 0.5rem 0;
        font-size: 1rem;
    }
    
    .btn {
        min-height: 48px;
        font-size: 1rem;
    }
    
    .filter-btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 64px;
        /* височината на navbar-а */
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem 1.5rem 1.5rem;
        background: rgba(5, 5, 7, 0.97);
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 0.25rem 0;
    }

    /* HERO – текстът малко по-надолу, топката под бутоните */
    .hero {
        min-height: auto;
        padding: 110px 1.25rem 50px;
        /* леко по-надолу текста */
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: relative;
        overflow: hidden;
    }

    .hero::before,
    .hero::after {
        display: none;
        /* махаме големите фонови кръгове */
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
        /* „бутни надписите” една идея надолу */
        z-index: 2;
    }

    .hero-title {
        font-size: clamp(2.1rem, 8vw, 2.6rem);
        line-height: 1.15;
    }

    .hero-subtitle {
        font-size: 1rem;
        max-width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.9rem;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    /* Топката точно под бутоните */
    .hero-image {
        position: static;
        width: 260px;
        height: 260px;
        margin: 1.8rem auto 0;
        /* център и под бутоните */
        opacity: 0.55;
        pointer-events: none;
    }

    .geometric-shape {
        width: 100%;
        height: 100%;
        border-radius: 65% 35% 60% 40%;
    }

    /* ОБЩО ОТСТОЯНИЕ НА СЕКЦИИТЕ */
    section {
        padding: 50px 0;
    }

    /* GRID-ове – една колона */
    .projects-grid,
    .services-grid,
    .architects-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    @media (max-width: 480px) {
        .stats {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }
    }

    /* CONTACT */
    .contact-content {
        flex-direction: column;
        align-items: center;
        margin-top: 2.5rem;
        padding: 0 1.25rem;
    }

    .contact-info {
        max-width: 420px;
        width: 100%;
        text-align: left;
    }

    .info-item {
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0.9rem;
        margin-bottom: 1.1rem;
    }

    .info-icon {
        width: 40px;
        height: 40px;
    }

    .info-text {
        text-align: left;
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .info-text h4 {
        font-size: 1.05rem;
        margin-bottom: 0.25rem;
    }

    /* FOOTER */
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* Скриваме scroll-indicator ако имаш такъв елемент */
    .scroll-indicator {
        display: none;
    }
}

/* ======================
   SMALL MOBILE (max-width: 480px)
   ====================== */
@media (max-width: 480px) {
    .logo {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.85rem;
    }
    
    .hero-buttons .btn {
        min-height: 44px;
    }
    
    .architect-social a {
        width: 44px;
        height: 44px;
    }
}

/* =======================
   Projects – improved cards
   ======================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.2rem;
    align-items: stretch;
}

.project-card {
    position: relative;
    border-radius: 22px;
    padding: 1.4rem 1.4rem 1.6rem;
    background: radial-gradient(circle at top left, #171717 0%, #080808 55%);
    border: 1px solid rgba(212, 175, 55, 0.16);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.8);
    transition: transform 0.35s var(--easing),
                box-shadow 0.35s var(--easing),
                border-color 0.35s var(--easing);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.95);
    border-color: rgba(212, 175, 55, 0.45);
}

/* layout вътре в картата */
.project-figure {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    height: 100%;
}

.project-img {
    width: 100%;
    height: 190px;
    border-radius: 16px;
    object-fit: cover;
    display: block;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9);
}

.project-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    flex: 1;
}

/* чипове – година, локация, тип */
.project-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.chip {
    font-size: 0.8rem;
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(10, 10, 10, 0.85);
    color: var(--text-lighter);
    font-weight: 500;
}

.chip-year {
    background: rgba(255, 255, 255, 0.16);
    color: var(--text-lighter);
}

.chip-location {
    opacity: 0.9;
}

.chip-type {
    margin-top: 0.1rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-lighter);
    text-transform: uppercase;
    letter-spacing: 1.6px;
    font-size: 0.75rem;
}

/* заглавие + описание + бутон */
.project-title {
    margin-top: 0.1rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-lighter);
}

.project-description {
    margin-top: 0.3rem;
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    flex: 1; /* бута бутона надолу, за да са еднакви по височина */
}

/* по-изчистен бутон */
.project-btn {
    margin-top: 0.9rem;
    align-self: flex-start;
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: var(--text-lighter);
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: background 0.25s var(--easing),
                color 0.25s var(--easing),
                transform 0.25s var(--easing),
                box-shadow 0.25s var(--easing);
}

.project-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-lighter);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.contact-content {
    display: flex;
    justify-content: center;
}

.contact-info {
    max-width: 600px;
}

/* GLOBAL LINK RESET */
a {
    color: var(--text-lighter);
    text-decoration: none;
}

a:hover {
    color: var(--text-lighter);
}

.footer-links a,
.footer-bottom a {
    color: var(--text-lighter) !important;
}

.footer-links a:hover,
.footer-bottom a:hover {
    color: var(--text-lighter) !important;
    opacity: 0.8;
}

/* -------------------------------
   Additional responsive polish
   Improves spacing, tap targets and readability across devices
   ------------------------------- */

@media (max-width: 1024px) {
    :root {
        --transition-duration: 0.35s;
    }

    .hero-title {
        font-size: clamp(2.25rem, 6.5vw, 3.25rem);
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .project-img {
        height: 160px;
    }

    .modal-panel {
        padding: 0.75rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    /* center hero content on narrow screens */
    .hero-content {
        align-items: center;
        text-align: center;
    }

    .hero-subtitle {
        max-width: 90%;
        margin: 0 auto 1rem;
    }

    /* make nav easier to tap */
    .nav-menu {
        padding: 1rem 1rem 1.25rem;
    }

    .lang-switch {
        display: flex;
        gap: 0.5rem;
    }

    /* modal: stack controls below image on small screens */
    .modal-body {
        gap: 1rem;
    }

    .modal-gallery {
        flex-direction: column;
        gap: 0.75rem;
    }

    .modal-prev, .modal-next {
        width: 44px;
        height: 44px;
    }

    .modal-image {
        max-height: 50vh;
    }

    /* project descriptions slightly smaller and clamp lines */
    .project-description {
        font-size: 0.9rem;
    }
    .project-description {
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* make project CTA full width for small cards */
    .project-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .project-img {
        height: 140px;
    }

    .modal-image {
        max-height: 45vh;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    .chip-type {
        font-size: 0.7rem;
    }
}
