/* ============================================================
   ESTILOS GLOBALES - GESTORÍA CORPORATIVA
   Archivo compartido para todas las páginas
   ============================================================ */

/* ---------- RESET Y VARIABLES ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --azul-profundo: #1a3a5c;
    --azul-oscuro: #0f2438;
    --dorado: #d4af37;
    --dorado-claro: #ffd700;
    --gris-claro: #f4f6f9;
    --gris-medio: #eef2f7;
    --texto-oscuro: #2c3e50;
    --texto-gris: #5a6c7d;
    --texto-gris-claro: #6b7c93;
    --sombra-suave: 0 10px 30px rgba(0,0,0,0.08);
    --sombra-media: 0 15px 40px rgba(0,0,0,0.12);
    --sombra-fuerte: 0 20px 40px rgba(0,0,0,0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gris-claro);
    overflow-x: hidden;
    color: var(--texto-oscuro);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style-position: inside;
}

/* ---------- NAVEGACIÓN ---------- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--azul-oscuro), var(--azul-profundo));
    z-index: 1000;
    padding: 0 20px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
}

.logo {
    color: var(--dorado);
    font-size: 1.6rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.nav-link i {
    color: var(--dorado);
    font-size: 0.85rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--dorado-claro);
    background: rgba(212, 175, 55, 0.12);
}

/* Submenú desplegable */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--azul-profundo);
    min-width: 240px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    list-style: none;
    border-top: 3px solid var(--dorado);
    z-index: 100;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: #ddd;
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.dropdown-menu li a:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--dorado-claro);
    padding-left: 25px;
}

/* Hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 30px;
    height: 25px;
    z-index: 1002;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: var(--dorado);
    margin: 3px 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ---------- HEADER DE PÁGINAS INTERNAS ---------- */
.page-header {
    padding: 130px 30px 70px;
    background: linear-gradient(135deg, rgba(15,36,56,0.95), rgba(26,58,92,0.9));
    background-size: cover;
    background-position: center;
    text-align: center;
    color: white;
}

.page-header .breadcrumb {
    font-size: 0.9rem;
    color: #b8c5d6;
    margin-bottom: 15px;
}

.page-header .breadcrumb a {
    color: var(--dorado);
    text-decoration: none;
}

.page-header .breadcrumb a:hover {
    color: var(--dorado-claro);
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-header p {
    font-size: 1.2rem;
    color: #d1d9e6;
    max-width: 700px;
    margin: 0 auto;
}

/* ---------- CONTENEDOR ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 25px;
}

/* ---------- TÍTULOS DE SECCIÓN ---------- */
.section-title {
    font-size: 2.2rem;
    color: var(--azul-profundo);
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    padding-bottom: 18px;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--dorado), var(--dorado-claro), var(--dorado));
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--texto-gris-claro);
    font-size: 1.15rem;
    margin-bottom: 50px;
}

/* ---------- BOTONES CTA ---------- */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--dorado), var(--dorado-claro));
    color: var(--azul-oscuro);
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    border: 2px solid rgba(255,255,255,0.2);
    margin: 5px;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.6);
}

.cta-button.secondary {
    background: transparent;
    color: white;
    border: 2px solid var(--dorado);
}

.cta-button.secondary:hover {
    background: var(--dorado);
    color: var(--azul-oscuro);
}

