/* ===== CSS VARIABLES - PALETA CORPORATIVA PREMIUM ===== */
:root {
    /* Modo Claro — Navy · Azul Real · Dorado */
    --color-bg-primary:      #FFFFFF;
    --color-bg-secondary:    #F0F4FA;          /* azul muy suave */
    --color-bg-tertiary:     #FFFFFF;
    --color-text-primary:    #0B1F3A;          /* navy casi negro */
    --color-text-secondary:  #4A6080;          /* azul grisáceo */
    --color-text-inverse:    #FFFFFF;

    /* Marca */
    --color-brand-primary:   #0B2545;          /* Navy Profundo */
    --color-brand-accent:    #1E4D8C;          /* Azul Real */
    --color-warm:            #C49A2E;          /* Dorado Premium */
    --color-warm-light:      #E8C96A;          /* Dorado Claro (hover) */

    /* UI */
    --color-border:          #C8D4E6;
    --color-shadow:          rgba(11, 37, 69, 0.12);
    --color-input-bg:        #FFFFFF;
    --color-input-border:    #C8D4E6;
}

/* Modo Oscuro — mantiene jerarquía navy/dorado */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg-primary:      #0B1A2E;      /* navy muy oscuro */
        --color-bg-secondary:    #102240;
        --color-bg-tertiary:     #132B50;
        --color-text-primary:    #E8EEF7;
        --color-text-secondary:  #9BB4D4;
        --color-text-inverse:    #FFFFFF;

        --color-brand-primary:   #1E4D8C;      /* Azul Real (más visible en oscuro) */
        --color-brand-accent:    #2E6BC6;
        --color-warm:            #D4A93A;      /* Dorado más brillante en oscuro */
        --color-warm-light:      #EAC96A;

        --color-border:          #1E3A5F;
        --color-shadow:          rgba(0, 0, 0, 0.4);
        --color-input-bg:        #102240;
        --color-input-border:    #1E3A5F;
    }
}


body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== CONTENIDO PRINCIPAL ===== */
#main-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--color-bg-primary);
}

#selector-idioma {
    text-align: center;
    padding: 30px;
    background: var(--color-bg-tertiary);
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--color-shadow);
}

#selector-idioma p {
    color: var(--color-brand-primary);
    font-weight: 700;
}

.opciones-idioma button {
    padding: 12px 25px;
    margin: 10px;
    border: 2px solid var(--color-warm);
    background-color: var(--color-warm);
    color: var(--color-brand-primary);
    cursor: pointer;
    font-weight: 700;
    font-size: 1em;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    border-radius: 4px;
}

.opciones-idioma button:hover {
    background-color: var(--color-brand-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-brand-primary);
}


/* ===== NAVBAR Y NAVEGACIÓN ===== */
#navbar-principal {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background-color: var(--color-brand-primary);
    color: var(--color-text-inverse);
    width: 90%;
    box-shadow: 0 2px 8px var(--color-shadow);
    flex-wrap: wrap;
}

#navbar-principal img {
    height: 50px;
    width: auto;
}

.links-nav {
    display: flex;
    gap: 20px;
    list-style: none;
}

.links-nav a {
    color: var(--color-text-inverse);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s;
}

.links-nav a:hover {
    color: var(--color-warm);
}

/* ===== MENÚ HAMBURGUESA (MÓVIL) ===== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text-inverse);
    font-size: 1.5em;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.2s;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    #navbar-principal {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 5%;
        width: calc(90% - 10px);
    }

    #navbar-principal img {
        height: 40px;
        margin-bottom: 0;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 15px;
    }

    .links-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--color-brand-accent);
        padding: 15px 0;
        margin-top: 10px;
        gap: 0;
    }

    .links-nav.active {
        display: flex;
    }

    .links-nav a {
        padding: 12px 15px;
        display: block;
    }
}

/* ===== SECCIONES - RESPONSIVE ===== */
section {
    padding: 40px 5%;
    width: 90%;
    background-color: var(--color-bg-secondary);
}

@media (min-width: 768px) {
    section {
        padding: 60px 5%;
    }
}

@media (min-width: 1024px) {
    section {
        padding: 80px 5%;
    }
}

/* ===== HERO SECTION ===== */
#hero-section {
    background: linear-gradient(135deg, #071829 0%, #0B2545 60%, #1E4D8C 100%);
    border-bottom: 4px solid var(--color-warm);
    min-height: 300px;
    color: var(--color-text-inverse);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 50px 5%;
}

#hero-section p {
    color: #C8D4E6;
    font-size: 1.05em;
    margin-top: 0;
    max-width: 600px;
}

#hero-section h1 {
    font-size: 1.6em;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.3;
}

@media (min-width: 768px) {
    #hero-section {
        min-height: 380px;
        padding: 70px 5%;
    }

    #hero-section h1 {
        font-size: 2.2em;
    }
}

@media (min-width: 1024px) {
    #hero-section {
        min-height: 440px;
        padding: 90px 5%;
    }

    #hero-section h1 {
        font-size: 2.8em;
    }
}

/* ===== BOTONES CTA ===== */
.cta-principal {
    background-color: var(--color-warm);
    color: #0B2545;
    border: none;
    padding: 13px 28px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 20px;
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.03em;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(196, 154, 46, 0.35);
}

.cta-principal:hover {
    background-color: var(--color-warm-light);
    color: #0B2545;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(196, 154, 46, 0.5);
}

/* ===== SERVICIOS ===== */
#servicios-section {
    background-color: var(--color-bg-secondary);
    text-align: center;
}

