/*
 * Hoja de estilos para Oretana Formación - VERSIÓN RESPONSIVE MEJORADA
 * Optimizada completamente para móviles, tablets y desktop
 */

:root {
    --color-primary: #3d5ba9;
    --color-primary-dark: #2c4376;
    --color-secondary: #6c8cd5;
    --color-light: #ffffff;
    --color-dark: #0d141a;
    --color-grey: #f5f6fa;
    --footer-bg: #5e7dad;
    --border-radius: 8px;
    --transition: 0.3s ease;
    --navbar-height: 80px;
    --navbar-height-mobile: 70px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    color: var(--color-dark);
    background: var(--color-light);
    line-height: 1.6;
    font-size: 16px;
}

/* Contenedor responsive */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ========================================
   NAVBAR RESPONSIVE MEJORADO
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0;
    height: var(--navbar-height);
}

.navbar-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(94, 125, 173, 0.1);
    transition: all 0.4s ease;
}

.navbar.scrolled {
    height: 60px;
    box-shadow: 0 4px 20px rgba(94, 125, 173, 0.15);
}

.navbar.scrolled .navbar-background {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(94, 125, 173, 0.2);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 0 20px;
}

/* Logo responsive */
.logo-container {
    position: relative;
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    padding: 8px;
    transition: all 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
    background: rgba(94, 125, 173, 0.05);
}

.site-logo {
    height: 45px;
    width: auto;
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(94, 125, 173, 0.2));
    max-width: 200px;
}

.navbar.scrolled .site-logo {
    height: 35px;
}

/* Menú hamburguesa para móvil */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    justify-content: space-between;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translateY(9px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-9px);
}

/* Navegación principal */
.nav {
    position: relative;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--color-dark);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
}

.link-text {
    position: relative;
    transition: all 0.3s ease;
}

.link-underline {
    position: absolute;
    bottom: 6px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #5e7dad, #7a94c2);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-link:hover .link-underline,
.nav-link.active .link-underline {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: #5e7dad;
    transform: translateY(-2px);
}

/* Dropdown mejorado */
.dropdown {
    position: relative;
}

.dropdown-icon {
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #5e7dad;
}

.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(94, 125, 173, 0.2);
    border: 1px solid rgba(94, 125, 173, 0.1);
    padding: 12px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    list-style: none;
    margin: 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--color-dark);
    font-weight: 400;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.dropdown-link:hover {
    color: #5e7dad;
    background: rgba(94, 125, 173, 0.05);
}

/* ========================================
   HERO SECTION RESPONSIVE
   ======================================== */

.hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-light);
    text-align: center;
    overflow: hidden;
    margin-top: var(--navbar-height);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
    padding: 0 20px;
}

.hero-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
    margin-bottom: 60px;
}

.hero-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 25px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.hero-card:hover {
    transform: translateY(-10px) scale(1.03);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.3), rgba(80, 200, 120, 0.2));
    border-color: rgba(74, 144, 226, 0.5);
    box-shadow: 0 15px 35px rgba(74, 144, 226, 0.2);
}

.hero-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: var(--color-light);
    font-weight: 600;
}

.hero-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #e6e6e6;
    line-height: 1.4;
}

/* ========================================
   SERVICES SECTION RESPONSIVE
   ======================================== */

.services-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 80px 0;
}

.parallax-background {
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 120%;
    background-image: url('images/imagen_servicios.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    z-index: -2;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(248, 249, 250, 0.8));
    backdrop-filter: blur(1px);
    z-index: -1;
}

.services-content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
}

.section-title {
    font-size: 2.5rem;
    color: var(--color-primary-dark);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
    color: var(--color-dark);
    font-size: 1.1rem;
    line-height: 1.7;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.service-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    color: var(--color-primary-dark);
    margin-bottom: 15px;
    font-weight: 600;
}

.services-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.service-secondary-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--color-primary);
    transition: all 0.3s ease;
}

/* ========================================
   MISSION SECTION RESPONSIVE
   ======================================== */

.mission {
    padding: 80px 0;
    background: var(--color-grey);
}

.mission-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.mission-col h3 {
    margin-top: 0;
    color: var(--color-primary-dark);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.mission-image {
    grid-column: 1 / -1;
    margin-top: 20px;
}

.mission-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: var(--border-radius);
    object-fit: cover;
}

/* ========================================
   FOOTER RESPONSIVE MEJORADO
   ======================================== */

/* Pie de página mejorado */
.footer {
    background: var(--footer-bg);
    color: var(--color-light);
    padding: 60px 0 20px;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

/* Ondas decorativas animadas */
.footer-waves {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 100px;
    overflow: hidden;
    z-index: 0;
}

.wave {
    position: absolute;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(94, 125, 173, 0.1), transparent);
    animation: wave 15s ease-in-out infinite;
}

.wave-1 {
    animation-delay: 0s;
    opacity: 0.7;
}

.wave-2 {
    animation-delay: -7.5s;
    opacity: 0.5;
}

