/*
 * ============================================================================
 * SENADO POR PUNO 2026 - Herbert Larry Flores Reategui
 * Hoja de Estilos Principal - CSS3 Puro
 * Versión: 2.0 | Diseño Institucional Responsive
 * ============================================================================
 */

/* =========================================
   1. VARIABLES CSS (Design Tokens)
   ========================================= */
:root {
    /* 🎨 Paleta de Colores Oficiales */
    --primary-blue: #002855;        /* Azul marino institucional */
    --primary-red: #E30613;         /* Rojo institucional */
    --andino-green: #008C45;        /* Verde andino */
    --white: #FFFFFF;               /* Blanco */
    --bg-gray: #F4F7F6;             /* Gris fondo */
    --text-dark: #1A1A1A;           /* Texto principal */
    --text-gray: #666666;           /* Texto secundario */
    --border-color: #E0E0E0;        /* Bordes */
    --overlay-dark: rgba(0, 40, 85, 0.85);

    /* 🔤 Tipografía */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* 📐 Espaciado y Dimensiones */
    --container-width: 1200px;
    --header-height: 80px;
    --section-padding: 80px 0;
    --radius: 8px;
    --radius-lg: 12px;

    /* ✨ Efectos */
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s ease;
}

/* =========================================
   2. RESET CSS & BASE STYLES
   ========================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Imágenes y medios */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Listas y enlaces */
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
a:hover { color: var(--primary-red); }

/* Formularios */
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

/* Selección de texto */
::selection {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* Scrollbar personalizado */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-gray); }
::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-red); }

/* =========================================
   3. UTILIDADES Y CLASES GLOBALES
   ========================================= */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--section-padding);
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    line-height: 1.7;
}

.divider {
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--andino-green));
    margin: 0 auto 2.5rem auto;
    border-radius: 2px;
}

/* Texto y alineación */
.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-gray { color: var(--text-gray); }
.text-blue { color: var(--primary-blue); }
.text-green { color: var(--andino-green); }
.text-red { color: var(--primary-red); }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }

.max-width-600 { max-width: 600px; margin: 0 auto; }
.max-width-800 { max-width: 800px; margin: 0 auto; }

/* Fondos */
.bg-white { background-color: var(--white); }
.bg-gray { background-color: var(--bg-gray); }
.bg-blue { background-color: var(--primary-blue); }
.bg-gradient-blue {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #003d82 100%);
}

/* =========================================
   4. BOTONES (Componentes Reutilizables)
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active { transform: translateY(0); }

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Variantes de botón */
.btn-primary {
    background-color: var(--primary-red);
    color: var(--white);
}
.btn-primary:hover {
    background-color: #b8050f;
    border-color: #b8050f;
}

.btn-secondary {
    background-color: var(--andino-green);
    color: var(--white);
}
.btn-secondary:hover {
    background-color: #006b35;
    border-color: #006b35;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
}
.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-blue);
}

.btn-outline-blue {
    background-color: transparent;
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.btn-outline-blue:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-whatsapp {
    background-color: #25D366;
    color: var(--white);
    font-weight: 600;
}
.btn-whatsapp:hover {
    background-color: #1ebc57;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Animación de carga para botones */
.btn-loading {
    position: relative;
    color: transparent !important;
}
.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================
   5. HEADER & NAVEGACIÓN
   ========================================= */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--white);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

#main-header.scrolled {
    box-shadow: var(--shadow-md);
    background-color: rgba(255,255,255,0.98);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Logo */
.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--primary-blue);
    letter-spacing: -0.3px;
}
.logo-sub {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-red);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Navegación Desktop */
.nav-menu {
    display: flex;
}
.nav-menu ul {
    display: flex;
    gap: 28px;
}
.nav-menu a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--primary-blue);
    position: relative;
    padding: 5px 0;
}
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-red);
    transition: var(--transition);
}
.nav-menu a:hover::after {
    width: 100%;
}
.nav-menu a:hover { color: var(--primary-red); }

/* Botón header desktop */
.header-btn { display: block; }

/* Menú hamburguesa (mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}
.bar {
    display: block;
    width: 26px;
    height: 3px;
    background-color: var(--primary-blue);
    border-radius: 2px;
    transition: var(--transition);
}

/* Estado activo del menú móvil */
.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Menú móvil desplegable */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: transform 0.35s ease-in-out;
        z-index: 999;
    }
    .nav-menu.active {
        transform: translateY(0);
    }
    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .nav-menu a {
        font-size: 1.1rem;
        padding: 10px 0;
    }
    .header-btn { display: none; }
    .menu-toggle { display: flex; }
}

