/* ===================================================================
   ONIRIS — SISTEMA DE TEMAS PARA CATÁLOGO DE SERVICIOS (7 Categorías)
   Cada categoría tiene su propia paleta: primario, acento, fondo tenue y overlay.
   Usás data-theme="slug" en la sección raíz de cada página.
   =================================================================== */

/* -------------------------------------------------------------------
    TEMA 1 — ESTRATEGIA (Gris claro perlado)
    ------------------------------------------------------------------- */
[data-theme="estrategia"] {
    --theme-primary: #C7C4CA;
    --theme-primary-rgb: 199, 196, 202;
    --theme-accent: #E2DFE5;
    --theme-accent-rgb: 226, 223, 229;
    --theme-bg-tint: rgba(199, 196, 202, 0.08);
    --theme-bg-card: rgba(199, 196, 202, 0.05);
    --theme-border: rgba(199, 196, 202, 0.25);
    --theme-border-hover: rgba(199, 196, 202, 0.55);
    --theme-glow: rgba(199, 196, 202, 0.35);
    --theme-overlay: linear-gradient(135deg, rgba(199, 196, 202, 0.70) 0%, rgba(0, 0, 0, 0.70) 60%);
    --theme-overlay-light: linear-gradient(145deg, rgba(199, 196, 202, 0.40) 0%, rgba(0, 0, 0, 0.60) 60%);
    --theme-icon: "\f140";
}

/* -------------------------------------------------------------------
    TEMA 2 — IDENTIDAD DE MARCA (Púrpura oscuro / Índigo)
    ------------------------------------------------------------------- */
[data-theme="identidad-marca"] {
    --theme-primary: #1D1736;
    --theme-primary-rgb: 29, 23, 54;
    --theme-accent: #3B2F6E;
    --theme-accent-rgb: 59, 47, 110;
    --theme-bg-tint: rgba(29, 23, 54, 0.08);
    --theme-bg-card: rgba(29, 23, 54, 0.05);
    --theme-border: rgba(29, 23, 54, 0.25);
    --theme-border-hover: rgba(29, 23, 54, 0.55);
    --theme-glow: rgba(29, 23, 54, 0.35);
    --theme-overlay: linear-gradient(135deg, rgba(29, 23, 54, 0.70) 0%, rgba(0, 0, 0, 0.70) 60%);
    --theme-overlay-light: linear-gradient(145deg, rgba(29, 23, 54, 0.40) 0%, rgba(0, 0, 0, 0.60) 60%);
    --theme-icon: "\f53f";
}

/* -------------------------------------------------------------------
    TEMA 3 — EVENTOS Y STANDS (Verde azulado oscuro)
    ------------------------------------------------------------------- */
[data-theme="eventos-stands"] {
    --theme-primary: #2B4C4D;
    --theme-primary-rgb: 43, 76, 77;
    --theme-accent: #3E6F70;
    --theme-accent-rgb: 62, 111, 112;
    --theme-bg-tint: rgba(43, 76, 77, 0.08);
    --theme-bg-card: rgba(43, 76, 77, 0.05);
    --theme-border: rgba(43, 76, 77, 0.25);
    --theme-border-hover: rgba(43, 76, 77, 0.55);
    --theme-glow: rgba(43, 76, 77, 0.35);
    --theme-overlay: linear-gradient(135deg, rgba(43, 76, 77, 0.70) 0%, rgba(0, 0, 0, 0.70) 60%);
    --theme-overlay-light: linear-gradient(145deg, rgba(43, 76, 77, 0.40) 0%, rgba(0, 0, 0, 0.60) 60%);
    --theme-icon: "\f073";
}

/* -------------------------------------------------------------------
    TEMA 4 — ROTULACIÓN (Azul violáceo oscuro)
    ------------------------------------------------------------------- */
[data-theme="rotulacion"] {
    --theme-primary: #3E407E;
    --theme-primary-rgb: 62, 64, 126;
    --theme-accent: #5659A8;
    --theme-accent-rgb: 86, 89, 168;
    --theme-bg-tint: rgba(62, 64, 126, 0.08);
    --theme-bg-card: rgba(62, 64, 126, 0.05);
    --theme-border: rgba(62, 64, 126, 0.25);
    --theme-border-hover: rgba(62, 64, 126, 0.55);
    --theme-glow: rgba(62, 64, 126, 0.35);
    --theme-overlay: linear-gradient(135deg, rgba(62, 64, 126, 0.70) 0%, rgba(0, 0, 0, 0.70) 60%);
    --theme-overlay-light: linear-gradient(145deg, rgba(62, 64, 126, 0.40) 0%, rgba(0, 0, 0, 0.60) 60%);
    --theme-icon: "\f1b9";
}

