@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Outfit:wght@300;400;500;600&display=swap');

:root {
    /* Colors */
    --color-bg: #f8f9fc;
    --color-text-main: #1e293b;
    --color-text-muted: #64748b;
    --color-primary: #0056b3;
    /* Doctor's current blue accent */
    --color-primary-light: #3b82f6;
    --color-secondary: #0ea5e9;
    --color-white: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0056b3 0%, #0ea5e9 100%);
    --gradient-text: linear-gradient(135deg, #1e293b 0%, #0056b3 100%);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --glass-blur: blur(12px);

    /* Layout */
    --max-width: 1200px;
    --nav-height: 80px;
}

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

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--color-text-main);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background animated glows */
.bg-glows {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: rgba(59, 130, 246, 0.3);
    top: -200px;
    left: -200px;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: rgba(14, 165, 233, 0.25);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.glow-3 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.2);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Reusable Components */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
    position: relative;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.12);
}

/* El navbar usa glass-card pero NO debe moverse al pasar el mouse */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.6);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: var(--max-width);
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    /* Sin transition ni hover: el navbar siempre está quieto */
}

.navbar:hover {
    transform: translateX(-50%); /* mantiene solo el centrado, sin movimiento vertical */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.navbar .logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar .logo span {
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-main);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--nav-height) + 2rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
}

.hero-image-wrapper {
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-image-wrapper:hover .hero-image {
    transform: scale(1.05);
}



/* Trust Section */
.trust-section {
    padding: 3rem 0;
    text-align: center;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
}

.trust-section p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.logo-row img {
    height: 60px;
    object-fit: contain;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.logo-row img:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Values Grid */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

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

.value-card {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.value-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: rgba(14, 165, 233, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.value-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

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

/* Social Proof (Stats) */
.stats-banner {
    background: var(--gradient-primary);
    border-radius: 30px;
    padding: 4rem 2rem;
    color: white;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.2);
    margin: 5rem 0;
    position: relative;
    overflow: hidden;
}

.stats-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    animation: pulse 10s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0.5; }
}

.stat-item {
    text-align: center;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 4rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Methodology */
.methodology {
    padding: 5rem 0;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    width: 2px;
    height: 100%;
    background: rgba(14, 165, 233, 0.2);
    z-index: 0;
}

@media(min-width: 768px) {
    .steps-container::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

.step-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

@media(min-width: 768px) {
    .step-item:nth-child(even) {
        flex-direction: row-reverse;
    }
    .step-item > * {
        width: 50%;
    }
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--color-white);
    border: 2px solid var(--color-primary);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Montserrat';
    color: var(--color-primary);
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 0 0 10px var(--color-bg);
}

@media(min-width: 768px) {
    .step-number {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
}

.step-content {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: 2rem;
    border-radius: 20px;
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.step-content h3 {
    margin-bottom: 0.5rem;
    color: var(--color-text-main);
}

.step-content p {
    color: var(--color-text-muted);
}

/* Success Cases */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.case-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.case-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

/* Location */
.location {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-radius: 30px;
    padding: 3rem;
    border: var(--glass-border);
}

.location-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.location-item i {
    color: var(--color-primary);
    margin-top: 0.25rem;
}

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    color: var(--color-text-muted);
}

/* Footer */
footer {
    background: #0f172a;
    padding: 5rem 0 0 0;
    color: white;
}

/* ===== Blog Section ===== */
#blog {
    padding-top: 6rem;    /* Fix 1: espacio arriba respecto al mapa */
    padding-bottom: 3rem; /* Fix 3: espacio abajo antes del FAQ */
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Fix 2: siempre 2 columnas × 2 filas */
    gap: 2rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px 0 rgba(31, 38, 135, 0.14);
}

.blog-card-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.12), rgba(14, 165, 233, 0.12));
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    border: 1px solid rgba(0, 86, 179, 0.2);
    width: fit-content;
}

.blog-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1.35;
    margin: 0;
}

.blog-card-excerpt {
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.65;
    flex-grow: 1;
    margin: 0;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 86, 179, 0.1);
    margin-top: auto;
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}

.blog-card-link:hover {
    gap: 0.6rem;
    color: var(--color-secondary);
}

/* WhatsApp Float Button */
.whatsapp-float-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.whatsapp-float-btn:hover {
    transform: scale(1.1);
}

.whatsapp-float-btn svg {
    fill: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image-wrapper {
        max-width: 600px;
        margin: 0 auto 2rem;
    }



    .location {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar, .navbar:hover {
        left: 0;
        right: 0;
        margin: 0 auto;
        transform: none; /* Previene el salto al tocar el menú (hover) */
        width: max-content;
        max-width: calc(100vw - 2rem);
        padding: 0 0.75rem; /* Reducido para ahorrar espacio */
        justify-content: center;
        gap: 0.5rem; /* Reducido para acercar el menú y ahorrar espacio */
    }
    .navbar .logo {
        font-size: 0.9rem; /* Fuente más pequeña para que quepa en una línea */
        white-space: nowrap;
        margin: 0;
        display: flex;
        align-items: center;
    }
    .navbar .logo svg, .navbar .logo i {
        width: 16px;
        height: 16px;
    }
    .nav-links {
        display: none;
    }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 5rem;
        left: 1rem;
        right: 1rem;
        width: auto;
        background: rgba(255, 255, 255, 0.98);
        padding: 1.5rem;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(0, 0, 0, 0.05);
        z-index: 999;
    }
    .nav-links.active a {
        padding: 0.85rem 0;
        display: block;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        text-align: center;
        font-size: 1.05rem;
    }
    .nav-links.active li:last-child a {
        border-bottom: none;
    }
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0.25rem;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .stat-number {
        font-size: 3rem;
    }
    .step-content {
        margin-left: 2rem;
    }
    .whatsapp-float-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-float-btn svg {
        width: 25px;
        height: 25px;
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
}
