:root {
    --color-primary: #ff001a;
    --color-primary-dark: #d91529;
    --yellow: #ffc107;
    --white: #fff;
    --gray: #6c757d;
    --gray-dark: #343a40;
    --light: #f8f9fa;
    --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--light);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
  }
  

/* Estructura principal */
.contact-main {
    flex: 1;
    padding: 1rem 0;
    background-color: var(--light);
}

.contact-container {
    max-width: 700px;
    margin: 1rem auto;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Encabezado */
.contact-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--white);
    padding: 1.5rem;
    text-align: center;
  }
  
  .contact-header h2 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 0;
  }
  
  .contact-header p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
  }
  .contact-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-header > i, 
.contact-header > h2 {
    display: inline-block; /* Esto los coloca en la misma línea */
    vertical-align: middle; /* Alinea verticalmente al centro */
}

.contact-header > i {
    margin-right: 10px; /* Espacio entre el icono y el título */
    font-size: 1.5em; /* Tamaño del icono */
    color: var(--color-primary); /* Color rojo como en otros formularios */
}

.header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.contact-header .header-title i {
    font-size: 1.8rem; /* Igual que en otros formularios */
    color: var(--light); /* Color rojo consistente */
    margin-right: 0.8rem; /* Espaciado igual que en otros */
    vertical-align: middle;
}

/* Estilo para el icono del párrafo (opcional) */
.contact-header p i {
    font-size: 0.9rem; /* Tamaño proporcional */
    color: var(--gray-dark); /* Color gris como referencia */
    margin-right: 0.5rem;
}


/* Cuerpo del formulario */
.contact-body {
    padding: 2rem 2.5rem;
}

/* Formulario mejorado */
.contact-form .form-group {
    margin-bottom: 1.8rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--gray-dark);
    font-weight: 600;
    font-size: 0.95rem;
}

.contact-form label.required::after {
    content: ' *';
    color: var(--color-primary);
}

.contact-form .form-control {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 1px solid #e1e5eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background-color: #f8f9fa;
}

.contact-form .form-control:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 0, 26, 0.1);
    background-color: var(--white);
}

/* Textarea especial */
.contact-form textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

/* Botón con icono */
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(to right, var(--color-primary), var(--color-primary-dark));
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background: linear-gradient(to right, var(--color-primary-dark), var(--color-primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 21, 41, 0.2);
}

h2{
    color: var(--light);
}



/* Responsive mejorado */
@media (max-width: 768px) {
    .contact-body {
        padding: 1.8rem;
    }
    
    .contact-header {
        padding: 1.5rem 1.8rem;
    }
    
    .contact-header h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .contact-main {
        padding: 1rem 0;
    }
    
    .contact-container {
        border-radius: 0;
    }
    
    .contact-header {
        padding: 1.3rem 1.5rem;
    }
    
    .contact-body {
        padding: 1.5rem;
    }
    
    .contact-form .form-control {
        padding: 0.8rem 1rem;
    }
    
    .btn-submit {
        width: 100%;
    }
}


.contact-form {
    width: calc(100% - 0.2rem); /* Pequeño ajuste para evitar choques */
}

.contact-form .form-control {
    width: calc(100% - 2.4rem); /* Restamos el padding horizontal */
    margin: 0 auto; /* Centrado seguro */
    display: block; /* Asegura el comportamiento del cálculo */
}

/* Ajustes específicos para mobile */
@media (max-width: 768px) {
    .contact-form .form-control {
        width: calc(100% - 2rem); /* Menos padding en móviles */
    }
}

@media (max-width: 480px) {
    .contact-form .form-control {
        width: calc(100% - 1.6rem); /* Ajuste fino para móviles pequeños */
    }
}

/* ============================== */
/* CORRECCIONES RESPONSIVE HEADER */
/* ============================== */

@media (max-width: 768px) {
    /* Asegurar que el botón hamburguesa sea visible */
    .mobile-menu-toggle {
        display: block !important;
        position: relative;
        z-index: 1002;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
    }
    
    /* Estilos para las barras del menú hamburguesa */
    .toggle-bar {
        display: block !important;
        width: 25px;
        height: 3px;
        background-color: #333;
        margin: 4px 0;
        transition: all 0.3s ease;
    }
    
    /* Estado activo del menú hamburguesa */
    .mobile-menu-toggle.active .toggle-bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.active .toggle-bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .toggle-bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Navegación principal - menú desplegable móvil */
    .main-nav {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 80% !important;
        height: 100vh !important;
        background: white !important;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        z-index: 1000 !important;
        padding-top: 80px !important;
        transition: all 0.3s ease !important;
        overflow-y: auto !important;
    }
    
    .main-nav.active {
        left: 0 !important;
    }
    
    /* Lista de navegación */
    .nav-list {
        flex-direction: column !important;
        padding: 20px !important;
        width: 100% !important;
    }
    
    .nav-link {
        display: block !important;
        padding: 15px 0 !important;
        border-bottom: 1px solid #eee !important;
        width: 100% !important;
        text-align: left !important;
        font-size: 16px !important;
    }
    
    /* Asegurar que todos los enlaces sean visibles */
    .nav-list li {
        width: 100% !important;
        display: block !important;
    }
    
    /* Overlay para cerrar menú */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .nav-overlay.active {
        display: block;
    }
    
    /* Correcciones específicas para iOS */
    @supports (-webkit-touch-callout: none) {
        .main-nav {
            height: -webkit-fill-available !important;
        }
    }
    
    /* Correcciones para Safari */
    _::-webkit-full-page-media, _:future, :root .main-nav {
        padding-top: 70px !important;
    }
}

/* Correcciones para dispositivos muy pequeños */
@media (max-width: 480px) {
    .main-nav {
        width: 85% !important;
    }
    
    .nav-list {
        padding: 15px !important;
    }
    
    .nav-link {
        padding: 12px 0 !important;
        font-size: 15px !important;
    }
}

/* Asegurar que el header se mantenga en la parte superior */
.main-header {
    position: relative;
    z-index: 1001;
}

/* Prevenir scroll del body cuando el menú está abierto */
body.menu-open {
    overflow: hidden;
}

/* Correcciones para Android Chrome */
@media (max-width: 768px) and (orientation: portrait) {
    .main-nav {
        padding-top: 70px !important;
    }
}

/* Ajustes para tablets pequeñas */
@media (max-width: 1024px) and (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .main-nav {
        position: static !important;
        height: auto !important;
        width: auto !important;
    }
}