/* =========================================
   VARIABLES & DESIGN TOKENS
   ========================================= */
:root {
    /* Colors */
    --primary: #0A2540; /* Deep political blue */
    --primary-light: #1A3E66;
    --accent: #F9A826; /* Vibrant warm gold/orange */
    --accent-hover: #E0931B;
    --text-main: #333333;
    --text-muted: #666666;
    --bg-light: #FAFAFA;
    --bg-white: #FFFFFF;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --section-padding: 5rem 1rem;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    /* Shadows & Glassmorphism */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

ul {
    list-style: none;
}

/* =========================================
   UTILITIES
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: var(--section-padding);
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}

.section-header.center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-header.center {
    text-align: center;
    margin-bottom: 3rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(10, 37, 64, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 37, 64, 0.4);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.full-width {
    width: 100%;
}

.text-link {
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.text-link:hover {
    color: var(--primary);
    gap: 0.75rem;
}

/* =========================================
   HEADER & NAV (GLASSMORPHISM)
   ========================================= */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
    transition: all var(--transition-base);
    padding: 1rem 0;
}

.glass-header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
}

.logo-bold {
    font-weight: 800;
    color: var(--accent);
}

.site-logo {
    max-height: 160px; /* Duplicado a petición del usuario */
    margin-top: -60px; /* Evita que el encabezado se haga ancho */
    margin-bottom: -60px; /* Evita que el encabezado se haga ancho */
    width: auto;
    display: block;
    transition: transform var(--transition-base);
}

.logo:hover .site-logo {
    transform: scale(1.05);
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-main);
    font-weight: 500;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width var(--transition-base);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

/* =========================================
   1. HERO SECTION
   ========================================= */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    color: white;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top; /* Alineado hacia arriba para que no se corte el rostro */
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10,37,64,0.9) 0%, rgba(10,37,64,0.6) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: white;
}

.hero-content .subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.metrics-container {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
}

.metric {
    text-align: left;
}

.metric span {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    display: inline-block;
    line-height: 1;
}

.metric .odometer-plus {
    font-size: 2.5rem;
}

.metric p {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* =========================================
   2. ABOUT SECTION
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.about-image {
    width: 100%;
    height: 600px;
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius-lg);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    border: var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.badge-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.badge-text {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

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

/* =========================================
   3. TIMELINE SECTION
   ========================================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 4px;
    background-color: rgba(10, 37, 64, 0.1);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    top: 0;
    left: 12px;
    width: 20px;
    height: 20px;
    background-color: var(--bg-white);
    border: 4px solid var(--primary);
    border-radius: 50%;
    z-index: 1;
}

.timeline-dot.highlight-dot {
    border-color: var(--accent);
    background-color: var(--accent);
    box-shadow: 0 0 0 6px rgba(249, 168, 38, 0.2);
}

.timeline-content {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.timeline-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.timeline-item.highlight .timeline-content {
    background-color: var(--primary);
    color: white;
}

.timeline-item.highlight .timeline-content h3 {
    color: white;
}

.timeline-item.highlight .timeline-content p {
    color: rgba(255, 255, 255, 0.9);
}

/* =========================================
   4. RESULTS SECTION
   ========================================= */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.result-card {
    background: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.result-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(10, 37, 64, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(10, 37, 64, 0.05);
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: background-color var(--transition-base), color var(--transition-base);
}

.result-card:hover .card-icon {
    background-color: var(--primary);
    color: white;
}

.result-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-highlight {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--accent);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* =========================================
   5. SOCIAL / FEED SECTION
   ========================================= */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.social-post {
    background: var(--bg-white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base);
}

.social-post:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.post-img {
    height: 350px;
    background-size: cover;
    background-position: center;
}

.post-content {
    padding: 1.5rem;
}

.post-tag {
    display: inline-block;
    background-color: rgba(249, 168, 38, 0.15);
    color: #D98B12;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.center-cta {
    text-align: center;
}

.cta-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* =========================================
   6. CONTACT SECTION
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-options {
    margin: 2rem 0;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(0,0,0,0.05);
}

.contact-option.interactive {
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.contact-option.interactive:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.option-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.contact-option h4 {
    margin-bottom: 0.25rem;
}

.contact-option p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--bg-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-base);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.mt-4 {
    margin-top: 2rem;
}

/* Form */
.contact-form-wrapper {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.contact-form h3 {
    margin-bottom: 2rem;
    color: var(--primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.1);
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background-color: var(--primary);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-site-logo {
    max-height: 220px; /* Duplicado a petición del usuario */
    width: auto;
    filter: brightness(0) invert(1); /* Si el logo es oscuro, esto lo hace blanco para que resalte en el footer azul */
    opacity: 0.9;
}

.footer-logo .logo-bold {
    color: var(--accent);
}

.footer-content p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* =========================================
   FLOATING ASSISTANT & MODAL (n8n Webhook)
   ========================================= */
.floating-assistant {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(10, 37, 64, 0.4);
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-assistant:hover {
    transform: scale(1.1);
    background-color: var(--accent);
}

.assistant-modal {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: var(--bg-white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.1);
}

.assistant-modal.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.assistant-header {
    background: var(--primary);
    color: white;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.assistant-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.assistant-status {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 5px;
}

.assistant-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
}

#close-assistant {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#close-assistant:hover {
    opacity: 1;
}

.assistant-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background-color: #f5f7f9;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.system-msg {
    background-color: white;
    color: var(--text-main);
    border: 1px solid #e1e4e8;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.user-msg {
    background-color: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.assistant-footer {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e1e4e8;
    display: flex;
    gap: 0.5rem;
}

.assistant-footer input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    outline: none;
    font-family: var(--font-body);
    transition: border-color 0.2s;
}

.assistant-footer input:focus {
    border-color: var(--primary);
}

.assistant-footer button {
    width: 45px;
    height: 45px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.assistant-footer button:hover {
    transform: scale(1.05);
}

/* Loading dots for bot thinking */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
    width: fit-content;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #aaa;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* =========================================
   ANIMATIONS & REVEALS
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

.animate-fade-up {
    animation: fadeUp 1s cubic-bezier(0.5, 0, 0, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   RESPONSIVE DESIGN (MOBILE FIRST)
   ========================================= */
@media (max-width: 992px) {
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image {
        height: 400px;
    }
    
    .metrics-container {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-white);
        flex-direction: column;
        gap: 0;
        box-shadow: var(--shadow-md);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease;
    }
    
    .main-nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .main-nav a {
        padding: 1.5rem;
        border-bottom: 1px solid #eee;
        display: block;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .assistant-modal {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 100px;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-dot {
        left: 7px;
    }
    
    .timeline-item {
        padding-left: 45px;
    }
}
