/* ============================================
   OWN DESIGN STUDIO - PREMIUM STYLES
   Version 2.0 - Enhanced Design System
   ============================================ */

:root {
    /* Light Theme (Default) */
    --bg-dark: #F0F0F2;
    --bg-light: #FFFFFF;
    --text-primary: #0D0D0D;
    --text-secondary: #A6937C;
    --accent: #798C5D;
    --accent-hover: #A6937C;
    --border-color: #D9D8D7;
    --vcard-photo-bg: #E9E9EB;

    /* Country Colors */
    --mexico-green: #006847;
    --mexico-red: #CE1126;
    --usa-red: #B22234;
    --usa-blue: #3C3B6E;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.20);
}

html.dark-theme {
    --bg-dark: #0D0D0D;
    --bg-light: #1a1a1a;
    --text-primary: #F0F0F2;
    --text-secondary: #A6937C;
    --accent: #798C5D;
    --accent-hover: #9ab379;
    --border-color: rgba(217, 216, 215, 0.15);
    --vcard-photo-bg: #1f1f1f;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.6);
}

/* ============================================
   BASE STYLES
   ============================================ */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

.scroll-container {
    scroll-behavior: smooth;
}

* {
    will-change: auto;
}

body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-y: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 300;
}

/* ============================================
   PREMIUM COUNTRY BADGES
   ============================================ */

.country-badge-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.country-badge-hero:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.country-badge-hero .flag-emoji {
    font-size: 1.5rem;
}



.country-badge-modal {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.country-badge-modal .flag-emoji {
    font-size: 1.25rem;
}

/* ============================================
   PREMIUM FILTER BUTTONS
   ============================================ */

.filter-button-premium {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.filter-button-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.filter-button-premium:hover::before {
    opacity: 0.1;
}

.filter-button-premium.active {
    background: var(--accent);
    color: var(--bg-light);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.filter-button-premium.active::before {
    opacity: 1;
}

.filter-button-premium .flag-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.filter-button-premium:hover .flag-icon {
    transform: scale(1.1);
}

.filter-button-premium .project-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.25rem;
}

.filter-button-premium.active .project-count {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   PREMIUM PROJECT CARDS - COMPACT & MOBILE READY
   ============================================ */

.project-card-premium {
    position: relative;
    /* Aspect Ratio Vertical: MÃ¡s compacto */
    aspect-ratio: 4 / 5;
    width: 100%;
    border-radius: 16px;
    /* Borde un poco menos exagerado */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Mobile Specific Adjustments */
@media (max-width: 640px) {
    .project-card-premium {
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    }
}

.project-card-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            transparent 40%,
            transparent 60%,
            rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
    pointer-events: none;
}

.project-card-premium:hover {
    transform: translateY(-5px);
    /* Movimiento mÃ¡s sutil */
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.project-card-premium img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.project-card-premium:hover img {
    transform: scale(1.08);
}

/* PILL BADGE COMPACTO */
.country-badge-card {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: auto;
    height: auto;
    padding: 4px 10px;
    /* MÃ¡s pequeÃ±o/compacto */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
    transition: all 0.3s ease;
}

.country-badge-card .flag-emoji {
    font-size: 1rem;
    /* Emoji ajustado */
    margin-right: 6px;
}

.country-badge-card span:last-child {
    font-size: 0.7rem;
    /* Texto mÃ¡s pequeÃ±o */
    font-weight: 700;
    letter-spacing: 0.05em;
}

.country-badge-card:hover {
    background: rgba(121, 140, 93, 0.9);
}

/* CONTENT CENTERED COMPACT */
.project-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 0.75rem 0.75rem;
    /* Padding reducido */
    z-index: 2;
    text-align: center;

    /* WARM DARK GLASS EFFECT */
    background: linear-gradient(to bottom,
            rgba(45, 40, 35, 0.9),
            rgba(30, 25, 20, 0.98));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    /* Gap reducido */

    transition: all 0.4s ease;
}

.project-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
    /* TÃ­tulo mÃ¡s compacto */
    font-weight: 800;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.1;
    color: #FFFFFF;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Ajuste mÃ³vil para tÃ­tulos */
@media (max-width: 640px) {
    .project-title {
        font-size: 1rem;
    }
}

.project-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94A376;
    margin-top: 0;
}

/* Hide location to match clean mockup look */
.project-location {
    display: none;
}

/* ============================================
   PREMIUM BUTTONS
   ============================================ */

.btn-premium {
    position: relative;
    border: 2px solid var(--accent);
    color: var(--accent);
    background-color: transparent;
    overflow: hidden;
    z-index: 1;
    box-shadow: var(--shadow-sm);
}

.btn-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-premium:hover::before {
    transform: translateX(0);
}

.btn-premium:hover {
    color: var(--bg-light);
    box-shadow: var(--shadow-md);
}

.btn-premium:hover svg {
    stroke: var(--bg-light);
}

.btn-back {
    font-weight: 600;
}

.btn-back:hover i {
    transform: translateX(-4px);
}

/* ============================================
   PREMIUM MODAL DETAIL - DARK GLASS
   ============================================ */

.modal-container-premium,
.modal-container-detail {
    background: #0a0a0a;
    /* Fondo base muy oscuro */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    color: white;
    /* Texto blanco por defecto */
}

/* Header transparente flotante */
.modal-container-detail>div:first-child {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.btn-back {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-back:hover {
    color: var(--accent);
    transform: translateX(-4px);
}

.btn-back i {
    stroke-width: 3px;
    /* Icono mÃ¡s gordito */
}

/* ============================================
   PREMIUM CAROUSEL - IMMERSIVE
   ============================================ */
.carousel-premium {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    /* Asegura altura */
    background: #000;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Borde sutil */
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
    /* Sombra interna para profunidad */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-premium img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Llenar todo el espacio */
    opacity: 0;
    transition: opacity 0.6s ease;
}

.carousel-premium img.opacity-100 {
    opacity: 1;
}

/* Controles flotantes Glass */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
}

.carousel-btn:hover {
    background: white;
    color: black;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.carousel-prev {
    left: 1.5rem;
}

.carousel-next {
    right: 1.5rem;
}

/* Indicadores */
.carousel-indicators {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
    z-index: 20;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 12px;
    border-radius: 100px;
    backdrop-filter: blur(4px);
}

.carousel-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-indicator.active {
    background: var(--accent);
    transform: scale(1.5);
    box-shadow: 0 0 10px var(--accent);
}

/* ============================================
   PROJECT INFO PANEL - HERO STYLE
   ============================================ */
.project-info-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem 0;
}

.project-country-badge-modal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 100px;
    width: fit-content;
    margin-bottom: 1.5rem;
}

.project-country-badge-modal span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.9);
}

