/* ===== STYLES1.CSS - ARCHIVO MEJORADO PARA MÓVIL ===== */

/* Variables CSS para consistencia */
:root {
    --primary-color: #1a3e72;
    --secondary-color: #3cce4d;
    --accent-color: #3c80e7;
    --light-color: #f5f7fa;
    --dark-color: #2c3e50;
    --text-color: #000000;
    --text-light: #777;
    --white: #fff;
    --gray: #e0e0e0;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Reset básico para móvil */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* Header con efecto parallax - MEJORADO PARA MÓVIL */
.parallax-header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('fachada.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 80vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.parallax-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, #484295, transparent);
    z-index: 1;
}

.header-content {
    text-align: center;
    color: var(--white);
    z-index: 2;
    padding: 0 20px;
    position: relative;
    width: 100%;
    max-width: 1200px;
}

.logo-container {
    animation: fadeInDown 1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.logo {
    width: 200px;
    height: 200px;
    margin-bottom: 40px;
    border-radius: 50%;
    border: 3px solid var(--white);
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    object-fit: cover;
}

.logo-text h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.2;
}

.logo-text h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: var(--white);
    font-family: 'Poppins', sans-serif;
    line-height: 1.3;
}

.logo-text p {
    font-size: 1.2rem;
    opacity: 0.9;
    color: var(--white);
    margin-bottom: 0;
    line-height: 1.4;
}

/* Menú sticky - MEJORADO PARA MÓVIL */
.sticky-nav {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: auto;
    min-height: auto;
    padding: 0 15px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.main-menu {
    display: flex;
    list-style: none;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.main-menu li {
    position: relative;
}

.main-menu > li > a {
    padding: 10px 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.main-menu > li > a i {
    margin-right: 8px;
    font-size: 1rem;
}

.main-menu > li > a.active {
    color: var(--secondary-color);
}

.main-menu > li > a:hover {
    color: var(--secondary-color);
}

/* Dropdown menu */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    transform: translateY(10px);
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 10px 15px;
    border-bottom: 1px solid var(--gray);
    color: var(--dark-color);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.dropdown-content a i {
    margin-right: 8px;
    width: 15px;
    text-align: center;
}

/* Menú móvil - MEJORADO */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1001;
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    padding: 0;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Overlay para menú móvil */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== MEDIA QUERIES MEJORADAS ===== */

/* Tablets */
@media (max-width: 1024px) {
    .logo-text h1 {
        font-size: 2.2rem;
    }
    
    .logo-text h2 {
        font-size: 1.6rem;
    }
    
    .main-menu > li > a {
        font-size: 0.8rem;
        padding: 10px 12px;
    }
}

/* Móviles grandes */
@media (max-width: 768px) {
    .parallax-header {
        background-attachment: scroll;
        height: 60vh;
        padding: 15px;
    }
    
    .logo {
        width: 150px;
        height: 150px;
        margin-bottom: 20px;
    }
    
    .logo-text h1 {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    .logo-text h2 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }
    
    .logo-text p {
        font-size: 1rem;
    }
    
    /* Menú móvil activado */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 70px 20px 20px;
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        justify-content: flex-start;
        align-items: flex-start;
    }
    
    .main-menu.active {
        right: 0;
    }
    
    .main-menu > li {
        width: 100%;
        margin-bottom: 0;
    }
    
    .main-menu > li > a {
        padding: 15px 0;
        border-bottom: 1px solid var(--gray);
        justify-content: flex-start;
        width: 100%;
        font-size: 1rem;
    }
    
    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        display: none;
        margin-top: 10px;
        margin-left: 15px;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: var(--light-color);
        border-radius: 5px;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
    
    .dropdown-content a {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .parallax-header {
        height: 50vh;
        min-height: 250px;
        padding: 10px;
    }
    
    .logo {
        width: 120px;
        height: 120px;
        margin-bottom: 15px;
    }
    
    .logo-text h1 {
        font-size: 1.7rem;
        margin-bottom: 5px;
    }
    
    .logo-text h2 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .logo-text p {
        font-size: 0.9rem;
    }
    
    .header-content {
        padding: 0 15px;
    }
    
    .main-menu {
        width: 90%;
        padding: 60px 15px 20px;
    }
    
    .main-menu > li > a {
        padding: 12px 0;
        font-size: 0.95rem;
    }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
    .parallax-header {
        height: 45vh;
    }
    
    .logo {
        width: 100px;
        height: 100px;
    }
    
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .logo-text h2 {
        font-size: 1.1rem;
    }
    
    .logo-text p {
        font-size: 0.85rem;
    }
}

/* Orientación landscape en móviles */
@media (max-height: 500px) and (max-width: 768px) {
    .parallax-header {
        height: 80vh;
        min-height: 350px;
    }
    
    .logo {
        width: 100px;
        height: 100px;
        margin-bottom: 15px;
    }
    
    .logo-text h1 {
        font-size: 1.8rem;
    }
    
    .logo-text h2 {
        font-size: 1.3rem;
    }
}

/* Animaciones */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Mejoras de rendimiento para móviles */
@media (max-width: 768px) {
    .parallax-header {
        background-attachment: scroll !important;
    }
    
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    .main-menu > li > a {
        -webkit-touch-callout: none;
    }
}