/* ================= VARIABLES ================= */
:root {
    --primary-color: #0f172a;       /* Azul muy oscuro (Navy) */
    --secondary-color: #3b82f6;     /* Azul brillante */
    --accent-color: #2563eb;        /* Azul corporativo fuerte */
    --text-color: #334155;
    --light-text: #64748b;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --font-main: 'Inter', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
}

/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* Reglas vitales para el control de imágenes solicitadas */
img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
}

/* ================= BOTONES ================= */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ================= HEADER ================= */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 48px;
    width: auto;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 32px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--secondary-color);
}

.btn-cta-nav {
    background-color: var(--primary-color);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    transition: background-color 0.3s ease !important;
}

.btn-cta-nav:hover {
    background-color: var(--secondary-color) !important;
}

/* Botón Hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* ================= HERO SECTION ================= */
.hero {
    margin-top: 78px;
    background: linear-gradient(to right bottom, var(--bg-light), #e0e7ff);
    padding: 120px 0 100px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 24px;
    letter-spacing: -0.025em;
}

.hero p {
    font-size: 1.125rem;
    color: var(--light-text);
    max-width: 650px;
    margin: 0 auto 40px;
}

/* ================= NOSOTROS ================= */
.about {
    padding: 100px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-color);
    font-size: 1.05rem;
    margin-bottom: 30px;
}

.slogan {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--secondary-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4/3;
}

/* ================= MISIÓN, VISIÓN Y VALORES ================= */
.mvv {
    background-color: var(--bg-light);
    padding: 100px 0;
}

.mvv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.mvv-card {
    background: var(--bg-color);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--border-color);
}

.icon-wrapper {
    font-size: 3rem;
    margin-bottom: 20px;
}

.mvv-card h3 {
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.mvv-card p {
    color: var(--light-text);
}

.values-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.values-list li {
    background: var(--bg-light);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    border: 1px solid #cbd5e1;
}

/* ================= SERVICIOS ================= */
.services {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.section-header p {
    color: var(--light-text);
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.service-card {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.service-card img {
    height: 220px;
    border-bottom: 1px solid var(--border-color);
}

.service-content {
    padding: 30px;
    flex-grow: 1;
}

.service-content h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-content p {
    color: var(--light-text);
    font-size: 0.95rem;
}

/* ================= CONTACTO Y FORMULARIO ================= */
.contact {
    padding: 100px 0;
    background-color: var(--primary-color);
    color: #ffffff;
}

.contact h2 {
    color: #ffffff;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-info p {
    color: #cbd5e1;
    font-size: 1.1rem;
    margin-top: 20px;
}

.contact-form-wrapper {
    background: var(--bg-color);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: var(--text-color);
}

.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8fafc;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: var(--error-color);
    background-color: #fef2f2;
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 6px;
    display: none;
    font-weight: 500;
}

.form-group.has-error .error-message {
    display: block;
}

.btn-submit {
    width: 100%;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
}

.loader.hidden {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-feedback {
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
    color: var(--error-color);
}

/* ================= MODAL DE ÉXITO ================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    padding: 50px 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    max-width: 450px;
    width: 90%;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    box-shadow: var(--shadow-lg);
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--light-text);
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--error-color);
}

.modal-icon {
    font-size: 4.5rem;
    margin-bottom: 20px;
}

.modal h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.modal p {
    color: var(--text-color);
    font-size: 1.1rem;
}

/* ================= FOOTER ================= */
.footer {
    background-color: #020617;
    color: #94a3b8;
    text-align: center;
    padding: 30px 0;
    font-size: 0.9rem;
}

/* ================= MEDIA QUERIES (MOBILE FIRST COMPATIBLE) ================= */
@media (max-width: 992px) {
    .mvv-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .about-grid, .contact-container {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        position: fixed;
        top: 78px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 78px);
        background-color: var(--bg-color);
        box-shadow: var(--shadow-md);
        transition: right 0.3s ease;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        padding: 40px 0;
        gap: 24px;
    }
    
    .nav-menu a {
        font-size: 1.2rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg);
        top: 8px;
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg);
        top: -8px;
    }
}
