/* Reset y Variables - Paleta basada en logo Bioenlace (coral #E68A7D); página con predominio de blanco */
:root {
    /* Logo y coral (uso acotado) */
    --primary-color: #E68A7D;
    --primary-dark: #c97265;
    --primary-light: #f0b5ac;
    --primary-lighter: #fceeea;
    --primary-pale: #fdf8f7;
    /* Color complementario (teal/salud) */
    --complement-color: #5a9a8c;
    --complement-light: #8bc4b8;
    --complement-pale: #e8f4f1;
    /* Neutros y acentos */
    --secondary-color: #a8d5c9;
    --accent-color: #d4a574;
    --text-dark: #2d2524;
    --text-light: #5c504f;
    --bg-light: #fafafa;
    --bg-white: #ffffff;
    --border-color: #eeeceb;
    --shadow-sm: 0 1px 2px 0 rgba(230, 138, 125, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(230, 138, 125, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(230, 138, 125, 0.12);
    --shadow-xl: 0 20px 25px -5px rgba(230, 138, 125, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 42px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--primary-lighter) 30%, var(--bg-white) 100%);
    opacity: 1;
    z-index: -1;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(230, 138, 125, 0.04) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--primary-color);
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* About Section */
.about {
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    width: 100%;
    max-width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 5rem;
    box-shadow: var(--shadow-xl);
}

/* Services Section */
.services {
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}
.service-card:nth-child(2) {
    border-top: 3px solid var(--complement-light);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.service-card:nth-child(1) .service-icon {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}
.service-card:nth-child(2) .service-icon {
    background: linear-gradient(135deg, var(--complement-light), var(--complement-color));
}
.service-card:nth-child(3) .service-icon {
    background: linear-gradient(135deg, var(--primary-light), var(--complement-color));
}
.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.service-features {
    list-style: none;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-card:nth-child(1) .service-features i { color: var(--primary-color); }
.service-card:nth-child(2) .service-features i { color: var(--complement-color); }
.service-card:nth-child(3) .service-features i { color: var(--complement-color); }
.service-features i {
    color: var(--primary-color);
}

/* Features Section */
.features {
    background: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item:nth-child(even) {
    border-left: 3px solid var(--complement-light);
}
.feature-item {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-item:nth-child(odd) .feature-icon {
    background: var(--primary-lighter);
    color: var(--primary-color);
}
.feature-item:nth-child(even) .feature-icon {
    background: var(--complement-pale);
    color: var(--complement-color);
}
.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-lighter);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.feature-item h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-item p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Caso de uso - Scrollytelling: 3 flujos, elementos aparecen al hacer scroll */
.caso-de-uso {
    background: var(--bg-white);
}

.flow-block {
    margin-bottom: 4rem;
}

.flow-block:last-child {
    margin-bottom: 0;
}

.flow-block__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

.flow-block--paciente .flow-block__title { color: var(--primary-color); }
.flow-block--medico .flow-block__title { color: var(--complement-color); }
.flow-block--institucion .flow-block__title { color: var(--text-light); }

.flow-timeline {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.flow-timeline--empty {
    min-height: 120px;
    align-items: center;
    justify-content: center;
}

.flow-empty-message {
    color: var(--text-light);
    font-size: 1rem;
}

.flow-step {
    width: 100%;
    text-align: center;
    padding: 0 1rem 0;
}

/* Contenido oculto por defecto; aparece al hacer scroll (.flow-step.visible) */
.flow-step__content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.45s ease;
}

.flow-step.visible .flow-step__content {
    opacity: 1;
    transform: translateY(0);
}

.flow-node {
    transition: box-shadow 0.4s ease;
}

.flow-step.visible .flow-node {
    box-shadow: 0 0 0 2px var(--primary-light);
}

.flow-block--medico .flow-step.visible .flow-node {
    box-shadow: 0 0 0 2px var(--complement-light);
}

.flow-node__image-placeholder {
    min-height: 180px;
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.9375rem;
    padding: 1.25rem;
    margin: 0 auto 0.75rem;
    max-width: 100%;
    transition: border-color 0.4s ease, background 0.4s ease;
}

.flow-step.visible .flow-node__image-placeholder {
    border-color: var(--primary-light);
    background: var(--primary-lighter);
}

.flow-block--medico .flow-step.visible .flow-node__image-placeholder {
    border-color: var(--complement-light);
    background: var(--complement-pale);
}

.flow-node__label {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.flow-step__text {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.flow-connector {
    width: 40px;
    height: 50px;
    margin: 0 auto 0.5rem;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.4s ease 0.2s;
}

.flow-step.visible .flow-connector {
    opacity: 1;
}

.flow-arrow {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.flow-arrow__line,
.flow-arrow__head {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 2;
    transition: stroke 0.4s ease, fill 0.4s ease;
}

.flow-arrow__line {
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    transition: stroke-dashoffset 0.55s ease 0.15s, stroke 0.4s ease;
}

.flow-arrow__head {
    stroke: var(--border-color);
    fill: var(--border-color);
    transition: fill 0.4s ease, stroke 0.4s ease;
}

.flow-step.visible .flow-connector .flow-arrow__line {
    stroke-dashoffset: 0;
    stroke: var(--primary-color);
}

.flow-step.visible .flow-connector .flow-arrow__head {
    stroke: var(--primary-color);
    fill: var(--primary-color);
}

.flow-block--medico .flow-step.visible .flow-connector .flow-arrow__line {
    stroke: var(--complement-color);
}

.flow-block--medico .flow-step.visible .flow-connector .flow-arrow__head {
    stroke: var(--complement-color);
    fill: var(--complement-color);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-lighter);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-details p {
    color: var(--text-light);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 138, 125, 0.15);
}

.form-group textarea {
    resize: vertical;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    display: block;
    filter: brightness(1.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-section ul li i {
    margin-right: 0.5rem;
    color: var(--primary-light);
}
.footer .social-links a:hover {
    background: var(--complement-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .services-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .flow-node__image-placeholder {
        min-height: 140px;
        font-size: 0.875rem;
    }

    .flow-step {
        padding: 0 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