/* -------------------------------------------------------------------
    TEMA 5 — SITIOS WEB (Marrón cobrizo / Óxido)
    ------------------------------------------------------------------- */
[data-theme="sitios-web"] {
    --theme-primary: #8A5638;
    --theme-primary-rgb: 138, 86, 56;
    --theme-accent: #B07048;
    --theme-accent-rgb: 176, 112, 72;
    --theme-bg-tint: rgba(138, 86, 56, 0.08);
    --theme-bg-card: rgba(138, 86, 56, 0.05);
    --theme-border: rgba(138, 86, 56, 0.25);
    --theme-border-hover: rgba(138, 86, 56, 0.55);
    --theme-glow: rgba(138, 86, 56, 0.35);
    --theme-overlay: linear-gradient(135deg, rgba(138, 86, 56, 0.70) 0%, rgba(0, 0, 0, 0.70) 60%);
    --theme-overlay-light: linear-gradient(145deg, rgba(138, 86, 56, 0.40) 0%, rgba(0, 0, 0, 0.60) 60%);
    --theme-icon: "\f109";
}

/* -------------------------------------------------------------------
    TEMA 6 — CAMPAÑAS (Verde azulado oceánico)
    ------------------------------------------------------------------- */
[data-theme="campanas"] {
    --theme-primary: #23575B;
    --theme-primary-rgb: 35, 87, 91;
    --theme-accent: #2F7A7F;
    --theme-accent-rgb: 47, 122, 127;
    --theme-bg-tint: rgba(35, 87, 91, 0.08);
    --theme-bg-card: rgba(35, 87, 91, 0.05);
    --theme-border: rgba(35, 87, 91, 0.25);
    --theme-border-hover: rgba(35, 87, 91, 0.55);
    --theme-glow: rgba(35, 87, 91, 0.35);
    --theme-overlay: linear-gradient(135deg, rgba(35, 87, 91, 0.70) 0%, rgba(0, 0, 0, 0.70) 60%);
    --theme-overlay-light: linear-gradient(145deg, rgba(35, 87, 91, 0.40) 0%, rgba(0, 0, 0, 0.60) 60%);
    --theme-icon: "\f0a1";
}

/* -------------------------------------------------------------------
    TEMA 7 — PRODUCCIÓN AUDIOVISUAL (Gris violáceo oscuro)
    ------------------------------------------------------------------- */
[data-theme="produccion-audiovisual"] {
    --theme-primary: #342F40;
    --theme-primary-rgb: 52, 47, 64;
    --theme-accent: #504A60;
    --theme-accent-rgb: 80, 74, 96;
    --theme-bg-tint: rgba(52, 47, 64, 0.08);
    --theme-bg-card: rgba(52, 47, 64, 0.05);
    --theme-border: rgba(52, 47, 64, 0.25);
    --theme-border-hover: rgba(52, 47, 64, 0.55);
    --theme-glow: rgba(52, 47, 64, 0.35);
    --theme-overlay: linear-gradient(135deg, rgba(52, 47, 64, 0.70) 0%, rgba(0, 0, 0, 0.70) 60%);
    --theme-overlay-light: linear-gradient(145deg, rgba(52, 47, 64, 0.40) 0%, rgba(0, 0, 0, 0.60) 60%);
    --theme-icon: "\f03d";
}

/* ===================================================================
   COMPONENTES DEL CATÁLOGO DE SERVICIOS
   =================================================================== */

/* ---- Contenedor raíz ---- */
.servicios-root {
    background-color: #000;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

/* ---- HERO DE CATEGORÍA (full viewport) ---- */
.category-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.65);
    z-index: 0;
}

.category-hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--theme-overlay);
    z-index: 1;
}

.category-hero-stars {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.category-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
    animation: pageReveal 1s var(--transition-smooth, cubic-bezier(0.19, 1, 0.22, 1)) forwards;
}

.category-hero-kicker {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--theme-accent);
    margin-bottom: 1.5rem;
}

.category-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.category-hero-sub {
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    max-width: 650px;
    margin: 0 auto 2.5rem;
}

