:root {
    --primary: #233b6d;
    --primary-dark: #1a2c52;
    --primary-light: #2d4a8a;
    --secondary: #08a5e4;
    --secondary-dark: #0587c0;
    --secondary-light: #5bc5f4;
    --white: #ffffff;
    --light-bg: #f8fafc;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --border-color: #e2e8f0;
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #64748b;
    --emergency: #dc2626;
    --emergency-light: #fee2e2;
    --footer-bg: #1a1d23;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header - Menú Mejorado */
header {
    background-color: var(--white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 70px;
    transition: all 0.3s ease;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.8rem;
    position: relative;
}

nav ul li a {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.8rem 1.2rem;
    position: relative;
    border-radius: 30px;
    transition: all 0.4s ease;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    border-radius: 30px;
    z-index: -1;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

nav ul li a:hover::before {
    transform: scale(1);
}

nav ul li a:hover {
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(8, 165, 228, 0.3);
}

nav ul li:last-child a {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: var(--white);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(8, 165, 228, 0.3);
}

nav ul li:last-child a:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(8, 165, 228, 0.4);
}

.mobile-menu {
    display: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.mobile-menu:hover {
    color: var(--secondary);
}

/* Main Content */
.main-content {
    padding-top: 120px;
    min-height: calc(100vh - 400px);
}

/* Back to Top Button - ESTILOS AGREGADOS */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--secondary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: 0 5px 15px rgba(8, 165, 228, 0.3);
    border: none;
    text-decoration: none;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(8, 165, 228, 0.4);
    color: var(--white);
}

.back-to-top i {
    font-size: 1.2rem;
}

/* Footer - Nuevo diseño */
footer {
    background-color: var(--footer-bg);
    color: var(--white);
    padding: 5rem 0 0;
    position: relative;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col {
    padding: 0 1rem;
}

.footer-about h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
}

.footer-contact h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.footer-contact-item:hover {
    color: var(--secondary);
}

.footer-contact-item i {
    margin-right: 1rem;
    color: var(--secondary);
}

.footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-logo-img {
    max-width: 180px;
    height: auto;
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .footer-logo {
        grid-column: span 2;
        justify-content: center;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 1rem;
    }

    .mobile-menu {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(-100%);
        transition: transform 0.4s ease;
        z-index: 1000;
    }

    nav.active {
        transform: translateX(0);
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        padding: 2rem;
    }

    nav ul li {
        margin: 1rem 0;
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        color: var(--white);
        font-size: 1.2rem;
        padding: 1rem 2rem;
        border-radius: 50px;
        display: block;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.1);
    }

    nav ul li a:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-5px);
    }

    nav ul li:last-child a {
        background: var(--secondary);
        font-weight: 700;
    }

    nav ul li:last-child a:hover {
        background: var(--secondary-light);
        transform: translateY(-5px) scale(1.05);
    }

    .mobile-menu.active i::before {
        content: '\f00d';
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-logo {
        grid-column: span 1;
        margin-top: 0;
    }

    .main-content {
        padding-top: 100px;
    }

    /* Back to Top Button - Responsive */
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 540px;
        padding: 0 1rem;
    }

    /* Back to Top Button - Mobile */
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* --- Estilos específicos para el formulario de contacto --- */

.contact-section {
    padding: 50px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.section-header p {
    font-size: 1rem;
    color: var(--text-medium);
    max-width: 700px;
    margin: 0 auto;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Contact Form */
.contact-form {
    background-color: #233b6b;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    color: var(--white);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--white);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(8, 165, 228, 0.2);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-1px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Contact Info */
.contact-info {
    background-color: var(--white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.contact-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.contact-item h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-item h3 i {
    font-size: 1.1rem;
    color: var(--secondary);
}

.contact-item p {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.emergency-item {
    background-color: var(--emergency-light);
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid var(--emergency);
}

.emergency-item h3 {
    color: var(--emergency);
}

.emergency-item h3 i {
    color: var(--emergency);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: var(--secondary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
}

/* Feedback Section */
.feedback-section {
    margin-top: 40px;
    background-color: var(--light-bg);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.feedback-header {
    margin-bottom: 20px;
}

.feedback-header h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.feedback-header p {
    color: var(--text-medium);
    font-size: 0.9rem;
}

.feedback-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.feedback-form .form-group:last-child,
.feedback-form .form-group:nth-last-child(2) {
    grid-column: span 2;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.checkbox-group input {
    width: auto;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 1.7rem;
    }
    
    .feedback-form {
        grid-template-columns: 1fr;
    }
    
    .feedback-form .form-group:last-child,
    .feedback-form .form-group:nth-last-child(2) {
        grid-column: span 1;
    }
}