/* =========================================
   6. HERO SECTION
   ========================================= */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    background-color: var(--primary-blue);
    background-image: 
        linear-gradient(135deg, rgba(0, 40, 85, 0.92) 0%, rgba(0, 40, 85, 0.75) 100%),
        url('../assets/lago-titicaca-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin-top: var(--header-height);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, var(--bg-gray), transparent);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Texto hero */
.hero-text {
    color: var(--white);
}
.hero-text h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.hero-subtitle {
    display: block;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}
.hero-desc {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 35px;
    max-width: 520px;
    line-height: 1.7;
}
.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Imagen hero */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: flex-end;
}
.image-frame {
    position: relative;
    background: var(--white);
    padding: 8px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 420px;
    width: 100%;
}
.image-frame::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(135deg, var(--primary-red), var(--andino-green));
    border-radius: calc(var(--radius-lg) + 2px);
    z-index: -1;
    opacity: 0.8;
}
.image-frame img {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
}

/* Responsive hero */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .hero-text { order: 2; }
    .hero-image { 
        order: 1; 
        justify-content: center;
    }
    .hero-buttons { justify-content: center; }
    .hero-desc { margin: 0 auto 35px auto; }
}

@media (max-width: 576px) {
    .hero {
        min-height: auto;
        padding: 60px 0 80px;
    }
    .image-frame { max-width: 300px; }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .btn { width: 100%; max-width: 300px; }
}

/* =========================================
   7. GRID SYSTEM & CARDS
   ========================================= */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

/* Tarjetas base */
.card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(0,40,85,0.1), rgba(0,40,85,0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-blue);
    flex-shrink: 0;
}
.card-icon svg {
    width: 28px;
    height: 28px;
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 12px;
}
.card p {
    color: var(--text-gray);
    font-size: 0.98rem;
    line-height: 1.65;
    flex-grow: 1;
}

/* Tarjetas de experiencia */
.experience-card {
    text-align: center;
    padding: 35px 25px;
}
.experience-card .card-icon {
    margin: 0 auto 20px auto;
    background: linear-gradient(135deg, var(--primary-blue), #00408a);
    color: var(--white);
}

/* Tarjetas de propuestas */
.proposal-card {
    border-top: 4px solid var(--andino-green);
    position: relative;
    overflow: hidden;
}
.proposal-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0,140,69,0.08) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30px, -30px);
    pointer-events: none;
}
.card-number {
    position: absolute;
    top: 15px;
    right: 20px;
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: rgba(0,40,85,0.06);
    line-height: 1;
    z-index: 0;
}
.proposal-card h3,
.proposal-card p,
.impact-tag {
    position: relative;
    z-index: 1;
}
.impact-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 18px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(0,140,69,0.12), rgba(0,140,69,0.08));
    color: var(--andino-green);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 20px;
    align-self: flex-start;
}
.impact-tag::before {
    content: '📈';
    font-size: 0.9rem;
}

/* =========================================
   8. SECCIÓN FISCALIZACIÓN (Fondo Oscuro)
   ========================================= */
.section-dark {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #001f3d 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.section-dark::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(227,6,19,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0,140,69,0.08) 0%, transparent 50%);
    pointer-events: none;
}
.section-dark > .container { position: relative; z-index: 2; }
.section-dark .section-title { color: var(--white); }
.section-dark .section-subtitle { color: rgba(255,255,255,0.85); }
.section-dark .divider { 
    background: linear-gradient(90deg, var(--primary-red), var(--white), var(--andino-green)); 
}

.stats-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    margin-top: 50px;
    flex-wrap: wrap;
}
.stat-box {
    text-align: center;
    padding: 20px 30px;
}
.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    color: var(--primary-red);
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 0 4px 20px rgba(227,6,19,0.3);
}
.stat-label {
    display: block;
    font-size: 1.15rem;
    font-weight: 500;
    opacity: 0.95;
    max-width: 200px;
    margin: 0 auto;
}
.stat-divider {
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.4), transparent);
}

@media (max-width: 768px) {
    .stats-container { gap: 40px; }
    .stat-divider { display: none; }
    .stat-box { padding: 15px; }
}

/* =========================================
   9. SECCIÓN DESCARGA (Plan Legislativo)
   ========================================= */