.category-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.5rem;
    background: var(--theme-primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 100px;
    text-decoration: none;
    border: 2px solid var(--theme-primary);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.category-hero-cta:hover {
    background: transparent;
    border-color: var(--theme-accent);
    box-shadow: 0 0 30px var(--theme-glow);
    color: #fff;
}

.category-hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    animation: bounceDown 2s ease infinite;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-hero-scroll:hover {
    color: var(--theme-accent);
}

/* ---- SUB-NAV DE CATEGORÍAS ---- */
.category-subnav {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.8rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-subnav::-webkit-scrollbar { height: 0; }

.category-subnav-list {
    display: flex;
    gap: 0.3rem;
    list-style: none;
    margin: 0;
    padding: 0 2rem;
    justify-content: center;
    min-width: max-content;
}

.category-subnav-link {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    border-radius: 100px;
    border: 1px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    white-space: nowrap;
}

.category-subnav-link:hover,
.category-subnav-link.active {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.category-subnav-link.active {
    background: rgba(255, 255, 255, 0.08);
}

/* ---- INTRODUCCIÓN ---- */
.category-intro {
    max-width: 800px;
    margin: 0 auto;
    padding: 5rem 2rem 3rem;
    text-align: center;
}

.category-intro-text {
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    font-weight: 300;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.75);
}

/* ---- BLOQUE DE POSICIONAMIENTO (Rotulación) ---- */
.category-posicionamiento {
    max-width: 800px;
    margin: 0 auto;
    padding: 5rem 2rem 4rem;
    text-align: center;
}

.category-posicionamiento h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.category-posicionamiento p {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

/* ---- SECCIÓN HEADER ---- */
.servicios-section-header {
    text-align: center;
    padding: 0 2rem 3rem;
}

.servicios-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--theme-accent);
    margin-bottom: 0.8rem;
}

.servicios-section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

/* ---- GRID DE SERVICIOS ---- */
.category-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 5rem;
}

/* ---- TARJETA DE SERVICIO ---- */
.service-card {
    background: linear-gradient(145deg, var(--theme-bg-card) 0%, rgba(0, 0, 0, 0.3) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid var(--theme-border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-accent));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    border-color: var(--theme-border-hover);
    box-shadow: 0 8px 40px var(--theme-glow);
    transform: translateY(-4px);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card-code {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--theme-accent);
    background: var(--theme-bg-tint);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    margin-bottom: 1.2rem;
    width: fit-content;
}

.service-card-headline {
    font-size: clamp(1.2rem, 1.5vw, 1.5rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #fff;
}

.service-card-copy {
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 1.5rem;
    flex: 1;
}

.service-card .service-card-cta-block {
    margin-top: auto;
}

.service-card-cta:hover::after {
    transform: translateX(4px);
}

/* ---- INCLUYE (string con pipes) ---- */
.service-card-incluye {
    font-size: 0.88rem;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    padding: 1.2rem;
    background: var(--theme-bg-tint);
    border-radius: 12px;
}

/* ---- CTA BLOCK (3 partes: título + frase + botón) ---- */
.service-card-cta-block {
    margin-top: 1.8rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--theme-border);
}

.service-card-cta-block-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-accent);
    margin-bottom: 0.4rem;
}

.service-card-cta-block-frase {
    font-size: 0.8rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1rem;
}

/* ---- MICRO CTA / CTA ---- */
.service-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-accent);
    text-decoration: none;
    padding: 0.6rem 0;
    margin-top: auto;
    transition: color 0.3s ease, gap 0.3s ease;
}

.service-card-cta:hover {
    color: var(--theme-primary);
    gap: 0.8rem;
}

.service-card-cta::after {
    content: '\2192';
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.service-card-cta:hover::after {
    transform: translateX(4px);
}

/* ---- CTA BLOCK ---- */
.service-card-cta-block {
    margin-top: 1.8rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--theme-border);
}

.service-card-cta-block-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-accent);
    margin-bottom: 0.4rem;
}

.service-card-cta-block-frase {
    font-size: 0.8rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1rem;
}

/* ---- CIERRE DE CATEGORÍA ---- */
.category-cierre {
    position: relative;
    padding: 6rem 2rem;
    text-align: center;
    overflow: hidden;
    border-top: 1px solid var(--theme-border);
}

.category-cierre::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, var(--theme-bg-tint) 0%, transparent 70%);
    z-index: 0;
}

.category-cierre-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.category-cierre-kicker {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--theme-accent);
    margin-bottom: 1rem;
}

.category-cierre-text {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

.category-cierre-copy {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 2rem;
}

.category-cierre-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--theme-primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 100px;
    text-decoration: none;
    border: 2px solid var(--theme-primary);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.category-cierre-cta:hover {
    background: transparent;
    border-color: var(--theme-accent);
    box-shadow: 0 0 30px var(--theme-glow);
    color: #fff;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .category-services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card-modalidades {
        grid-template-columns: 1fr;
    }

    .category-hero {
        min-height: 70vh;
    }
}

@media (max-width: 768px) {
    .category-hero-content {
        padding: 0 1rem;
    }

    .category-intro {
        padding: 3rem 1rem 2rem;
    }

    .category-services-grid {
        padding: 0 1rem 3rem;
    }

    .category-cierre {
        padding: 4rem 1rem;
    }

    .category-subnav-list {
        padding: 0 1rem;
    }

    .service-card {
        padding: 1.8rem 1.2rem;
    }
}