#project-detail-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 2.2rem;
    /* Grande */
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #a5a5a5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

/* Grid de detalles */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 columnas */
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: transparent;
    padding: 0;
    transition: transform 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-2px);
    background: transparent;
    /* Quitar fondo hover anterior */
}

.detail-item i {
    color: #94A376;
    /* Accent Olive */
    width: 24px;
    height: 24px;
    margin-bottom: 0.5rem;
    stroke-width: 1.5px;
}

.detail-item strong {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

.detail-item span {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-family: 'Open Sans', sans-serif;
}

#project-detail-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: auto;
    /* Empujar al fondo si sobra espacio */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .modal-container-detail {
        overflow-y: auto !important;
        /* Permitir scroll en mÃ³vil */
    }

    .carousel-premium {
        min-height: 250px;
        border-radius: 12px;
    }

    #project-detail-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        /* 1 columna en mÃ³vil */
        gap: 1.2rem;
        padding-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
}


/* ============================================
   FEATURE CARDS
   ============================================ */

.feature-card,
.philosophy-card,
.architecture-card {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}

.feature-card:hover,
.philosophy-card:hover,
.architecture-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.feature-card img,
.philosophy-card img,
.architecture-card img {
    transition: transform 0.4s ease;
}

.feature-card:hover img,
.philosophy-card:hover img,
.architecture-card:hover img {
    transform: scale(1.05);
}

/* ============================================
   SCROLL SECTIONS
   ============================================ */

/* ============================================
   SCROLL SECTIONS & RESPONSIVENESS
   ============================================ */

.scroll-container {
    width: 100%;
    /* En mÃ³vil: Scroll nativo normal (NO SNAP) para evitar bloqueos */
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
}

.scroll-section {
    width: 100%;
    min-height: 100vh;
    /* Ocupa al menos toda la pantalla */
    height: auto;
    /* Permite crecer si hay mucho contenido */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.5rem 4rem 1.5rem;
    /* Padding superior para el navbar fijo */
}

#inicio {
    min-height: 100vh;
    /* Hero siempre full screen */
    padding: 0;
}

/* Solo en DESKTOP (pantallas grandes) activamos el scroll-snap */
@media (min-width: 1024px) {

    html,
    body {
        height: 100%;
        overflow: hidden;
        /* Evita doble scrollbar */
    }

    .scroll-container {
        height: 100vh;
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
        scroll-behavior: smooth;
    }

    .scroll-section {
        height: 100vh;
        /* Forzar altura fija por secciÃ³n en desktop */
        scroll-snap-align: start;
        padding-top: 80px;
        /* Espacio para navbar */
        padding-bottom: 0;
    }

    #inicio {
        height: 100vh;
    }
}

