/* ============================================
   RESET COMPLETO PARA TODOS LOS NAVEGADORES
   ============================================ */

/* Reset universal */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Reset específico para elementos HTML5 en navegadores antiguos */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}

/* Asegurar que html y body ocupen toda la pantalla */
html {
    font-size: 100%; /* 16px por defecto */
    -webkit-text-size-adjust: 100%; /* Previene ajuste de texto en iOS */
    -ms-text-size-adjust: 100%;
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                 Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    color: #333333;
    background-color: #ffffff;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

/* ============================================
   ELEMENTOS COMUNES
   ============================================ */

/* Imágenes responsivas */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-style: none; /* Elimina borde en IE10 */
}

/* Links */
a {
    color: #3498db;
    text-decoration: none;
    background-color: transparent; /* Elimina fondo gris en links en iOS Safari */
    -webkit-text-decoration-skip: objects; /* Mejora legibilidad */
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Listas */
ul, ol {
    list-style-position: inside;
    margin-left: 20px;
}

/* Tablas */
table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

/* Formularios */
button, input, optgroup, select, textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button, input {
    overflow: visible; /* Corrige overflow en Firefox */
}

button, select {
    text-transform: none; /* Corrige herencia de text-transform en Firefox */
}

button, [type="button"], [type="reset"], [type="submit"] {
    -webkit-appearance: button; /* Corrige estilos en iOS Safari */
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

textarea {
    overflow: auto; /* Elimina scrollbar por defecto en IE */
    resize: vertical;
}

/* ============================================
   CLASES DE UTILIDAD
   ============================================ */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* ============================================
   NAVEGACIÓN - MENÚ PRINCIPAL RESPONSIVE
   ============================================ */

.navbar {
    background-color: #2c3e50;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
}

.nav-logo a {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    padding: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo a:hover {
    color: #3498db;
}

/* Menú para desktop (por defecto) */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    padding: 25px 15px;
    display: block;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: #3498db;
}

.nav-menu li.active a {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: #e74c3c;
}

/* Botón menú hamburguesa (oculto por defecto) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1001;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    position: absolute;
    left: 10px;
}

.menu-toggle span:nth-child(1) {
    top: 14px;
}

.menu-toggle span:nth-child(2) {
    top: 21px;
}

.menu-toggle span:nth-child(3) {
    top: 28px;
}

/* Animación a X cuando el menú está abierto */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 21px;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 21px;
}

/* ============================================
   MEJORAS PARA MENÚ MÓVIL
   ============================================ */

/* Clase para cuando el menú está abierto en móvil */
.nav-menu.mobile-active {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: #2c3e50;
    padding: 20px 0;
    overflow-y: auto;
    z-index: 999;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-menu.mobile-active li {
    width: 100%;
    text-align: center;
}

.nav-menu.mobile-active a {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid transparent;
    font-size: 1.1rem;
    justify-content: center;
    min-height: 56px;
}

.nav-menu.mobile-active a:hover,
.nav-menu.mobile-active li.active a {
    background-color: rgba(255, 255, 255, 0.15);
    border-left-color: #3498db;
}

/* Overlay para fondo cuando el menú está abierto */
.menu-overlay {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    backdrop-filter: blur(2px);
}

.menu-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Prevenir scroll en body cuando el menú está abierto */
body.no-scroll {
    overflow: hidden;
}

/* ============================================
   HERO / SECCIÓN PRINCIPAL
   ============================================ */

.hero {
    padding: 60px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
}

.perfil {
    display: flex;
    align-items: center;
    gap: 40px;
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    margin: 0 auto;
}

.foto-perfil {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    flex-shrink: 0;
}

.info h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.info h3 {
    color: #3498db;
    margin: 25px 0 15px 0;
    font-size: 1.3rem;
}

.info p {
    margin-bottom: 15px;
    color: #555555;
    line-height: 1.6;
}

.habilidades {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    padding: 0;
    list-style: none;
}

.habilidades li {
    background: #3498db;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.2s;
}

.habilidades li:hover {
    transform: translateY(-2px);
    background: #2980b9;
}

/* ============================================
   SECCIÓN DE PRÁCTICAS RESPONSIVE
   ============================================ */

.practicas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.practica-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #eeeeee;
}

.practica-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.practica-header {
    background: #f8f9fa;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eaeaea;
}

.practica-numero {
    font-weight: bold;
    color: #3498db;
    font-size: 1.1rem;
}

.practica-categoria {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.practica-categoria.html {
    background: #e74c3c;
    color: white;
}

.practica-categoria.javascript {
    background: #f39c12;
    color: white;
}

.practica-categoria.php {
    background: #9b59b6;
    color: white;
}

.practica-categoria.proyectos {
    background: #2ecc71;
    color: white;
}

.practica-content {
    padding: 20px;
}

.practica-content h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.practica-content p {
    color: #666666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.practica-meta {
    display: flex;
    gap: 15px;
    color: #888888;
    font-size: 0.85rem;
}

.practica-meta i {
    margin-right: 5px;
}

.practica-actions {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eeeeee;
    display: flex;
    gap: 10px;
}

/* Versión simplificada de botones para prácticas */
.practicas-simples {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.btn-carpeta {
    padding: 15px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    text-decoration: none;
}

.btn-carpeta:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #2980b9, #1c5a7a);
}

.btn-carpeta i {
    font-size: 2em;
    margin-bottom: 10px;
}

.btn-carpeta span {
    font-weight: bold;
    word-break: break-word;
    text-align: center;
}

.btn-carpeta.deshabilitado {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    cursor: not-allowed;
}

.btn-carpeta.deshabilitado:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.contador {
    margin-top: 5px;
    font-size: 0.8em;
    opacity: 0.9;
}

/* Versión aún más simple */
.practicas-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 0;
}

.btn-practica {
    padding: 12px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    min-height: 48px; /* Tamaño táctil mínimo */
}

.btn-practica:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* ============================================
   SECCIÓN DE CONTACTO
   ============================================ */

.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin: 40px 0;
}