@keyframes wave {
    0%, 100% { transform: translateX(-50%) translateY(0px) rotate(0deg); }
    25% { transform: translateX(-45%) translateY(-10px) rotate(1deg); }
    50% { transform: translateX(-50%) translateY(0px) rotate(0deg); }
    75% { transform: translateX(-55%) translateY(-5px) rotate(-1deg); }
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.footer-col {
    flex: 1;
    min-width: 250px;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.footer-col:nth-child(1) { animation-delay: 0.2s; }
.footer-col:nth-child(2) { animation-delay: 0.4s; }
.footer-col:nth-child(3) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo mejorado */
.footer-logo {
    position: relative;
    margin-bottom: 15px;
}

.footer-logo h3 {
    margin: 0;
    color: var(--color-light);
    font-size: 1.4rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.logo-accent {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #5e7dad, rgba(94, 125, 173, 0.3));
    margin-top: 5px;
    border-radius: 2px;
    animation: logoAccent 2s ease-in-out infinite alternate;
}

@keyframes logoAccent {
    0% { width: 30px; opacity: 0.7; }
    100% { width: 60px; opacity: 1; }
}

/* Encabezados de sección con iconos */
.footer-col h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--color-light);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.section-icon {
    font-size: 1.1rem;
    color: #5e7dad;
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-col:hover .section-icon {
    transform: scale(1.1) rotate(5deg);
    color: #7a94c2;
}

/* Texto y enlaces base */
.footer-col p, .footer-col a, .footer-col li {
    color: var(--color-light);
    text-decoration: none;
    line-height: 1.7;
    transition: color 0.3s ease;
}

.footer-col p {
    opacity: 0.9;
    margin-bottom: 20px;
}

/* Información de contacto mejorada */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-icon {
    font-size: 1.1rem;
    color: #5e7dad;
    min-width: 20px;
    transition: color 0.3s ease;
}

.contact-item:hover .contact-icon {
    color: #7a94c2;
}

.contact-item a:hover {
    color: #ffffff;
}

/* Enlaces legales mejorados */
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legal-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    transition: all 0.3s ease;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.legal-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: rgba(94, 125, 173, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.legal-link:hover::before {
    width: 100%;
}

.legal-link:hover {
    transform: translateX(5px);
    color: #ffffff !important;
    padding-left: 12px;
}

.link-arrow {
    font-size: 0.9rem;
    color: #5e7dad;
    transition: transform 0.3s ease;
}

.legal-link:hover .link-arrow {
    transform: translateX(3px);
    color: #7a94c2;
}

/* Iconos sociales mejorados */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(94, 125, 173, 0.2);
    color: var(--color-light);
    font-size: 1.3rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    border: 2px solid transparent;
}

.social-icon:hover {
    transform: translateY(-8px) scale(1.1);
    background: #5e7dad;
    border-color: rgba(94, 125, 173, 0.3);
    box-shadow: 0 10px 25px rgba(94, 125, 173, 0.4);
    color: white;
}

.social-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.social-icon:hover .social-ripple {
    width: 100px;
    height: 100px;
}

/* Copyright mejorado */
.copyright {
    text-align: center;
    margin-top: 40px;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 25px;
    position: relative;
}

.copyright-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.copyright-decoration {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.6;
}

.decoration-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #5e7dad;
    animation: pulse 2s ease-in-out infinite;
}

.decoration-line {
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #5e7dad, transparent);
}

.decoration-dot:nth-child(odd) {
    animation-delay: 0.5s;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Responsivo */
@media (max-width: 768px) {
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-grid {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-col {
        min-width: auto;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .copyright-content {
        font-size: 0.8rem;
    }
}

/* CONTACTO */
.contact-form-section {
    background: var(--color-grey);
}
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    margin-top: 30px;
}
.contact-form {
    flex: 1;
    min-width: 280px;
    background: var(--color-light);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.contact-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--color-primary-dark);
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: inherit;
    resize: vertical;
}
.contact-form button {
    background: var(--color-primary);
    color: var(--color-light);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition);
}
.contact-form button:hover {
    background: var(--color-primary-dark);
}
.contact-image {
    flex: 1;
    min-width: 280px;
}
.contact-image img {
    width: 100%;
    border-radius: var(--border-radius);
    object-fit: cover;
}

/* Ubicación */
.location-section {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
}
.location-details {
    flex: 1;
    min-width: 280px;
}
.location-details h3 {
    margin-top: 0;
    color: var(--color-primary-dark);
}
.location-details p {
    margin: 4px 0;
    color: #444;
}
.location-map {
    flex: 1;
    min-width: 280px;
}
.location-map iframe {
    width: 100%;
    height: 400px; /*Cambiar altura mapa*/
    border: 0;
    border-radius: var(--border-radius);
}

/*===========================================
  LOGO PERSONALIZADO
  Añadimos estilos para la nueva estructura de logo compuesto
  por una imagen y texto. Se aplican a todas las páginas
  mediante las clases `.logo-container`, `.site-logo` y `.logo-main`.
===========================================*/

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-logo {
    height: 48px;
    width: auto;
}
.logo-main {
    font-weight: 700;
    font-size: 2rem;
    color: var(--color-primary);
    letter-spacing: 1px;
}

/* Listado de cursos presenciales y certificados */
.course-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}
.course-item-full {
    background: var(--color-light);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    margin-bottom: 40px;

    /*
     * Ensure that the card content aligns with the layout of the original site:
     * put the illustrative image on the left and the descriptive text on the right.
     * By default, flex items follow the DOM order (text then image), so we use
     * order properties to reverse this order without modifying the HTML markup.
     */
}
.course-item-full h3 {
    margin-top: 0;
    color: var(--color-primary-dark);
}
.course-item-full ul {
    padding-left: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}
/* Imagen dentro de cada curso */
.course-item-full .course-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* Contenedor de contenido e imagen
 * We invert the order of the flex items so that the image appears on the left
 * and the textual content on the right. The original markup places the
 * content first and the image second; assigning order values flips their
 * positions without changing the HTML structure.
 */
.course-item-full .course-content {
    flex: 1 1 300px;
    min-width: 280px;
    order: 2;
}
.course-item-full .course-image {
    flex: 1 1 280px;
    min-width: 240px;
    order: 1;
}


/* ========================================
   MEDIA QUERIES RESPONSIVE
   ======================================== */

/* Tablets grandes y laptops pequeñas */
@media (max-width: 1024px) {
    .container {
        padding: 0 25px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .hero-cards {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    :root {
        --navbar-height: var(--navbar-height-mobile);
    }
    
    .container {
        padding: 0 20px;
    }
    
    /* Navbar móvil */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: var(--navbar-height-mobile);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--navbar-height-mobile));
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        transition: left 0.4s ease;
        z-index: 999;
    }
    
    .nav.mobile-active {
        left: 0;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0;
        padding: 40px 20px;
        height: 100%;
        overflow-y: auto;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(94, 125, 173, 0.1);
    }
    
    .nav-link {
        padding: 20px 0;
        font-size: 1.1rem;
        justify-content: space-between;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(94, 125, 173, 0.05);
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin-top: 10px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.mobile-open .dropdown-menu {
        max-height: 300px;
    }
    
    .dropdown-link {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    /* Hero móvil */
    .hero {
        height: 80vh;
        margin-top: var(--navbar-height-mobile);
        min-height: 500px;
    }
    
    .hero-cards {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 40px;
    }
    
    .hero-card {
        padding: 20px 15px;
    }
    
    .hero-card h3 {
        font-size: 1.1rem;
    }
    
    .hero-card p {
        font-size: 0.85rem;
    }
    
    /* Secciones */
    section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }
    
    /* Services móvil */
    .parallax-background {
        background-attachment: scroll;
    }
    
    .services-section {
        padding: 50px 0;
        min-height: auto;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
    }
    
    .services-secondary {
        gap: 15px;
    }
    
    .service-secondary-card {
        padding: 20px;
    }
    
    /* Mission móvil */
    .mission-content {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 30px;
    }
    
    .mission-col h3 {
        font-size: 1.3rem;
    }
    
    .mission-image {
        margin-top: 15px;
    }
    
    .mission-image img {
        max-height: 250px;
    }
    
    /* Footer móvil */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .contact-info {
        align-items: center;
    }
    
    .legal-links {
        align-items: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .site-logo {
        height: 35px;
    }
    
    .navbar.scrolled .site-logo {
        height: 30px;
    }
    
    .hero {
        height: 75vh;
        min-height: 450px;
    }
    
    .hero-cards {
        gap: 12px;
        margin-bottom: 30px;
    }
    
    .hero-card {
        padding: 18px 12px;
        min-height: auto;
    }
    
    .hero-card h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .hero-card p {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    .service-card {
        padding: 18px;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
        gap: 8px;
    }
    
    .service-secondary-card {
        padding: 18px;
    }
    
    .mission-col h3 {
        font-size: 1.2rem;
    }
    
    .footer-col h3 {
        font-size: 1.1rem;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .copyright {
        font-size: 0.8rem;
    }
}

/* Móviles muy pequeños */
@media (max-width: 320px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-card {
        padding: 15px 10px;
    }
    
    .hero-card h3 {
        font-size: 0.95rem;
    }
    
    .hero-card p {
        font-size: 0.75rem;
    }
    
    .service-card,
    .service-secondary-card {
        padding: 15px;
    }
}

/* Landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        min-height: 400px;
    }
    
    .hero-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .hero-card {
        padding: 12px 8px;
    }
    
    .hero-card h3 {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
    
    .hero-card p {
        font-size: 0.75rem;
    }
}

/* Asegurar scroll suave */
html {
    scroll-behavior: smooth;
}

/* Mejorar rendimiento en móviles */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    .hero-bg,
    .parallax-background {
        transform: translate3d(0, 0, 0);
        will-change: transform;
    }
}

/* Fix para iOS Safari */
@supports (-webkit-appearance: none) {
    .hero {
        min-height: -webkit-fill-available;
    }
}