/*============================================================
    HOME.CSS — Página de inicio
============================================================*/

#hero_section {
    background-color: var(--sys-primary);
    margin-top: 76px;
    overflow: hidden;
    position: relative;
    text-transform: uppercase;
    width: 100%;
}

.hero-container-modern {
    margin-bottom: 25px;
}

#hero_carousel, #hero_carousel .carousel-inner, #hero_carousel .carousel-item {
    position: relative;
    width: 100%;
}

#hero_carousel .carousel-item {
    background-size: cover;
    background-position: center;
    min-height: 520px !important;
    overflow: hidden;
    transition: opacity 0.7s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.slide-studio-premium {
    background: hsla(147, 51%, 33%, 1);
    background: linear-gradient(180deg, hsla(147, 51%, 33%, 1) 0%, hsla(145, 29%, 58%, 1) 38%, hsla(125, 28%, 83%, 1) 100%);
    background: -moz-linear-gradient(180deg, hsla(147, 51%, 33%, 1) 0%, hsla(145, 29%, 58%, 1) 38%, hsla(125, 28%, 83%, 1) 100%);
    background: -webkit-linear-gradient(180deg, hsla(147, 51%, 33%, 1) 0%, hsla(145, 29%, 58%, 1) 38%, hsla(125, 28%, 83%, 1) 100%);
}

#hero_carousel .carousel-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: var(--sys-z-above);
}

.carousel-caption {
    position: absolute;
    inset: 0;
    z-index: var(--sys-z-above);
    display: flex;
    align-items: center;
    text-align: left;
    padding: var(--sys-spacing-6) 0;
}

/* ── CONTROLES HERO CAROUSEL ───────────────────────────── */
#hero_carousel .carousel-control-prev,
#hero_carousel .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(var(--sys-primary-raw), 0.5);
    backdrop-filter: blur(var(--sys-spacing-2));
    -webkit-backdrop-filter: blur(var(--sys-spacing-2));
    border-radius: var(--sys-radius-full);
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all var(--duration-normal) var(--ease-in-out);
    box-shadow: var(--sys-shadow-strong);
}

#hero_carousel .carousel-control-prev {
    left: 2%;
}

#hero_carousel .carousel-control-next {
    right: 2%;
}

#hero_carousel:hover .carousel-control-prev,
#hero_carousel:hover .carousel-control-next {
    opacity: 1;
}

#hero_carousel .carousel-control-prev:hover,
#hero_carousel .carousel-control-next:hover {
    background: rgba(var(--sys-dark-green-rgb), 0.5);
    transform: translateY(-50%) scale(1.1);
}

#hero_carousel .carousel-control-prev-icon,
#hero_carousel .carousel-control-next-icon {
    width: var(--sys-text-2xl);
    height: var(--sys-text-2xl);
    filter: drop-shadow(0 2px var(--sys-spacing-1) rgba(var(--sys-black-rgb), 0.5));
}

.slide-gradient-white::before {
    content: '';
    position: absolute;
    inset: 0;
    background: hsla(145, 29%, 58%, 1);
    background: linear-gradient(180deg, hsla(145, 29%, 58%, 1) 0%, hsla(125, 28%, 83%, 1) 43%, hsla(0, 0%, 100%, 1) 100%);
    background: -moz-linear-gradient(180deg, hsla(145, 29%, 58%, 1) 0%, hsla(125, 28%, 83%, 1) 43%, hsla(0, 0%, 100%, 1) 100%);
    background: -webkit-linear-gradient(180deg, hsla(145, 29%, 58%, 1) 0%, hsla(125, 28%, 83%, 1) 43%, hsla(0, 0%, 100%, 1) 100%);
    z-index: 1;
    pointer-events: none;
}

.slide-title {
    color: #0b131d;
    text-shadow: none !important;
    text-align: left !important;
    line-height: 1.05;
    margin-bottom: var(--sys-spacing-4);
}

.slide-logo {
    filter: drop-shadow(0 4px 10px rgba(var(--sys-black-rgb), 0.12)) !important;
    max-width: 380px;
    margin-top: var(--sys-spacing-3) !important;
}

.slide-gradient-white img:not(.slide-logo) {
    max-height: 75vh;
    object-fit: contain;
    filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.18)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.08));
}

.slide-gradient-green {
    background: linear-gradient(135deg, var(--sys-dark-green-rgb) 0%, var(--sys-primary-raw) 100%);
    position: relative;
}

.slide-gradient-green::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(var(--sys-white-rgb),0.1) 0%, transparent 60%);
    z-index: 1;
    pointer-events: none;
}

.slide-floating-img {
    max-height: 70vh;
    object-fit: contain;
    filter: drop-shadow(-10px 15px 25px rgba(0, 0, 0, 0.65));
}

/* ── HERO GRID LAYOUT ── */
.hero-slide-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: center;
    width: 80%;
    gap: var(--sys-spacing-4);
    padding: 0 var(--sys-spacing-4);
}

.hero-grid-text-left {
    grid-column: 1 / 6;
    grid-row: 1;
    z-index: 3;
}