/* ---------- BOTONES FLOTANTES ---------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 996;
    background: linear-gradient(135deg, var(--azul-profundo), var(--azul-oscuro));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    box-shadow: 0 6px 20px rgba(26, 58, 92, 0.4);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    border: 2px solid rgba(212, 175, 55, 0.5);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.05);
    background: linear-gradient(135deg, var(--dorado), var(--dorado-claro));
    color: var(--azul-oscuro);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.6);
}

.btn-call {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #006400, #228B22);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 6px 20px rgba(0, 100, 0, 0.4);
    transition: all 0.4s ease;
    z-index: 999;
    text-decoration: none;
    border: 2px solid rgba(144, 238, 144, 0.5);
    animation: pulse-green 3s infinite;
}

.btn-call.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
}

.btn-call:hover {
    background: linear-gradient(135deg, #228B22, #32CD32);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 100, 0, 0.6);
    animation: none;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 6px 20px rgba(0, 100, 0, 0.4); }
    50% { box-shadow: 0 6px 25px rgba(0, 100, 0, 0.6); }
}

/* ---------- FOOTER ---------- */
.main-footer {
    background: var(--azul-oscuro);
    color: #b8c5d6;
    padding: 50px 20px 20px;
    margin-top: 60px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    padding-bottom: 30px;
}

.footer-col h4 {
    color: var(--dorado);
    margin-bottom: 18px;
    font-size: 1.05rem;
}

.footer-col p,
.footer-col a {
    color: #b8c5d6;
    line-height: 1.8;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--dorado-claro);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #7a8a9e;
    font-size: 0.88rem;
}

/* ---------- CTA BOX ---------- */
.cta-box {
    background: linear-gradient(135deg, var(--azul-oscuro), var(--azul-profundo));
    color: white;
    padding: 60px 40px;
    border-radius: 20px;
    text-align: center;
    margin-top: 50px;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.15) 0%, transparent 50%);
}

.cta-box h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.cta-box p {
    color: #c5d0dc;
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    position: relative;
    z-index: 2;
}

.cta-box .cta-button {
    position: relative;
    z-index: 2;
}

/* ---------- FORMULARIOS ---------- */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--azul-profundo);
    margin-bottom: 8px;
    font-size: 0.92rem;
}

.form-group label .required {
    color: #d32f2f;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e1e5ea;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--texto-oscuro);
    transition: all 0.3s;
    background: #fafbfc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--dorado);
    background: white;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0aec0;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--dorado), var(--dorado-claro));
    color: var(--azul-oscuro);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.6);
}

.form-note {
    text-align: center;
    color: #8a9aab;
    font-size: 0.82rem;
    margin-top: 15px;
    line-height: 1.6;
}

.form-note a {
    color: var(--azul-profundo);
    text-decoration: underline;
}

/* Mensaje de éxito */
.success-msg {
    display: none;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
    padding: 18px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    align-items: center;
    gap: 12px;
}

.success-msg.show {
    display: flex;
}

.success-msg i {
    font-size: 1.4rem;
}

/* ---------- ACORDEÓN FAQ ---------- */
.faq-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    overflow: hidden;
    border-left: 5px solid transparent;
    transition: all 0.3s;
}

.faq-item:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.faq-item.active {
    border-left-color: var(--dorado);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 22px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--azul-profundo);
    transition: all 0.3s;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-question .q-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--azul-profundo), var(--azul-oscuro));
    color: var(--dorado);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
}

.faq-question .q-text {
    flex: 1;
}

.faq-question .q-toggle {
    flex-shrink: 0;
    font-size: 1.1rem;
    color: var(--dorado);
    transition: transform 0.3s ease;
}

.faq-item.active .q-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 28px;
}

.faq-item.active .faq-answer {
    max-height: 600px;
    padding: 0 28px 25px;
}

.faq-answer p {
    color: var(--texto-gris);
    line-height: 1.8;
    font-size: 1.02rem;
    margin-bottom: 12px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul {
    margin: 10px 0 15px 22px;
}

.faq-answer ul li {
    color: var(--texto-gris);
    line-height: 1.7;
    margin-bottom: 8px;
}

.faq-answer a {
    color: var(--azul-profundo);
    font-weight: 600;
    text-decoration: underline;
}

.faq-answer a:hover {
    color: var(--dorado);
}

/* ---------- CAJA LEGAL ---------- */
.legal-box {
    background: white;
    border-radius: 20px;
    padding: 55px 50px;
    box-shadow: var(--sombra-suave);
}

.legal-box .last-update {
    background: var(--gris-medio);
    padding: 14px 20px;
    border-radius: 10px;
    border-left: 4px solid var(--dorado);
    color: var(--texto-gris);
    font-size: 0.92rem;
    margin-bottom: 35px;
}

.legal-box .last-update strong {
    color: var(--azul-profundo);
}

.legal-box h2 {
    color: var(--azul-profundo);
    font-size: 1.55rem;
    margin: 35px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gris-medio);
}

