/* ===================================
   VARIABLES & RESET
   =================================== */
:root {
    /* Paleta de colores principal - Teal/Verde azulado */
    --primary-teal: #0A6C6F;
    --primary-teal-dark: #084F52;
    --primary-teal-light: #0D8B8F;
    --secondary-teal: #7ED4D6;
    --accent-cyan: #5BC8CC;
    
    /* Colores complementarios */
    --bg-light: #F5F9FA;
    --bg-lighter: #E8F4F5;
    --white: #FFFFFF;
    --text-dark: #1A2B2E;
    --text-gray: #5A6C6F;
    --text-light: #8B9FA2;
    --logo-bg: #E6E6E6;
    
    /* Tipografía */
    --font-primary: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-special: 'MuseoModerno', cursive;
    
    /* Espaciados */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-xxl: 6rem;
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-menu: 81.5px;
    --radius-hero: 100px;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(10, 108, 111, 0.08);
    --shadow-md: 0 4px 16px rgba(10, 108, 111, 0.12);
    --shadow-lg: 0 8px 32px rgba(10, 108, 111, 0.16);
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

/* ===================================
   CONTAINER & LAYOUT
   =================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */
.header {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0px;
}

.header.scrolled {
    position: fixed;
    top: 0;
    padding: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.header-wrapper {
    margin: 0 60px;
    background: var(--white);
    border-radius: var(--radius-menu);
    box-shadow: var(--shadow-md);
    transition: margin 0.5s ease-out, border-radius 0.5s ease-out;
}

.header.scrolled .header-wrapper {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    gap: clamp(0.5rem, 2vw, 2rem);
}

.navbar-brand {
    background: var(--logo-bg);
    border-radius: var(--radius-menu);
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: border-radius 0.5s ease-out;
}

.header.scrolled .navbar-brand {
    border-radius: 0;
}

.navbar-brand .logo {
    width: 300px;
    height: auto;
    max-width: 100%;
    transition: width 0.5s ease-out;
}

.header.scrolled .navbar-brand .logo {
    width: 200px;
}

.nav-menu {
    display: none;
    list-style: none;
    gap: clamp(0.5rem, 1.5vw, 2rem);
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.nav-link {
    color: var(--primary-teal);
    font-weight: 500;
    font-size: clamp(0.875rem, 1.2vw, 2rem);
    padding: var(--spacing-xs) clamp(0.5rem, 0.8vw, var(--spacing-sm));
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-teal-dark);
    background-color: var(--bg-lighter);
}

.btn-access {
    background: var(--primary-teal);
    color: var(--white);
    padding: clamp(0.5rem, 0.8vw, 0.75rem) clamp(1rem, 1.5vw, 1.5rem);
    border-radius: 50px;
    font-weight: 600;
    font-size: clamp(0.875rem, 1.2vw, 2rem);
    transition: var(--transition-normal);
    white-space: nowrap;
    margin-right: clamp(1rem, 2.5vw, 40px);
}

.btn-access:hover {
    background: var(--primary-teal-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Responsive logo sizes */
@media (max-width: 1400px) {
    .navbar-brand .logo {
        width: 280px;
    }
}

@media (max-width: 1200px) {
    .navbar-brand .logo {
        width: 230px;
    }
}

@media (max-width: 1024px) {
    .navbar-brand .logo {
        width: 200px;
    }
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-teal);
    border-radius: 3px;
    transition: var(--transition-fast);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

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

/* Mobile styles */
@media (max-width: 960px) {
    .header {
        position: fixed;
        top: 0;
        padding: 0;
        background: var(--white);
        box-shadow: var(--shadow-lg);
    }

    .header-wrapper {
        margin: 0;
        border-radius: 0;
    }

    .navbar {
        padding: 0;
    }

    .navbar-brand {
        padding: 0.5rem 1rem;
        border-radius: 0;
    }

    .navbar-brand .logo {
        width: 200px;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--white);
        padding: var(--spacing-md);
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: var(--transition-normal);
    }

    .nav-menu.active {
        display: flex;
        transform: translateX(0);
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: var(--spacing-sm);
        font-size: 1rem;
    }
    
    .btn-access {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
        margin-right: 0;
    }
}

@media (min-width: 961px) {
    .nav-menu {
        display: flex;
    }

    .mobile-menu-toggle {
        display: none;
    }
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hero-bg-wrapper {
    position: relative;
    width: 100%;
    height: 90%;
    min-height: 96vh;
    background-image: url('../images/landing/especializacion-veterinaria.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--radius-hero);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 0 var(--spacing-xl);
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: var(--spacing-lg);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-title .letter-normal {
    font-family: var(--font-primary);
}

.hero-title .letter-museo {
    font-family: var(--font-special);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--white);
    line-height: 1.8;
    font-weight: 400;
    opacity: 0.95;
    max-width: 700px;
}

/* Mobile hero styles */
@media (max-width: 960px) {
    .hero {
        padding: 0;
        min-height: 100vh;
    }

    .hero-bg-wrapper {
        border-radius: 0;
        min-height: 100vh;
    }

    .hero-content-wrapper {
        padding: 0 var(--spacing-md);
        padding-top: 120px;
    }

    .hero-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

@media (min-width: 961px) and (max-width: 1023px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.35rem;
    }
}

/* ===================================
   SECTION TITLES
   =================================== */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    background: var(--primary-teal);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: var(--spacing-lg);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title.center {
    display: block;
    text-align: center;
    margin: 0 auto var(--spacing-lg);
}

@media (max-width: 767px) {
    .section-title {
        font-size: 1.5rem;
        padding: 0.75rem 2rem;
    }
}

/* ===================================
   ¿QUÉ ES? SECTION
   =================================== */
.what-is {
    padding: 60px;
    background: var(--white);
}

.what-is-container {
    width: 100%;
    margin: 0 auto;
}

.what-is-grid {
    display: grid;
    grid-template-columns: 4fr 8fr;
    gap: 0;
    align-items: end;
}

.what-is-image-wrapper {
    position: relative;
    align-self: stretch;
}

.what-is-image {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    background-image: url('../images/landing/veterinaria-caballo.jpg');
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;
    border-radius: 52px;
    box-shadow: var(--shadow-lg);
}

.what-is-content-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.what-is-content {
    position: relative;
    background: #E6E6E6;
    border-radius: 52px;
    padding: 80px 60px 60px 60px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.what-is-title {
    position: relative;
    margin: -140px auto 50px;
    background: #005F63;
    color: var(--white);
    padding: 25px 50px;
    border-radius: 30px;
    font-size: 42px;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.content-main {
    text-align: center;
    margin-bottom: 0;
}

.content-title {
    color: #005F63;
    font-family: var(--font-primary);
    font-weight: 900;
    font-size: 25px;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.content-text {
    color: #22A796;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 25px;
    line-height: 1.5;
    margin: 0;
}

.content-text strong {
    font-weight: 900;
}

.content-standards {
    text-align: center;
    margin-top: 2rem;
}

.standards-title {
    color: #005F63;
    font-family: var(--font-primary);
    font-weight: 900;
    font-size: 25px;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

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

.badge {
    background: var(--primary-teal);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
}

.badge-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.badge-logo:hover {
    transform: scale(1.05);
}

/* Responsive para ¿Qué es? */
@media (max-width: 960px) {
    .what-is {
        padding: 0px;
    }

    .what-is-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .what-is-image-wrapper {
        display: none;
    }

    .what-is-title {
        font-size: 1rem;
        padding: 25px 40px;
        margin: -60px auto 20px;
    }

    .what-is-title .letter-museo {
        font-size: 1rem;
    }

    .what-is-content {
        padding: 20px;
        border-radius: 0;
        margin-top: 0;
    }

    .content-title,
    .content-text,
    .standards-title {
        font-size: 1rem;
    }

    .badge {
        font-size: 0.9rem;
        padding: 0.6rem 1.5rem;
    }

    .badge-logo {
        height: 40px;
        margin-bottom: 20px;
    }

    .badges {
        display: flex;
        gap: 2rem;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
    }
}

/* ===================================
   VENTAJAS SECTION
   =================================== */
.advantages {
    padding: 60px 0 80px;
    background: var(--white);
}

@media all and (min-width:960px) {
    .advantages {
        background: url('/assets/images/landing/mano-pata.png');
        background-position: top center;
        background-size: contain;
        background-repeat: no-repeat;
    }
    .what-is{
        margin-bottom: -100px;
    }
}

@media all and (min-width:1200px){
    .advantages-title {
        margin-top: 25%!important;
    }
}

@media all and (min-width:960px) and (max-width: 1199px) {
    .advantages-title {
        margin-top: 10%!important;
    }
    .intro-text{
        font-size: 30px!important;
        margin-top: 20px!important;
    }
    .timeline-content h3{
        font-size: 20px!important;
    }
    .timeline {
        padding: 0!important;
    }
    span.letter-normal, span.letter-museo {
        font-size: 2rem !important;
    }
    section#especializaciones {
        padding: 30px!important;
        margin: 20px!important;
    }
    .card-background {
        height: 400px!important;
    }
    .card-expanded-text {
        font-size: 16px!important;
    }
    .card-expanded-inner {
        padding: 20px 0!important;
    }
    .specializations-grid.has-expanded{
        min-height: 400px!important;
    }
    p {
        font-size: 1rem !important;
    }
}

.advantages-wrapper {
    width: 100%;
    max-width: 100%;
}

.advantages-intro {
    padding: 0 60px;
    margin-bottom: 40px;
}

.intro-text {
    font-family: var(--font-primary);
    font-size: 40px;
    font-weight: 700;
    color: #005F63;
    line-height: 1.4;
    margin: 0;
}

.advantages-image-wrapper {
    width: 100%;
    padding: 0;
    margin-bottom: 0;
}

.advantages-image {
    width: 100%;
    height: auto;
    display: block;
}

.advantages-content {
    padding: 0 60px;
    position: relative;
}

.advantages-title {
    display: inline-block;
    background: #005F63;
    color: var(--white);
    padding: 20px 50px;
    border-radius: 12px;
    font-size: 42px;
    text-transform: uppercase;
    box-shadow: var(--shadow-md);
    margin: -50px auto 40px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.advantages-title .letter-museo {
    font-family: var(--font-special);
    font-weight: 600;
    font-size: 42px;
}

.advantages-title .letter-normal {
    font-family: var(--font-primary);
    font-weight: 900;
    font-size: 42px;
}

.timeline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 40px 60px;
}

.timeline-item {
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-item:nth-child(1) {
    background: #E6E6E6;
}

.timeline-item:nth-child(3) {
    background: var(--white);
    border: 1px solid #000000;
}

.timeline-item:nth-child(5) {
    background: #DFF9F6;
}

.timeline-item:nth-child(7) {
    background: #F2F2F2;
}

.timeline-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.timeline-content {
    width: 100%;
}

.timeline-content h3 {
    color: var(--text-dark);
    font-size: 31px;
    font-weight: 600;
    line-height: 1.3;
}

.timeline-item {
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-item:nth-child(1) {
    background: #E6E6E6;
}

.timeline-item:nth-child(3) {
    background: var(--white);
    border: 1px solid #000000;
}

.timeline-item:nth-child(5) {
    background: #DFF9F6;
}

.timeline-item:nth-child(7) {
    background: #F2F2F2;
}

.timeline-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.timeline-content {
    width: 100%;
}

.timeline-content h3 {
    color: var(--text-dark);
    font-size: 31px;
    font-weight: 600;
    line-height: 1.3;
}

.timeline-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--primary-teal);
    font-weight: bold;
}

@media (min-width: 768px) {
    .timeline {
        grid-template-columns: 1fr 40px 1fr 40px 1fr 40px 1fr;
        align-items: stretch;
        gap: 0;
    }

    .timeline-item {
        grid-column: span 1;
        height: 100%;
    }

    .timeline-arrow {
        transform: rotate(0deg);
        grid-column: span 1;
    }
}

@media (max-width: 767px) {
    .timeline {
        padding: 40px 30px;
    }

    .timeline-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 767px) {
    .intro-text {
        font-size: 15px;
    }

    .advantages {
        padding: 30px 0;
        background: url(/assets/images/landing/mano-pata.png);
        background-size: contain;
        background-repeat: no-repeat;
        background-position: top center;
    }

    .advantages-image-wrapper{
        display: none;
    }

    .advantages-title {
        font-size: 1rem;
        padding: 15px 30px;
        margin: 0px;
    }

    .advantages-title .letter-museo,
    .advantages-title .letter-normal {
        font-size: 1rem;
    }

    .advantages-intro,
    .advantages-content {
        padding: 0 30px;
    }

    .timeline {
        gap: 0px;
    }

    .timeline-content h3 {
        font-size: 1rem;
    }
}

/* ===================================
   ESPECIALIZACIONES SECTION
   =================================== */
.specializations {
    padding: 48px;
    background: linear-gradient(135deg, #DFF9F6 0%, #F2F2F2 50%, #DFF9F6 100%);
    margin: 60px;
    border-radius: 52px;
}

.specializations-wrapper {
    width: 100%;
    max-width: 100%;
}

.specializations-content {
    position: relative;
    padding: 50px 0;
}

.specializations-title {
    background: #005F63;
    color: var(--white);
    padding: 20px 50px;
    border-radius: 12px;
    font-size: 42px;
    text-transform: uppercase;
    box-shadow: var(--shadow-md);
    margin: -150px auto 40px;
    display: inherit;
    width: fit-content;
}

.specializations-title .letter-museo {
    font-family: var(--font-special);
    font-weight: 600;
    font-size: 42px;
}

.specializations-title .letter-normal {
    font-family: var(--font-primary);
    font-weight: 900;
    font-size: 42px;
}

.specializations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
}

.specialization-card {
    position: relative;
    border-radius: 52px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease-out;
    grid-column: span 1;
}

.specialization-card:hover:not(.expanded):not(.expanding) {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* Fase 1: Preparación - ligera expansión */
.specialization-card.expanding-phase-1 {
    transform: scale(1.1);
    transition: transform 0.4s ease-out;
    z-index: 50;
}

/* Fase 2: Expansión completa con aceleración */
.specialization-card.expanding-phase-2 {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 100;
    transform: scale(1);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Estado expandido final */
.specialization-card.expanded {
    position: absolute;
    z-index: 100;
    transform: scale(1);
    grid-column: 1 / -1;
    left: 0;
    right: 0;
    top: 0;
}

.specializations-grid.has-expanded {
    min-height: 600px;
}

/* Fade out de las tarjetas ocultas */
.specialization-card.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.card-background {
    position: relative;
    height: 600px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.card-arrow-link {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    transition: var(--transition-normal);
}

.card-arrow-link:hover {
    transform: translateX(-50%) scale(1.1);
}

.card-arrow {
    display: block;
    width: auto;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 20px;
    padding: 50px 30px;
}

/* Overlay negro para modo expandido */
.card-overlay-dark {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in;
    z-index: 2;
}

/* Fase 1: Aparece el overlay y se mantiene */
.specialization-card.expanding-phase-1 .card-overlay-dark,
.specialization-card.expanding-phase-2 .card-overlay-dark,
.specialization-card.expanded .card-overlay-dark {
    opacity: 1;
}

.specialization-card.expanded .card-overlay-dark {
    pointer-events: all;
}

.card-title {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease-out;
}

/* Fase 1: Desaparece el título */
.specialization-card.expanding-phase-1 .card-title {
    opacity: 0;
}

.card-link-wrapper {
    width: 100%;
    transition: opacity 0.3s ease-out;
}

/* Fase 1: Desaparece el botón */
.specialization-card.expanding-phase-1 .card-link-wrapper {
    opacity: 0;
}

.card-link {
    display: block;
    background: var(--secondary-teal);
    color: var(--primary-teal-dark);
    text-align: center;
    padding: 5px 0;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition-fast);
    cursor: pointer;
}

.card-link:hover {
    background: var(--accent-cyan);
    color: var(--white);
}

.card-link-disabled {
    background: #999;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

.card-link-disabled:hover {
    background: #999;
    color: #666;
}

/* Mostrar enlace desktop solo en desktop, mobile solo en mobile */
.card-link-mobile {
    display: none;
}

.card-link-desktop {
    display: block;
}

.card-arrow-disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.card-arrow-disabled:hover {
    transform: translateX(-50%) scale(1) !important;
}

@media (max-width: 960px) {
    .card-link-mobile {
        display: block;
    }
    
    .card-link-desktop {
        display: none;
    }
}

/* Contenido expandido */
.card-expanded-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out 0.2s, transform 0.5s ease-out 0.2s;
    display: flex;
    align-items: stretch;
}

/* Fase 2: Aparece el contenido expandido con efecto */
.specialization-card.expanding-phase-2 .card-expanded-content {
    opacity: 1;
    transform: translateY(0);
}

.specialization-card.expanded .card-expanded-content {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.card-expanded-inner {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 8fr 3fr;
    padding: 60px 0;
}

.card-expanded-spacer-left {
    grid-column: 1;
}

.card-expanded-body {
    grid-column: 2;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-expanded-spacer-right {
    grid-column: 3;
}

.card-expanded-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-expanded-title {
    font-family: var(--font-primary);
    font-weight: 900;
    font-size: 35px;
    color: var(--white);
    margin: 0;
    line-height: 1.2;
}

.card-expanded-arrow {
    width: 30px;
    height: auto;
    cursor: pointer;
    transform: rotate(180deg);
    transition: var(--transition-normal);
}

.card-expanded-arrow:hover {
    transform: rotate(180deg) scale(1.1);
}

.card-expanded-text {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 20px;
    color: var(--white);
    line-height: 1.6;
}

.card-expanded-text p {
    margin-bottom: 20px;
}

.card-expanded-text p:last-child {
    margin-bottom: 0;
}

.card-expanded-footer {
    display: flex;
    align-items: flex-end;
}

.card-expanded-button {
    display: inline-block;
    background: var(--secondary-teal);
    color: var(--primary-teal-dark);
    padding: 10px 40px;
    font-weight: 600;
    font-size: 18px;
    border-radius: 8px;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.card-expanded-button:hover {
    background: var(--accent-cyan);
    color: var(--white);
}

.card-expanded-button-disabled {
    display: inline-block;
    background: #999;
    color: #666;
    padding: 10px 40px;
    font-weight: 600;
    font-size: 18px;
    border-radius: 8px;
    cursor: not-allowed;
    opacity: 0.7;
    border: none;
}

/* Ocultar contenido normal cuando está expandido */
.specialization-card.expanded .card-overlay {
    opacity: 0;
    pointer-events: none;
}

.specialization-card.expanded .card-arrow-link {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 960px) {
    .specializations {
        padding: 30px;
        margin: 0;
        border-radius: 0;
    }

    .specializations-content {
        padding: 30px 0;
    }

    .specializations-title {
        font-size: 1rem;
        padding: 15px 30px;
        margin: -50px auto 30px;
    }

    .specializations-title .letter-museo,
    .specializations-title .letter-normal {
        font-size: 1rem;
    }

    .specializations-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .card-background {
        height: 250px;
    }

    .specialization-card {
        border-radius: 30px;
    }

    .card-arrow-link {
        display: none;
    }

    .card-arrow {
        height: 30px;
    }

    .card-overlay {
        padding: 30px 20px;
    }

    .card-link {
        padding: 3px 0;
    }

    /* Ajustes para contenido expandido en mobile */
    .card-expanded-inner {
        grid-template-columns: 1fr;
        padding: 40px 30px;
    }

    .card-expanded-spacer-left,
    .card-expanded-spacer-right {
        display: none;
    }

    .card-expanded-body {
        grid-column: 1;
    }

    .card-expanded-title {
        font-size: 24px;
    }

    .card-expanded-text {
        font-size: 18px;
    }

    .card-expanded-button {
        font-size: 16px;
        padding: 8px 30px;
    }

    .specializations-grid.has-expanded {
        min-height: 500px;
    }
}

/* ===================================
   BENEFICIOS SECTION
   =================================== */
.benefits {
    padding: 60px;
    background: var(--white);
}

.benefits-wrapper {
    width: 100%;
    max-width: 100%;
}

.benefits-title {
    display: inline-block;
    background: #005F63;
    color: var(--white);
    padding: 20px 50px;
    border-radius: 12px;
    font-size: 42px;
    text-transform: uppercase;
    box-shadow: var(--shadow-md);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin: 0 auto 40px;
    text-align: center;
}

.benefits-title .letter-museo {
    font-family: var(--font-special);
    font-weight: 600;
    font-size: 42px;
}

.benefits-title .letter-normal {
    font-family: var(--font-primary);
    font-weight: 900;
    font-size: 42px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: stretch;
}

.benefits-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.benefit-item {
    background: #DFF9F6;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.benefit-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.benefit-item p {
    color: #005F63;
    font-family: var(--font-primary);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.benefits-image {
    background-image: url('../images/landing/cerdo.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 52px;
    min-height: 100%;
}

@media (max-width: 960px) {
    .benefits {
        padding: 30px;
    }

    .benefits-title {
        font-size: 1rem;
        padding: 15px 30px;
        margin-bottom: 30px;
    }

    .benefits-title .letter-museo,
    .benefits-title .letter-normal {
        font-size: 1rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .benefits-image {
        display: none;
    }

    .benefit-item p {
        font-size: 1rem;
    }
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: var(--primary-teal-dark);
    color: var(--white);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    text-align: center;
}

.footer-logo img {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-info p {
    margin: 0.25rem 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ===================================
   ANIMATIONS & UTILITIES
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--primary-teal);
    outline-offset: 2px;
}
