/* ==========================================
   VARIABLES Y ESTILOS GLOBALES
   ========================================== */
:root {
    --primary: #005A9E;        /* Azul corporativo Microsoft/Azure */
    --primary-dark: #003f75;
    --accent: #0078D4;         /* Azul brillante */
    --text-dark: #1f2937;
    --text-muted: #4b5563;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    padding-bottom: 90px; /* Deja espacio libre abajo para que el banner flotante no tape el footer */
}

.container {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   HEADER Y NAVEGACIÓN RESPONSIVE
   ========================================== */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.nav-container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0px;
}

.logo-azur {
    color: #0078D4; 
}

.logo-sec {
    color: #1f2937;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    padding-bottom: 4px; /* Espacio estético para el borde inferior */
}

.main-nav a:hover {
    color: var(--primary);
    font-weight: 700;
}

/* Estado activo del menú */
.main-nav a.active {
    color: #3498db !important;
    font-weight: bold;
    border-bottom: 2px solid #3498db;
}

/* Botón de Calendly en la barra de navegación */
.main-nav .nav-btn-calendly {
    background-color: #2c3e50;
    color: #ffffff !important;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.main-nav .nav-btn-calendly:hover {
    background-color: #1a252f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    padding: 80px 0 60px 0;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(0, 90, 158, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 auto 25px auto;
}

.hero-certs {
    background: var(--bg-white);
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ==========================================
   BOTONES UNIFICADOS Y CORREGIDOS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 90, 158, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background-color: rgba(0, 90, 158, 0.05);
    transform: translateY(-1px);
}

/* ==========================================
   SECCIÓN SERVICIOS
   ========================================== */
.servicios {
    padding: 70px 0;
    background-color: var(--bg-white);
}

.servicios h2, .solicitar h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 45px;
    font-size: 1.05rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 30px 25px;
    border-radius: 12px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--accent);
}

.card-icon {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ==========================================
   SECCIÓN SOBRE MÍ (EXPERT SECTION)
   ========================================== */
.expert-section {
    padding: 70px 0;
    background-color: #f1f5f9;
}

.expert-card-box {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    max-width: 800px;
    margin: 0 auto;
}

.expert-card-box h2 {
    text-align: left;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.expert-card-box p {
    margin-bottom: 15px;
    color: var(--text-muted);
}

.cert-list {
    list-style: none;
    margin-top: 20px;
}

.cert-list li {
    padding: 8px 0;
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* ==========================================
   SECCIÓN FORMULARIO (CENTRADA)
   ========================================== */
.solicitar {
    padding: 70px 0;
    background-color: var(--bg-white);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-container {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
}

.audit-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--bg-light);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 90, 158, 0.1);
    background-color: var(--bg-white);
}

.audit-form button.full-width {
    grid-column: span 2;
    width: 100%;
}

/* ==========================================
   ESTILOS PARA EL CONTENEDOR DE MENSAJE DE ÉXITO
   ========================================== */
.success-message-container {
    grid-column: span 2;
    text-align: center;
    margin: 20px auto;
    padding: 30px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.success-message-container h3 {
    color: #10b981;
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.success-message-container p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.5;
}

/* ==========================================
   BANNER DE COOKIES (GLOBAL FUERA DE MEDIA QUERY)
   ========================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1a252f;
    color: #ffffff;
    padding: 15px 20px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    font-size: 14px;
    box-sizing: border-box;
    border-top: 3px solid #3498db;
}

.cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    line-height: 1.4;
    color: #ecf0f1;
}

.cookie-content a {
    color: #3498db;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.btn-cookie-accept {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-cookie-accept:hover {
    background-color: #219653;
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.footer-sub {
    font-size: 0.85rem;
    color: #64748b;
}

/* ==========================================
   MEDIA QUERIES (MÓVILES Y TABLETS)
   ========================================== */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
    }

    .main-nav {
        justify-content: center;
        gap: 12px;
    }

    .hero {
        padding: 50px 0;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

    .hero-actions .btn {
        width: 100%;
    }

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

    .form-group.full-width {
        grid-column: span 1;
    }

    .audit-form button.full-width {
        grid-column: span 1;
    }

    .expert-card-box {
        padding: 25px 20px;
    }

    .success-message-container {
        grid-column: span 1;
    }
}

/* ==========================================
   CORRECCIÓN PARA ENLACES DE ANCLAJE EN PÁGINAS LEGALES
   ========================================== */
.main-nav a[href*="index.html#"] {
    color: var(--text-muted) !important;
    font-weight: 500 !important;
}

.main-nav a[href*="index.html#"]:hover {
    color: var(--primary) !important;
    font-weight: 700 !important;
}