.hero-grid-img-right {
    grid-column: 6 / 13;
    grid-row: 1;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.hero-grid-text-right {
    grid-column: 6 / 13;
    grid-row: 1;
    z-index: 3;
}

.hero-grid-img-left {
    grid-column: 1 / 7;
    grid-row: 1;
    z-index: 2;
    display: flex;
    justify-content: center;
}

/* Responsividad para móviles y tablets */
@media (max-width: 991px) {
    .hero-slide-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        align-content: center;
        text-align: center;
        padding-top: var(--sys-spacing-4);
    }

    .hero-grid-text-left, 
    .hero-grid-text-right {
        grid-column: 1;
        grid-row: 1;
        align-self: end;
    }

    .hero-grid-img-right, 
    .hero-grid-img-left {
        grid-column: 1;
        grid-row: 2;
        margin-top: var(--sys-spacing-4);
    }
}

.slide-subtitle {
    font-family: var(--sys-font-headings), sans-serif;
    font-size: clamp(1.3rem, 2.4vw, 2rem);
    color: var(--sys-white-rgb);
    text-shadow: 2px 2px var(--sys-spacing-1) rgba(var(--sys-black-rgb) / 0.7);
    margin-top: var(--sys-spacing-4);
}

.slide-logo {
    max-width: 450px;
    width: 100%;
    height: auto;
    margin-top: var(--sys-spacing-5);
}

.studio-ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(75px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.55;
    transition: opacity 0.5s ease;
}

.glow-left {
    width: 380px;
    height: 380px;
    top: 5%;
    left: 8%;
    background: rgba(33, 168, 110, 0.28);
}

.glow-right {
    width: 550px;
    height: 550px;
    top: 15%;
    right: 10%;
    background: rgba(16, 184, 117, 0.22);
}


.ibd-subtitle-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--sys-spacing-6);
    position: relative;
    z-index: var(--sys-z-raised);
}

.ibd-subtitle-main,
.ibd-subtitle-secondary {
    color: var(--sys-white-rgb);
    font-weight: var(--sys-weight-extrabold);
    text-transform: uppercase;
    text-shadow: 2px 3px 8px rgba(var(--sys-black-rgb), 0.5);
}

.ibd-subtitle-main {
    font-size: clamp(1.3rem, 2.8vw, 2.6rem);
}

.ibd-highlight-bar {
    background-color: rgba(var(--sys-primary-raw) / 0.4);
    color: var(--sys-white-rgb);
    font-weight: var(--sys-weight-bold);
    padding: 0.5em 1.5em;
    font-size: clamp(1.1rem, 2.3vw, 2rem);
    box-shadow: var(--sys-shadow-medium);
    text-transform: uppercase;
    border-bottom: 5px solid rgb(var(--sys-medium-green-rgb));
    border-radius: var(--sys-radius-lg);
    margin: var(--sys-spacing-3) 0;
}

.ibd-subtitle-secondary {
    font-size: clamp(var(--sys-text-base), 2vw, var(--sys-text-xl));
}

/* ── RESPONSIVIDAD GENERAL SECTORIZADA ────────────────────── */
.mascot-stage-container {
    width: 100%;
    max-width: 480px;
}

.studio-spotlight-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(46, 213, 115, 0.38) 0%, rgba(13, 90, 150, 0.12) 65%, transparent 80%);
    border-radius: 50%;
    filter: blur(28px);
    z-index: -1;
    animation: pulseSpotlight 4.5s infinite alternate ease-in-out;
}

.mascot-3d-premium {
    filter: brightness(2.5);
    width: auto;
}

.studio-floor-shadow {
    position: absolute;
    bottom: 20%;
    left: 45%;
    transform: translateX(-50%);
    width: 240px;
    height: 28px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.05) 35%, transparent 100%);
    border-radius: 50%;
    z-index: -2;
}

.hero-studio-title {
    font-size: clamp(1.5rem, 4vw, 3vw);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.text-emerald-glow {
    background: linear-gradient(120deg, #38ef7d 0%, #11b39a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-studio-subtitle {
    font-size: clamp(0.95rem, 1.2vw, 1.18rem);
    color: #d2ebe4;
    font-weight: 400;
    line-height: 1.6;
    max-width: 590px;
}

.banner-dot {
    position: absolute;
    border-radius: var(--sys-radius-full);
    opacity: 0.12;
    pointer-events: none;
}

.banner-left {
    width: 700px;
    height: 700px;
    background-color: rgba(var(--sys-dark-green-rgb));
    top: 100px;
    left: 5%;
}

.banner-right {
    width: 300px;
    height: 300px;
    background-color: rgb(var(--sys-white-rgb));
    top: -160px;
    right: 10%;
}

.slide-inverted-dots.banner-left {
    width: 300px;
    height: 300px;
    background-color: rgb(var(--sys-white-rgb));
    top: -160px;
}

.slide-inverted-dots.banner-right {
    width: 700px;
    height: 700px;
    background-color: rgba(var(--sys-dark-green-rgb));
    top: 100px;
}

@media (max-width: 767px) {
    #hero_section {
        height: auto;
    }

    #hero_carousel .carousel-item {
        height: 55vh;
        min-height: 420px;
    }

    .carousel-caption {
        text-align: center;
        justify-content: center;
    }

    .hero-text-wrapper {
        max-width: 100%;
        padding: 0 var(--sys-spacing-4);
    }

    .slide-logo {
        margin-left: auto;
        margin-right: auto;
        max-width: 260px;
    }
}