.contacto-info, .contacto-form {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

.btn-submit {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    min-height: 48px; /* Tamaño táctil mínimo */
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-submit:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0;
    margin-top: auto;
    text-align: center;
}

footer p {
    margin-bottom: 10px;
    color: #ecf0f1;
}

footer a {
    color: #3498db;
}

footer a:hover {
    color: #2980b9;
}

/* ============================================
   MEDIA QUERIES - RESPONSIVE DESIGN
   ============================================ */

/* Tablets y dispositivos medianos (1024px) */
@media screen and (max-width: 1024px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-menu a {
        padding: 25px 12px;
        font-size: 0.95rem;
    }
    
    .perfil {
        flex-direction: column;
        text-align: center;
        padding: 25px;
    }
    
    .foto-perfil {
        width: 180px;
        height: 180px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .contacto-grid {
        grid-template-columns: 1fr;
    }
    
    .practicas-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

/* Móviles y dispositivos pequeños (768px) */
@media screen and (max-width: 768px) {
    .nav-container {
        height: 70px;
        padding: 0 15px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
    }
    
    .nav-logo a {
        font-size: 1.3rem;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .practicas-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .practicas-simples {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .btn-carpeta {
        height: 110px;
        padding: 12px;
        font-size: 1em;
    }
    
    .btn-carpeta i {
        font-size: 1.8em;
    }
    
    .perfil {
        padding: 20px;
        gap: 25px;
        margin: 0 15px;
    }
    
    .foto-perfil {
        width: 150px;
        height: 150px;
    }
    
    .info h2 {
        font-size: 1.5rem;
    }
    
    .info h3 {
        font-size: 1.2rem;
    }
    
    /* Mejorar accesibilidad táctil en móviles */
    a, button, input[type="submit"], .btn-submit, .btn-practica {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Aumentar espacio entre enlaces */
    .nav-menu.mobile-active a {
        padding: 20px 15px !important;
    }
    
    /* Mejorar contraste para mejor visibilidad */
    a:hover, button:hover {
        opacity: 0.9;
    }
    
    /* Ajustar el contenido principal para que no quede detrás del menú */
    main {
        padding-top: 20px;
    }
}

/* Móviles muy pequeños (480px) */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-container {
        padding: 0 10px;
        height: 60px;
    }
    
    .nav-menu.mobile-active {
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    .menu-overlay {
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    .nav-logo a {
        font-size: 1.2rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .practicas-grid {
        grid-template-columns: 1fr;
    }
    
    .practicas-simples {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .btn-carpeta {
        height: 100px;
        padding: 10px;
    }
    
    .perfil {
        padding: 15px;
    }
    
    .foto-perfil {
        width: 130px;
        height: 130px;
    }
    
    .info h2 {
        font-size: 1.5rem;
    }
    
    .info h3 {
        font-size: 1.1rem;
    }
}

/* Soporte para orientación landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    .nav-menu.mobile-active {
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .container {
        padding: 15px;
    }
}

/* Para evitar scroll cuando el menú está abierto en móviles */
body.no-scroll {
    overflow: hidden;
}

/* ============================================
   PREFIJOS VENDOR PARA COMPATIBILIDAD
   ============================================ */

/* Flexbox para navegadores antiguos */
.nav-menu {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.practicas-grid {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Transiciones con prefijos */
.practica-item {
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* Transformaciones con prefijos */
.btn-submit:hover:not(:disabled) {
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    -o-transform: translateY(-2px);
    transform: translateY(-2px);
}

/* Gradientes con prefijos */
.btn-submit {
    background: -webkit-linear-gradient(135deg, #3498db, #2980b9);
    background: -moz-linear-gradient(135deg, #3498db, #2980b9);
    background: -o-linear-gradient(135deg, #3498db, #2980b9);
    background: linear-gradient(135deg, #3498db, #2980b9);
}

/* Box-shadow con prefijos */
.practica-item {
    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    -moz-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* ============================================
   CORRECCIONES ESPECÍFICAS POR NAVEGADOR
   ============================================ */

/* Safari: Corregir estilos de botones */
button, [type="button"], [type="reset"], [type="submit"] {
    -webkit-appearance: none;
}

/* Firefox: Corregir estilos de select */
select.form-control {
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="gray" viewBox="0 0 16 16"><path d="M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px;
}

/* Chrome/Safari: Corregir estilos de input number */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* IE11: Corrección para Grid */
@media all and (-ms-high-contrast: none) {
    .practicas-grid {
        display: -ms-grid;
        -ms-grid-columns: 1fr 1fr 1fr;
        display: grid;
        gap: 25px;
    }
    
    .practica-item {
        margin-bottom: 25px;
    }
}

/* Edge: Corrección para flexbox */
@supports (-ms-ime-align: auto) {
    .perfil {
        display: block;
    }
}

/* ============================================
   ANIMACIONES Y EFECTOS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Prefijos para animaciones */
@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(20px);
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
    -webkit-animation: fadeIn 0.5s ease-out;
}

/* Añade estas reglas a tu archivo CSS */

/* Menú móvil abierto */
.nav-menu.show {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: #2c3e50;
    padding: 20px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

/* Botón hamburguesa activo */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Prevenir scroll cuando el menú está abierto */
body.menu-open {
    overflow: hidden;
}

/* Mejoras para móviles */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-menu.show {
        display: flex !important;
        animation: slideDown 0.3s ease-out;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
    }
    
    .nav-menu a {
        padding: 20px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        justify-content: center;
    }
    
    .nav-menu li.active a {
        background-color: rgba(255, 255, 255, 0.1);
        border-left: 4px solid #3498db;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Texto del logo en móviles */
@media (max-width: 480px) {
    .logo-text {
        font-size: 0.9rem;
    }
}
/* ============================================
   CORRECCIONES ESPECÍFICAS PARA SAFARI iOS
   ============================================ */

/* Fix para Safari iOS - Viewport dinámico */
@supports (-webkit-touch-callout: none) {
  /* Correcciones específicas para iOS Safari */
  body.menu-open {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Asegurar que el menú use toda la altura disponible */
  .nav-menu.show {
    height: -webkit-fill-available;
    height: fill-available;
    min-height: -webkit-fill-available;
    max-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom); /* Para iPhone X+ con notch */
  }
  
  /* Asegurar que los botones sean fáciles de tocar */
  .menu-toggle,
  .nav-menu a {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Mejorar rendimiento de animaciones en iOS */
  .nav-menu.show {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}

/* Fix para el scroll en iOS cuando el menú está abierto */
body.menu-open {
  position: fixed;
  width: 100%;
}

/* Mejorar el área táctil en iOS */
.nav-menu a,
.menu-toggle {
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Asegurar que el overlay cubra toda la pantalla en iOS */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: -webkit-fill-available;
}

/* Corrección para el logo en iOS */
.nav-logo a {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ============================================
   MEDIA QUERIES ESPECÍFICAS PARA iOS
   ============================================ */

/* iPhone específico */
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
  /* iPhone X, XS, 11 Pro, 12 mini, 13 mini */
  .nav-menu.show {
    padding-top: constant(safe-area-inset-top);
    padding-top: env(safe-area-inset-top);
  }
}

@media only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) {
  /* iPhone XR, 11 */
  .nav-menu.show {
    padding-top: constant(safe-area-inset-top);
    padding-top: env(safe-area-inset-top);
  }
}

@media only screen and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) {
  /* iPhone 12 Pro Max, 13 Pro Max, 14 Plus */
  .nav-menu.show {
    padding-top: constant(safe-area-inset-top);
    padding-top: env(safe-area-inset-top);
  }
}
/* ============================================
   ESTILOS PARA IMPRESIÓN
   ============================================ */

@media print {
    .navbar, .btn-submit, .menu-toggle, footer,
    .menu-overlay, .menu-toggle {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000000;
        background: #ffffff;
        overflow: visible !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        color: #000000;
        text-decoration: underline;
    }
    
    .perfil {
        box-shadow: none;
        border: 1px solid #cccccc;
    }
}