.legal-box h2:first-of-type {
    margin-top: 0;
}

.legal-box h2 i {
    color: var(--dorado);
    margin-right: 10px;
    font-size: 1.2rem;
}

.legal-box p {
    color: var(--texto-gris);
    line-height: 1.9;
    font-size: 1.02rem;
    margin-bottom: 15px;
}

.legal-box ul,
.legal-box ol {
    margin: 0 0 20px 20px;
}

.legal-box ul li,
.legal-box ol li {
    color: var(--texto-gris);
    line-height: 1.8;
    margin-bottom: 10px;
    padding-left: 8px;
}

.legal-box a {
    color: var(--azul-profundo);
    font-weight: 600;
    text-decoration: underline;
}

.legal-box a:hover {
    color: var(--dorado);
}

.legal-box .contact-line {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--texto-gris);
    margin-bottom: 10px;
    font-size: 1rem;
}

.legal-box .contact-line i {
    color: var(--dorado);
    width: 22px;
}

.highlight-box {
    background: linear-gradient(135deg, #f8fafc, var(--gris-medio));
    border-left: 5px solid var(--dorado);
    padding: 25px 30px;
    border-radius: 10px;
    margin: 25px 0;
}

.highlight-box p {
    margin: 0;
}

.highlight-box p:not(:last-child) {
    margin-bottom: 12px;
}

/* ---------- RESPONSIVE GLOBAL ---------- */
@media (max-width: 1200px) {
    .nav-link {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    .nav-menu {
        gap: 4px;
    }
}

@media (max-width: 1024px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 340px;
        height: 100vh;
        background: linear-gradient(135deg, var(--azul-oscuro), var(--azul-profundo));
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 100px 30px 30px;
        transition: right 0.4s ease;
        box-shadow: -5px 0 25px rgba(0,0,0,0.3);
        gap: 0;
        z-index: 1001;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-item {
        width: 100%;
        margin: 4px 0;
    }

    .nav-link {
        display: block;
        padding: 14px 18px;
        width: 100%;
        font-size: 1rem;
        border-left: 3px solid transparent;
        border-radius: 8px;
    }

    .nav-link:hover {
        border-left-color: var(--dorado);
        transform: translateX(5px);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0,0,0,0.2);
        margin-top: 5px;
        display: none;
        border-top: none;
    }

    .nav-item.dropdown-open .dropdown-menu {
        display: block;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .legal-box {
        padding: 35px 25px;
    }

    .legal-box h2 {
        font-size: 1.3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .cta-box {
        padding: 45px 25px;
    }

    .cta-box h2 {
        font-size: 1.6rem;
    }

    .faq-question {
        padding: 18px 20px;
        font-size: 1rem;
    }

    .faq-question .q-icon {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .faq-item.active .faq-answer {
        padding: 0 20px 20px;
    }
}

@media (max-width: 768px) {
    .back-to-top,
    .btn-call {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
        bottom: 25px;
    }

    .btn-call {
        left: 25px;
    }

    .back-to-top {
        right: 25px;
    }

    .container {
        padding: 40px 20px;
    }

    .footer-grid {
        gap: 30px;
    }

    .cta-button {
        padding: 13px 25px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 600px) {
    .page-header h1 {
        font-size: 1.7rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        width: 100%;
    }

    .logo {
        font-size: 1.3rem;
    }

    .back-to-top,
    .btn-call {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
        bottom: 20px;
    }

    .btn-call {
        left: 20px;
    }

    .back-to-top {
        right: 20px;
    }
}