.download-box {
    background: var(--white);
    padding: clamp(30px, 5vw, 50px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border-left: 5px solid var(--primary-blue);
    text-align: center;
    max-width: 850px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}
.download-box::before {
    content: '';
    position: absolute;
    top: -50%; right: -50%;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(0,40,85,0.05) 0%, transparent 70%);
    border-radius: 50%;
}
.download-box h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 12px;
}
.download-box p {
    color: var(--text-gray);
    margin-bottom: 25px;
    font-size: 1.05rem;
}
.download-box .btn {
    margin-top: 10px;
    min-width: 280px;
}
.download-box .btn svg {
    transition: var(--transition);
}
.download-box .btn:hover svg {
    transform: translateY(2px);
}

/* Badge informativo */
.download-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0,140,69,0.1);
    color: var(--andino-green);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.download-badge::before {
    content: '✓';
    font-weight: 800;
}

/* =========================================
   10. FORMULARIO DE CONTACTO - DISEÑO MODERNO
   ========================================= */

/* Grid del contacto */
.contact-grid { align-items: start; }

/* Tarjeta de información de contacto */
.contact-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #003d82 100%);
    color: var(--white);
    padding: clamp(25px, 4vw, 40px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: calc(var(--header-height) + 30px);
}
.contact-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

/* Items de contacto */
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.contact-item:last-child { border-bottom: none; }

.contact-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--white);
    transition: var(--transition);
}
.contact-item:hover .contact-icon {
    background: var(--primary-red);
    transform: scale(1.05);
}

.contact-item strong {
    display: block;
    font-size: 0.75rem;
    opacity: 0.85;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}
.contact-item a {
    color: var(--white);
    font-weight: 500;
    font-size: 1.05rem;
    transition: opacity 0.2s;
    word-break: break-all;
}
.contact-item a:hover {
    opacity: 0.95;
    text-decoration: underline;
}

/* Botón WhatsApp en tarjeta */
.contact-card .btn-whatsapp {
    margin: 25px 0;
    width: 100%;
    background: var(--white);
    color: var(--primary-blue);
    font-weight: 700;
    padding: 14px;
    font-size: 1rem;
}
.contact-card .btn-whatsapp:hover {
    background: var(--andino-green);
    color: var(--white);
    transform: translateY(-3px);
}

/* Redes sociales */
.social-links {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.social-link {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}
.social-link:hover {
    background: var(--primary-red);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 20px rgba(227,6,19,0.4);
}
.social-link svg { width: 20px; height: 20px; }

/* =========================================
   11. FORMULARIO - ESTILOS AVANZADOS
   ========================================= */

.contact-form-wrapper {
    background: var(--white);
    padding: clamp(25px, 4vw, 45px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Fila de inputs */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Inputs, Select y Textarea */
.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    background: #fafafa;
    transition: var(--transition);
    color: var(--text-dark);
}
.form-control::placeholder { color: #9ca3af; }
.form-control:hover { border-color: #d1d5db; }
.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--white);
    box-shadow: 0 0 0 5px rgba(0, 40, 85, 0.12);
}
.form-control.error {
    border-color: var(--primary-red);
    background: #fff5f5;
    animation: shake 0.4s ease;
}
.form-control.success {
    border-color: var(--andino-green);
    background: #f0fdf4;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Select personalizado */
.form-control:is(select) {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
    cursor: pointer;
}

/* Labels con indicador de requerido */
.form-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--primary-blue);
}
.form-group label::after {
    content: "*";
    color: var(--primary-red);
    font-size: 0.85rem;
    line-height: 1;
}
/* Ocultar asterisco en campos no requeridos */
.form-group:has(#subject) label::after,
.form-group:has(#privacy) label::after { display: none; }

/* Mensajes de error */
.form-error {
    display: block;
    color: var(--primary-red);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 6px;
    min-height: 20px;
    opacity: 0;
    transform: translateY(-8px);
    transition: var(--transition);
}
.form-error.show {
    opacity: 1;
    transform: translateY(0);
}

/* Contador de caracteres */
.char-count {
    display: block;
    text-align: right;
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 6px;
    font-weight: 500;
}
.char-count.warning { color: #f59e0b; }
.char-count.danger { color: var(--primary-red); font-weight: 700; }

/* Checkbox de privacidad */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 15px 0 25px;
    font-size: 0.92rem;
    color: var(--text-gray);
    line-height: 1.5;
}
.form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--primary-blue);
    cursor: pointer;
    border-radius: 4px;
}
.form-check label {
    cursor: pointer;
    margin: 0;
    font-weight: 400;
    color: inherit;
}
.form-check label::after { display: none; }
.form-check a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}
.form-check a:hover { text-decoration: underline; }

