/* =========================================
   LDS CORE STYLES - PREMIUM M2 | PRODUCTION
   ========================================= */

:root {
    --azul-profundo: #003366;
    --azul-royal: #004080;
    --azul-claro: #E6F0FA;
    --verde-brand: #4CAF50;
    --verde-hover: #388E3C;
    --whatsapp-color: #25D366;

    --blanco-puro: #FFFFFF;
    --blanco-humo: #F8F9FA;
    --gris-tenue: #E0E0E0;
    --gris-medio: #757575;
    --gris-carbon: #333333;

    --shadow-sm: 0 2px 8px rgba(0, 51, 102, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 51, 102, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 51, 102, 0.15);

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', 'Lato', sans-serif;
}

/* --- SEGURIDAD ANTI-COPIA / ANTI-SELECCIÓN --- */
body {
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE10+/Edge */
    user-select: none;
    /* Standard */

    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--gris-carbon);
    background-color: var(--blanco-humo);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Excepción: Permitir usuario escribir en formularios */
input,
textarea,
select {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* --- ESTILOS BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--azul-profundo);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.75rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.25rem;
    margin-top: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--verde-brand), transparent);
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
}

/* --- HEADER --- */
header {
    background-color: var(--azul-profundo);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--blanco-puro);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--verde-brand);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--blanco-puro);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--blanco-puro);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* --- HERO --- */
.hero {
    background: linear-gradient(135deg, var(--azul-profundo) 0%, #002244 100%);
    color: var(--blanco-puro);
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    color: var(--blanco-puro);
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.25rem;
    max-width: 750px;
    margin: 0 auto 3.5rem;
    opacity: 0.95;
    font-weight: 300;
}

/* --- BOTONES --- */
.cta-button {
    display: inline-flex;
    align-items: center;
    background-color: var(--verde-brand);
    color: var(--blanco-puro);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--verde-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* --- SECCIONES INTERNAS --- */
.nosotros {
    background-color: var(--blanco-puro);
}

.historia-corporativa {
    background-color: var(--blanco-humo);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 4rem;
    border-left: 5px solid var(--azul-profundo);
}

.mision-vision {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.card {
    background-color: var(--blanco-puro);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--verde-brand);
}

/* --- SERVICIOS --- */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.servicio-card {
    background-color: var(--blanco-puro);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.servicio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.servicio-header {
    padding: 1.5rem;
    background-color: var(--azul-profundo);
    color: var(--blanco-puro);
}

.servicio-header h3 {
    color: var(--blanco-puro);
    margin: 0;
    font-size: 1.25rem;
}

.servicio-body {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.servicio-publico {
    background-color: var(--azul-claro);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 51, 102, 0.1);
}

.servicio-publico h4 {
    color: var(--azul-profundo);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* --- CONTACTO --- */
.contacto {
    background-color: var(--blanco-humo);
}

.contacto-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 4rem;
}

.whatsapp-form-container {
    background-color: var(--blanco-puro);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--azul-profundo);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid var(--gris-tenue);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #FAFAFA;
}

.form-input:focus {
    outline: none;
    border-color: var(--azul-profundo);
    background-color: var(--blanco-puro);
    box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.1);
}

textarea.form-input {
    min-height: 160px;
    resize: vertical;
}

.form-error {
    color: #D32F2F;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
    font-weight: 600;
}

.input-error {
    border-color: #D32F2F !important;
    background-color: #FFEBEE !important;
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background-color: var(--whatsapp-color);
    color: var(--blanco-puro);
    padding: 1.1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

.whatsapp-button:hover {
    background-color: #1EA952;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.whatsapp-button:disabled {
    background-color: #A0DEB1;
    cursor: not-allowed;
    transform: none;
}

.whatsapp-icon {
    font-size: 1.5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.info-icon {
    background-color: var(--azul-profundo);
    color: var(--blanco-puro);
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.whatsapp-direct {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background-color: var(--whatsapp-color);
    color: var(--blanco-puro);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.whatsapp-direct:hover {
    background-color: #1EA952;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* --- WHATSAPP FLOAT --- */
.whatsapp-float {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    background-color: var(--whatsapp-color);
    color: var(--blanco-puro);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* --- FOOTER --- */
footer {
    background-color: var(--azul-profundo);
    color: var(--blanco-puro);
    padding: 5rem 0 2rem;
    border-top: 5px solid var(--verde-brand);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--blanco-puro);
}

.footer-links h3 {
    color: var(--blanco-puro);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--verde-brand);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* --- MODALES --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
}

.modal-content {
    background-color: var(--blanco-puro);
    padding: 3rem;
    border-radius: 16px;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    background-color: var(--azul-profundo);
    color: var(--blanco-puro);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    float: right;
}

.modal-close-btn:hover {
    background-color: var(--azul-royal);
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 2rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .hero {
        padding: 6rem 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--azul-profundo);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links a {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
    }

    .nav-links a::after {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .container {
        padding: 0 1.25rem;
    }

    .whatsapp-float {
        width: 56px;
        height: 56px;
        font-size: 1.8rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1.05rem;
    }

    .card,
    .servicio-card,
    .historia-corporativa,
    .whatsapp-form-container {
        padding: 1.5rem;
    }

    .cta-button,
    .whatsapp-button {
        width: 100%;
        padding: 1rem;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}