/* ============================================
   MOBILE OPTIMIZATIONS (Max-width: 768px)
   ============================================ */
@media (max-width: 768px) {

    /* Ajuste de tipografÃ­a general */
    html {
        font-size: 14px;
        /* Base un poco mÃ¡s pequeÃ±a */
    }

    /* Grids a 1 columna forzada */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* ExcepciÃ³n para galerÃ­a de imÃ¡genes pequeÃ±as si las hubiera */
    .logos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    /* TÃ­tulos mÃ¡s manejables */
    h1,
    .text-5xl,
    .text-6xl,
    .text-7xl,
    .text-8xl {
        font-size: 2.5rem !important;
        line-height: 1.1;
    }

    h2,
    .text-4xl {
        font-size: 2rem !important;
    }

    /* Padding de secciones */
    .scroll-section {
        padding: 5rem 1rem 3rem 1rem;
        justify-content: flex-start;
        /* Alinear arriba en mÃ³vil para no centrar si es largo */
    }

    /* Navbar mÃ³vil fondo */
    #mobile-menu {
        background: rgba(10, 10, 10, 0.98);
        /* Fondo casi sÃ³lido oscuro */
    }
}


/* ============================================
   WELCOME SCREEN
   ============================================ */

#welcome-screen {
    background-color: var(--bg-dark);
}

#welcome-logo-container {
    transform: scale(0.95);
    opacity: 0;
    animation: fadeInLogo 1s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes fadeInLogo {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#welcome-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid var(--text-primary);
    border-radius: 50%;
    left: 0;
    top: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s, transform 0.1s;
    z-index: 9999;
}

.custom-cursor.hovered {
    width: 60px;
    height: 60px;
    background-color: var(--accent);
    opacity: 0.2;
}

@media (max-width: 1024px) {
    .custom-cursor {
        display: none;
    }
}

/* ============================================
   SIDE NAVIGATION
   ============================================ */

#side-nav {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    z-index: 100;
    display: none;
}

@media (min-width: 1024px) {
    #side-nav {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}

#side-nav a {
    width: 12px;
    height: 12px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    transition: background-color 0.3s, transform 0.3s;
}

#side-nav a.active {
    background-color: var(--accent);
    transform: scale(1.2);
}

/* ============================================
   HEADER STYLES
   ============================================ */

#header.on-hero .header-right-items *,
#header.on-hero>div>a>img,
#header.on-hero .nav-link {
    color: white !important;
    filter: brightness(0) invert(1);
}

#header.on-hero .nav-link::after {
    background-color: white;
}

#header.is-scrolled {
    background-color: var(--bg-dark);
    box-shadow: var(--shadow-sm);
}

#header.is-scrolled .nav-link {
    color: var(--text-secondary);
}

#header.is-scrolled .nav-link:hover,
#header.is-scrolled .nav-link.active {
    color: var(--text-primary);
}

#header.is-scrolled .nav-link.active::after {
    background-color: var(--accent);
}

#header.is-scrolled .header-right-items * {
    color: var(--text-primary);
}

#header.is-scrolled .lang-switcher button {
    color: var(--text-secondary);
}

#header.is-scrolled .lang-switcher button.active {
    color: var(--text-primary);
}

.nav-link {
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-link.active::after {
    width: 100%;
}

/* ============================================
   MOBILE MENU
   ============================================ */

#mobile-menu {
    transition: opacity 0.3s ease-in-out;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

#mobile-menu nav a {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open nav a {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   THEME ICONS
   ============================================ */

#theme-toggle-button .feather-sun {
    display: none;
}

html.dark-theme #theme-toggle-button .feather-sun {
    display: block;
}

html.dark-theme #theme-toggle-button .feather-moon {
    display: none;
}

/* ============================================
   ANIMATIONS
   ============================================ */

.reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: var(--delay, 0s);
}

.section-in-view .reveal-item {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   PORTFOLIO COLLAGE
   ============================================ */

.collage-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 1rem;
    width: 100%;
    height: 70vh;
    max-width: 900px;
}

.collage-item {
    background-size: cover;
    background-position: center;
    border-radius: 999px;
    transition: transform 0.5s ease, opacity 0.5s ease;
    transform: scale(0.95);
    opacity: 0;
}

.section-in-view .collage-item {
    transform: scale(1);
    opacity: 1;
}

.collage-item-1 {
    grid-column: 1 / 3;
    grid-row: 1 / 4;
    transition-delay: 0.1s;
}