/* Botón de envío */
.btn-submit {
    margin-top: 15px;
    padding: 16px;
    font-size: 1.05rem;
    position: relative;
    overflow: hidden;
}
.btn-submit::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn-submit:hover::before { left: 100%; }
.btn-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Mensaje de éxito */
.form-success {
    margin-top: 20px;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(0,140,69,0.12), rgba(0,140,69,0.08));
    border: 1px solid var(--andino-green);
    border-left: 4px solid var(--andino-green);
    border-radius: 8px;
    color: var(--andino-green);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    animation: slideInUp 0.4s ease;
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   12. FOOTER
   ========================================= */
.footer {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    color: #a0a0a0;
    padding: 60px 0 25px;
    font-size: 0.95rem;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    text-align: center;
}
.footer-brand { margin-bottom: 5px; }
.footer-brand .logo-text {
    color: var(--white);
    font-size: 1.6rem;
    margin-bottom: 5px;
}
.footer-brand p {
    opacity: 0.8;
    font-size: 0.95rem;
}
.footer-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-links a {
    color: #ccc;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}
.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--primary-red);
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--white);
}
.footer-links a:hover::after { width: 100%; }

.copyright {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #333;
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}
.copyright .legal {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
}

/* =========================================
   13. ANIMACIONES SCROLL (Intersection Observer)
   ========================================= */
.fade-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    will-change: opacity, transform;
}
.fade-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Variantes de animación */
.fade-left { transform: translateX(-40px); }
.fade-right { transform: translateX(40px); }
.fade-left.visible,
.fade-right.visible { transform: translateX(0); }

/* Delay escalonado para grids */
.grid-3 .fade-element:nth-child(2) { transition-delay: 0.1s; }
.grid-3 .fade-element:nth-child(3) { transition-delay: 0.2s; }
.grid-4 .fade-element:nth-child(2) { transition-delay: 0.1s; }
.grid-4 .fade-element:nth-child(3) { transition-delay: 0.15s; }
.grid-4 .fade-element:nth-child(4) { transition-delay: 0.2s; }

/* =========================================
   14. RESPONSIVE - MEDIA QUERIES
   ========================================= */

/* Tablet */
@media (max-width: 992px) {
    :root { --section-padding: 70px 0; }
    
    .section-title { font-size: 2rem; }
    
    .grid-2 { grid-template-columns: 1fr; }
    
    .contact-card {
        position: static;
        margin-bottom: 35px;
    }
    
    .form-row { grid-template-columns: 1fr; gap: 0; }
    
    .stats-container { gap: 40px; }
    .stat-divider { display: none; }
}

/* Mobile */
@media (max-width: 768px) {
    :root { 
        --section-padding: 60px 0;
        --header-height: 70px;
    }
    
    .container { width: 92%; padding: 0 16px; }
    
    .section-title { font-size: 1.7rem; }
    .section-subtitle { font-size: 1rem; }
    
    .card { padding: 25px 20px; }
    
    .contact-form-wrapper { padding: 30px 20px; }
    
    .download-box { padding: 35px 25px; }
    .download-box .btn { width: 100%; max-width: 320px; }
    
    .social-links { justify-content: center; }
    
    .footer-links { gap: 20px; flex-direction: column; align-items: center; }
}

/* Mobile pequeño */
@media (max-width: 480px) {
    .hero { padding: 50px 0 70px; }
    .hero-text h1 { font-size: 1.8rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .hero-desc { font-size: 1rem; }
    
    .image-frame { max-width: 260px; }
    
    .btn { 
        padding: 11px 24px; 
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
    }
    .btn-lg { padding: 14px 28px; font-size: 1rem; }
    
    .form-control { padding: 12px 16px; font-size: 0.95rem; }
    
    .stat-number { font-size: 3.5rem; }
    .stat-label { font-size: 1rem; }
}

/* =========================================
   15. ACCESIBILIDAD & PREFERENCIAS
   ========================================= */

/* Focus visible para navegación por teclado */
:focus-visible {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Reducir movimiento para usuarios con preferencia */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-element {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Alto contraste */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --text-gray: #333;
    }
    .card { border-width: 2px; }
    .form-control { border-width: 3px; }
}

/* =========================================
   16. UTILIDADES ADICIONALES
   ========================================= */

/* Skip link para accesibilidad */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-blue);
    color: var(--white);
    padding: 12px 24px;
    z-index: 2000;
    transition: top 0.3s;
}
.skip-link:focus { top: 0; }

/* Loading placeholder para imágenes */
.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius);
}
@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Print styles */
@media print {
    #main-header, .hero, .footer { display: none; }
    .section { padding: 20px 0; }
    .card { break-inside: avoid; box-shadow: none; border: 1px solid #000; }
    a { text-decoration: underline; color: #000; }
}