@media (max-width: 991px) {
    .slide-studio-premium {
        min-height: auto !important;
        height: auto !important;
        padding: 40px 0 30px 0;
    }
    
    .mascot-3d-premium {
        max-height: 290px !important;
    }
    
    .hero-studio-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 1199px) {
    #hero_carousel .carousel-item {
        height: 68vh;
    }

    .hero-text-wrapper {
        max-width: 650px;
    }
}

/* ── TARJETA CATEGORÍA ──────────────────────── */
.categoria-card-hd {
    width: 175px;
    height: 190px;
    flex: 0 0 175px;
    padding-top: var(--sys-spacing-20) !important;
    /*justify-content: center !important;*/
    color: var(--sys-text-main) !important; /* Fuerza el color oscuro y evita el azul de los links */
    transition: transform var(--duration-normal) ease, box-shadow var(--duration-normal) ease, border-color var(--duration-normal) ease;
}

.categoria-card-hd:hover {
    box-shadow: var(--sys-shadow-card-hover);
    transform: translateY(calc(-1 * var(--sys-spacing-1)));
    border-color: var(--sys-border) !important;
    color: var(--sys-primary) !important; /* Cambia a verde primario en lugar de rojo */
}

/* Reducimos el gap entre las tarjetas específicamente para este carrusel para que estén más unidas */
#carrusel-categorias-global-track {
    gap: var(--sys-spacing-2); /* Menos separación entre tarjetas */
}

.categoria-3d-base {
    position: relative;
    width: 98px;
    height: 50px; 
    background-color: rgba(var(--sys-light-green-rgb) / 0.5); 
    border-radius: 50%;
    box-shadow: 
        0 1px 0 rgba(var(--sys-dark-green-rgb) / 0.2),
        0 2px 0 rgba(var(--sys-dark-green-rgb) / 0.2),
        0 3px 0 rgba(var(--sys-dark-green-rgb) / 0.2),
        0 4px 0 rgba(var(--sys-dark-green-rgb) / 0.2),
        0 5px 0 rgba(var(--sys-dark-green-rgb) / 0.2),
        0 6px 0 rgba(var(--sys-dark-green-rgb) / 0.2),
        0 7px 0 rgba(var(--sys-dark-green-rgb) / 0.2),
        0 15px 12px rgba(0,0,0, 0.15);
    margin: 40px auto 16px auto; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow var(--duration-normal) ease;
}

.categoria-card-hd:hover .categoria-3d-base {
    box-shadow: 
        0 1px 0 rgba(var(--sys-dark-green-rgb) / 0.5),
        0 2px 0 rgba(var(--sys-dark-green-rgb) / 0.5),
        0 3px 0 rgba(var(--sys-dark-green-rgb) / 0.5),
        0 4px 0 rgba(var(--sys-dark-green-rgb) / 0.5),
        0 5px 0 rgba(var(--sys-dark-green-rgb) / 0.5),
        0 6px 0 rgba(var(--sys-dark-green-rgb) / 0.5),
        0 7px 0 rgba(var(--sys-dark-green-rgb) / 0.5),
        0 18px 15px rgba(var(--sys-dark-green-rgb) / 0.2);
}

/* Sombra simulada debajo de la imagen en la superficie de la base */
.categoria-3d-shadow {
    position: absolute;
    width: 54px;
    height: 16px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.08) 65%, rgba(0, 0, 0, 0) 80%);
    border-radius: 50%;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%) scale(1);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 1;
}

.categoria-card-hd:hover .categoria-3d-shadow {
    /* Al elevarse la imagen, la sombra se contrae suavemente y se difumina */
    transform: translateX(-50%) scale(0.72);
    opacity: 0.35;
}

.categoria-3d-base i,
.categoria-3d-base img {
    position: absolute;
    bottom: 10px; 
    left: 50%;
    transform: translate(-50%, 0) scale(1);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    filter: drop-shadow(0 8px 7px rgba(0,0,0,0.18));
    z-index: 2;
}

#carrusel-categorias-global-track .categoria-card-hd:is(:nth-child(1), :nth-child(3), :nth-child(10), :nth-child(11), :nth-child(12)) .categoria-3d-base img { 
    bottom: 6px;
}

.categoria-3d-base img {
    max-height: 92px;
    max-width: 112px;
    width: auto;
    object-fit: contain;
}

.categoria-3d-base i {
    font-size: 3.2rem !important;
}

.categoria-card-hd:hover .categoria-3d-base i,
.categoria-card-hd:hover .categoria-3d-base img {
    transform: translate(-50%, -5px) scale(1.2);
    filter: drop-shadow(0 15px 13px rgba(0, 0, 0, 0.24));
}