.servicio-card {
    width: 100%;
    margin: 15px 0;
    padding: 20px;
    background: var(--color-bg-tertiary);
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--color-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.servicio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--color-shadow);
}

@media (min-width: 768px) {
    .servicio-card {
        display: inline-block;
        width: 48%;
        margin: 1%;
    }
}

@media (min-width: 1024px) {
    .servicio-card {
        width: 30%;
        margin: 1.5%;
    }
}

/* ===== CONTACTO Y FORMULARIO ===== */
#contacto-section {
    background-color: var(--color-bg-secondary);
    padding: 60px 5%;
    text-align: center;
}

#contacto-section h2 {
    margin-bottom: 8px;
}

#contacto-section > p {
    color: var(--color-text-secondary);
    margin-bottom: 48px;
}

/* Two-column grid */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

@media (min-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr 1.4fr;
        gap: 48px;
        align-items: start;
    }
}

/* ---- Info Panel ---- */
.contact-info-panel {
    background: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-accent) 100%);
    border-radius: 12px;
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    box-shadow: 0 8px 32px rgba(11, 37, 69, 0.25);
}

/* "Abierto a Proyectos" badge */
.open-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(196, 154, 46, 0.15);
    border: 1.5px solid var(--color-warm);
    color: var(--color-warm);
    font-weight: 700;
    font-size: 0.88em;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 999px;
    width: fit-content;
}

/* Blinking dot — like a recording/reception indicator */
.blink-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-warm);
    box-shadow: 0 0 0 0 rgba(196, 154, 46, 0.7);
    animation: blink-pulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes blink-pulse {
    0%   { transform: scale(1);   box-shadow: 0 0 0 0   rgba(196, 154, 46, 0.7); }
    50%  { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(196, 154, 46, 0);   }
    100% { transform: scale(1);   box-shadow: 0 0 0 0   rgba(196, 154, 46, 0);   }
}

/* Contact items (email, phone, address) */
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    font-size: 1.3em;
    color: var(--color-warm);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-label {
    display: block;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(200, 212, 230, 0.65);
    margin-bottom: 3px;
}

.contact-value {
    display: block;
    color: #FFFFFF;
    font-size: 0.97em;
    font-weight: 400;
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s;
}

a.contact-value:hover {
    color: var(--color-warm);
    text-decoration: underline;
}

/* ---- Form Panel ---- */
.contact-form-panel {
    background-color: var(--color-bg-tertiary);
    border-radius: 12px;
    padding: 36px 32px;
    box-shadow: 0 4px 20px var(--color-shadow);
}

#contact_form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#contact_form input,
#contact_form textarea {
    padding: 12px 14px;
    border: 1.5px solid var(--color-input-border);
    border-radius: 6px;
    font-size: 0.97em;
    font-family: inherit;
    background-color: var(--color-input-bg);
    color: var(--color-text-primary);
    transition: border-color 0.3s, box-shadow 0.3s;
}

#contact_form input:focus,
#contact_form textarea:focus {
    outline: none;
    border-color: var(--color-brand-accent);
    box-shadow: 0 0 0 3px rgba(30, 77, 140, 0.15);
}

#contact_form .cta-principal {
    margin-top: 6px;
    width: 100%;
    text-align: center;
    justify-content: center;
}



/* ===== FOOTER ===== */
#footer-principal {
    background-color: var(--color-brand-primary);
    border-top: 3px solid var(--color-warm);
    padding: 30px 5% 85px 5%;
    font-size: 0.9em;
    text-align: center;
    position: relative;
}

@media (min-width: 768px) {
    #footer-principal {
        padding: 30px 5%;
    }
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand {
    color: var(--color-warm);
    font-weight: 700;
    font-size: 1.05em;
    letter-spacing: 0.05em;
    margin: 0;
    text-transform: uppercase;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
    font-size: 0.85em;
}

.footer-privacy {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.85em;
    transition: color 0.3s;
}

.footer-privacy:hover {
    color: var(--color-warm);
}



/* ===== BOTÓN DESCARGA DE DOCUMENTOS ===== */
.cta-document {
    background-color: var(--color-brand-primary);
    color: var(--color-text-inverse);
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.cta-document:hover {
    background-color: var(--color-brand-accent);
    transform: translateY(-2px);
}

.cta-document span {
    font-size: 1.2em;
    margin-right: 10px;
}

/* ===== CONMUTADOR DE IDIOMA Y BOTONES ===== */
.lang-selector-header,
.lang-selector-footer {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .links-nav .lang-selector-header {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        width: 100%;
    }
}

.btn-lang {
    background: transparent;
    border: 1px solid var(--color-warm);
    color: var(--color-text-inverse);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.btn-lang:hover,
.btn-lang.active {
    background-color: var(--color-warm);
    color: var(--color-brand-primary);
}

/* ===== BOTÓN FLOTANTE WHATSAPP ===== */
#btn-whatsapp-float {
    position: fixed;
    bottom: 85px;
    right: 25px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #25D366;
    color: #FFFFFF;
    border: 2px solid var(--color-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 999;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

#btn-whatsapp-float:hover {
    background-color: #1DA851;
    color: #FFFFFF;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* ===== BOTÓN VOLVER ARRIBA (BACK TO TOP) ===== */
#btn-back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--color-brand-accent);
    color: var(--color-text-inverse);
    border: 2px solid var(--color-warm);
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease, background-color 0.3s ease;
    z-index: 999;
}

#btn-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#btn-back-to-top:hover {
    background-color: var(--color-warm);
    color: var(--color-brand-primary);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
