/* --- Variables y Reset --- */
:root {
    --color-blue-primary: #013840;   /* Azul primario */
    --color-green-primary: #033605;  /* Verde primario */
    --color-green-secondary: #BACE00; /* Verde secundario */
    
    --color-white: #ffffff;
    --color-bg-cream: #FBF9EE;
    
    --font-primary: 'Clash Display', sans-serif;
    --font-secondary: 'Work Sans', sans-serif;
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--color-bg-cream);
    color: #333;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

h1, h2, h3 {
    font-family: var(--font-primary);
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

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

/* --- Header / Hero --- */
.hero {
    position: relative;
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    padding-bottom: 60px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 110%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    object-position: center center;
    z-index: 1;
    filter: brightness(0.55);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 110%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2;
    pointer-events: none;
}

.navbar, .hero-content, .hero-bottom-bar {
    position: relative;
    z-index: 2;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 40px;
    width: 100%;
    max-width: 100%;
}

.logos {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logos img {
    height: 40px;
}

.logo-ea {
    height: 60px !important;
}

.divider {
    color: var(--color-white);
    font-size: 24px;
    font-weight: 300;
}

.btn-portal {
    background-color: var(--color-green-secondary);
    color: var(--color-blue-primary);
    padding: 6px 12px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.hero-content {
    text-align: center;
    margin-top: auto;
    margin-bottom: auto;
    max-width: 1000px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    word-wrap: break-word;
}

.hero-text {
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.hero-text-small {
    font-size: 0.9rem;
    margin-bottom: 30px;
    opacity: 0.9;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.btn-cta {
    display: inline-block;
    background-color: var(--color-white);
    color: #000;
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.hero-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 31px;
    background: linear-gradient(to right, var(--color-green-primary) 85%, var(--color-green-secondary) 85%);
}

/* --- Section: ¿Qué es? --- */
.about {
    padding: 60px 15px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.about h2 {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 20px;
    color: #000;
}

.about p {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 15px;
    color: #555;
}

.video-placeholder {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    background-color: #000;
}

.video-placeholder video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

/* --- Section: Te ofrecemos --- */
.card-offer {
    width: 85%; 
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    border: none;
}

.card-offer.card-lime {
    width: 85%;
    margin: 0;
}

.card-offer .icon img {
    width: 80px;
    height: auto;
}

.card-offer h3 {
    font-size: 1.3rem;
}

.offer {
    padding: 40px 15px;
}

.offer h2 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 30px;
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.card {
    padding: 30px;
    border-radius: 25px;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 250px;
}

.card-dark {
    background-color: var(--color-blue-primary);
}

.card-lime {
    background-color: var(--color-green-secondary);
    color: var(--color-blue-primary);
}

.card .icon {
    margin-bottom: 20px;
}

.card .icon img {
    width: 79px;
    height: auto;
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.card h3 span {
    font-weight: 400;
}

/* --- CTA Footer Section --- */
.cta-footer {
    position: relative;
    padding: 0;
    overflow: visible;
}

.cta-footer-content {
    position: relative;
    z-index: 2;
    padding-bottom: 40px;
}

.cta-text {
    text-align: left;
}

.cta-text h2 {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.1;
    color: #000;
}

.underline-text {
    font-weight: 500 !important;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    margin-bottom: 30px;
}

.btn-cta-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 420px;
    height: 76px;
    margin: 0 auto;
    padding: 20px 32px;
    border: 3px solid var(--color-green-primary);
    color: var(--color-green-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 24px;
    background: transparent;
    background-color: var(--color-white);
    box-shadow:
        0 12px 20px rgba(0, 0, 0, 0.35),
        0 24px 40px -10px rgba(0, 0, 0, 0.45);
    border-radius: 8px;
    gap: 8px;
}

.bg-decoration {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 255px;
    background-image: url('../images/ae-movil.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center bottom;
    z-index: 1;
    pointer-events: none;
    margin-top: -30px;
    margin-bottom: -30px;
    clip-path: inset(0 0 30px 0);
}

/* --- Footer --- */
footer {
    background-color: var(--color-blue-primary);
    color: var(--color-white);
    padding-bottom: 40px;
}

.footer-bar {
    height: 31px;
    width: 100%;
    background: linear-gradient(to right, var(--color-green-secondary) 15%, var(--color-green-primary) 15%);
    margin-bottom: 40px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-logos img {
    height: 50px;
}

.footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.footer-contact a {
    color: var(--color-white);
    text-decoration: underline;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 1rem;
}

.footer-links a {
    text-align: left;
    color: var(--color-white);
    text-decoration: none;
}

/* =========================================
   MEDIA QUERIES (Responsive Design)
   ========================================= */

/* Tablet y Desktop (min-width: 768px) */
@media (min-width: 768px) {
    
    /* Hero */
    .hero-content h1 {
        font-size: 3.5rem;
        text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.9);
    }

    /* About Section: Lado a lado */
    .about {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .about-content {
        width: 45%;
    }
    
    .about-video {
        width: 50%;
    }

    /* Cards Grid: 4 columnas en una fila */
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .card {
        padding: 20px;
    }

    /* Restaurar tamaños originales para Desktop en card-offer */
    .card-offer .icon img {
        width: 60px;
    }

    .card-offer h3 {
        font-size: 13px;
    }

    .card-offer {
        width: 95% !important;
    }

    /* Footer Layout */
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .footer-links {
        text-align: right;
    }

    /* Restaurar tamaños para Desktop */
    .logos img {
        height: 60px;
    }

    .btn-portal {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Ajustes específicos para Desktop Grande (como la imagen desktop) */
@media (min-width: 1024px) {
    .container {
        width: 95%;
    }

    .hero {
        align-items: center;
    }

    .card {
        padding: 30px;
    }

    /* Ajuste específico para Laptop (1024px) donde 4 columnas son estrechas */
    .card-offer h3 {
        font-size: 1rem;
    }
    
    .card-offer .icon img {
        width: 50px;
    }

    .cta-footer {
        padding: 95px 0;
    }

    .cta-footer-content {
        display: flex;
        align-items: center;
        padding-bottom: 0;
    }
    
    .cta-text {
        width: 60%;
        text-align: left;
    }

    .btn-cta-outline {
        margin: 0;
    }
    
    .bg-decoration {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 600px;
        height: 600px;
        max-width: none;
        margin-bottom: 0;
        background-image: url('../images/andalucia-emprende-grande.svg');
        background-size: contain;
        background-position: right bottom;
        margin-bottom: -30px;
    }
}

/* Fix para pantallas muy pequeñas (iPhone SE, Galaxy Fold, etc.) */
@media (max-width: 375px) {
    .cta-text h2 {
        font-size: 1.6rem;
    }
    
    .btn-cta-outline {
        max-width: 100%;
        width: 100%;
        font-size: 18px;
        padding: 16px 20px;
        height: auto;
    }
}

@media (max-width: 359px) {
    .logo-header-ea {
        height: 30px !important;
    }
    .btn-portal {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
}