@media (max-width: 480px) {
    .category-hero {
        min-height: 60vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .category-hero-scroll {
        animation: none;
    }

    .service-card {
        transition: none;
    }
}

/* ===================================================================
   GALERÍA DE PORTAFOLIO (Adaptada al tema Rotulación)
   Usa las variables del tema para glass-morphism consistente
   =================================================================== */

/* ---- Controles ---- */
.portfolio-controls {
    width: 100%;
    background: #000;
    padding: 2rem 5%;
    border-top: 1px solid var(--theme-border);
    border-bottom: 1px solid var(--theme-border);
}

.portfolio-controls-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Toggle Grid / Carrusel */
.portfolio-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border);
    border-radius: 100px;
    padding: 0.4rem;
}

.toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
    outline: none;
}

.toggle-btn:hover {
    color: #fff;
    transform: scale(1.1);
}

.toggle-btn.active {
    background: var(--theme-bg-tint);
    color: var(--theme-accent);
}

.toggle-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Filtros */
.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.filter-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 100px;
    border: 1px solid var(--theme-border);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    outline: none;
    font-family: 'Montserrat', sans-serif;
}

.filter-btn:hover {
    background: var(--theme-bg-tint);
    color: #fff;
    border-color: var(--theme-border-hover);
}

.filter-btn.active {
    background: var(--theme-primary);
    color: #fff;
    border-color: var(--theme-primary);
}

.filter-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Subfiltros */
.portfolio-subfilters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border);
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.portfolio-subfilters[hidden] {
    display: none;
}

.subfilter-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    margin-right: 0.5rem;
    white-space: nowrap;
}

.subfilter-btn {
    padding: 0.4rem 1rem;
    border-radius: 100px;
    border: 1px dashed var(--theme-border);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    font-family: 'Montserrat', sans-serif;
}

.subfilter-btn:hover {
    background: var(--theme-bg-tint);
    color: #fff;
    border-style: solid;
    border-color: var(--theme-border-hover);
}

.subfilter-btn.active {
    background: var(--theme-bg-tint);
    color: var(--theme-accent);
    border-style: solid;
    border-color: var(--theme-primary);
    font-weight: 600;
}

.subfilter-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ---- Grid Section ---- */
.portfolio-grid-section {
    width: 100%;
    background: #000;
    padding: 4rem 5% 6rem;
}

.portfolio-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    align-items: start;
}

.portfolio-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    will-change: transform, opacity;
}

.portfolio-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px var(--theme-glow);
    border-color: var(--theme-border-hover);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.portfolio-item img.loaded {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.08);
}

.portfolio-item-overlay {
    display: none;
}

/* Botón Cargar más */
.portfolio-load-more {
    display: block;
    margin: 3rem auto 0;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    border: 1px solid var(--theme-border);
    background: transparent;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    outline: none;
    font-family: 'Montserrat', sans-serif;
}

.portfolio-load-more:hover {
    background: var(--theme-bg-tint);
    border-color: var(--theme-border-hover);
    color: var(--theme-accent);
    transform: translateY(-2px);
}

.portfolio-load-more.hidden {
    display: none;
}

/* ---- Carrusel Section ---- */
.portfolio-carousel-section {
    width: 100%;
    background: #000;
    padding: 4rem 5% 6rem;
    border-bottom: 1px solid var(--theme-border);
}

.portfolio-carousel {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.carousel-track-wrapper {
    flex: 1;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--theme-border);
    aspect-ratio: 4 / 3;
    background: var(--theme-bg-card);
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    cursor: zoom-in;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-prev,
.carousel-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--theme-border);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    outline: none;
    flex-shrink: 0;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--theme-bg-tint);
    transform: scale(1.1);
    border-color: var(--theme-border-hover);
}

.carousel-prev:focus-visible,
.carousel-next:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.carousel-dots {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.carousel-counter {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: #fff;
    text-transform: uppercase;
}

.carousel-counter .total {
    color: rgba(255, 255, 255, 0.5);
}

.carousel-progress-track {
    width: 120px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.carousel-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--theme-accent), var(--theme-primary));
    border-radius: 2px;
    transition: width 0.5s ease;
}

.carousel-dot {
    display: none;
}

/* ---- Responsive Gallery ---- */
@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.7rem;
    }

    .portfolio-carousel {
        gap: 0.75rem;
    }

    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .portfolio-controls-container {
        gap: 1rem;
    }

    .carousel-track-wrapper {
        aspect-ratio: 4 / 3;
    }
}