.collage-item-2 {
    grid-column: 3 / 5;
    grid-row: 1 / 3;
    transition-delay: 0.2s;
}

.collage-item-3 {
    grid-column: 5 / 7;
    grid-row: 1 / 5;
    transition-delay: 0.3s;
}

.collage-item-4 {
    grid-column: 1 / 3;
    grid-row: 4 / 6;
    transition-delay: 0.4s;
}

.collage-item-5 {
    grid-column: 3 / 5;
    grid-row: 3 / 6;
    transition-delay: 0.5s;
}

.collage-item-6 {
    grid-column: 5 / 7;
    grid-row: 5 / 6;
    transition-delay: 0.6s;
}

/* ============================================
   CLIENTS & COLLABORATORS
   ============================================ */

.clients-section,
.collaborators-section {
    padding: 80px 0;
    background: var(--bg-dark);
    position: relative;
}

.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 300;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.gradient-text {
    color: #000000;
}

html.dark-theme .gradient-text {
    color: #ffffff;
}

.section-line {
    width: 80px;
    height: 4px;
    background: #000000;
    margin: 0 auto;
    border-radius: 2px;
}

html.dark-theme .section-line {
    background: #ffffff;
}

.logos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: center;
}

.client-logo,
.collaborator-logo {
    opacity: 0.85;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 100%;
    height: auto;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.client-logo:hover,
.collaborator-logo:hover {
    opacity: 1;
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-md);
}

/* ============================================
   MODALS
   ============================================ */

.modal-overlay {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-overlay~* {
    position: relative;
}

/* vCard Modal */
#vcard-modal {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

#vcard-modal-content {
    background-color: var(--bg-light);
    color: var(--text-primary);
    transition: transform 0.4s ease, opacity 0.4s ease;
    transform: scale(0.95);
    opacity: 0;
}

#vcard-modal.flex #vcard-modal-content {
    transform: scale(1);
    opacity: 1;
}

.business-card-header {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
}

.business-card-body {
    background: var(--bg-light);
}

.contact-item {
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(4px);
}

.contact-icon {
    color: var(--accent);
}

/* QR Modal */
.qr-modal {
    display: none;
    position: fixed;
    z-index: 99991;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.qr-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    max-width: 90vw;
    max-height: 90vh;
}

.qr-modal .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.qr-modal .close:hover {
    color: var(--accent);
}

/* ============================================
   HIDE SCROLLBARS
   ============================================ */

.scroll-container::-webkit-scrollbar,
.modal-container::-webkit-scrollbar,
.modal-container-premium::-webkit-scrollbar {
    display: none;
}

.scroll-container,
.modal-container,
.modal-container-premium {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .logos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .filter-button-premium {
        padding: 0.6rem 1.2rem;
        font-size: 0.75rem;
    }

    .project-card-premium {
        height: 320px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 768px) {

    .clients-section,
    .collaborators-section {
        padding: 8rem 0;
    }
}

@media (min-width: 1024px) {

    .clients-section,
    .collaborators-section {
        padding: 10rem 0;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
    display: none !important;
}

.flex {
    display: flex !important;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

.reveal-item,
.reveal-left,
.reveal-right,
.reveal-scale {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.section-in-view .reveal-item,
.section-in-view .reveal-left,
.section-in-view .reveal-right,
.section-in-view .reveal-scale {
    will-change: auto;
}
/* ============================================
   MOBILE HEADER FIXES
   ============================================ */

/* Asegurar que el botón de menú sea visible */
#mobile-menu-button {
    color: var(--text-primary);
    z-index: 60; /* Encima de todo */
    display: none; /* Oculto en desktop */
}

#header.on-hero #mobile-menu-button {
    color: white !important;
}

@media (max-width: 1024px) {
    #mobile-menu-button {
        display: block; /* Visible en móvil/tablet */
    }
    
    /* Ocultar menú desktop normal */
    #header .nav-link, 
    #header .hidden.md\:flex {
        display: none !important;
    }
}

/* Ajustes adicionales para el menú desplegable móvil */
#mobile-menu {
    z-index: 9999;
}

#mobile-menu .mobile-nav-link {
    font-size: 1.5rem;
    padding: 1rem;
    width: 100%;
    text-align: center;
}


/* ============================================
   BANDERAS SVG EN BOTONES DE FILTRO
   ============================================ */

.filter-button-premium .flag-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 0.5rem !important;
}

.filter-button-premium .flag-icon svg {
    width: 24px !important;
    height: 18px !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
    vertical-align: middle !important;
}

/* Asegurar que los botones tengan buen espaciado */
.filter-button-premium {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

