/* System Design & Variables */
:root {
    --color-primary: #1C4A8D;
    /* Azul ASISA - Normativa Anexo I */
    --color-primary-dark: #143A6E;
    --color-secondary: #00a8e8;
    /* Lighter blue for accents */
    --color-action: #F04B00;
    /* Naranja Intenso CTA - Normativa Anexo I */
    --color-action-dark: #D04200;
    --color-text-main: #333333;
    --color-text-light: #666666;
    --color-bg-light: #f8f9fa;
    --color-white: #ffffff;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 8px;
    --radius-lg: 12px;
    --font-heading: 'Open Sans', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    color: var(--color-text-main);
    /* Will be white in hero */
}

h2 {
    font-size: 2rem;
    color: var(--color-primary);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.btn-action {
    background-color: var(--color-action);
    color: var(--color-white);
    box-shadow: 0 4px 14px 0 rgba(240, 75, 0, 0.39);
}

.btn-action:hover {
    background-color: var(--color-action-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(240, 75, 0, 0.23);
}

.btn-outline {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.w-100 {
    width: 100%;
}

/* Header */
.top-bar {
    background-color: #f1f3f5;
    border-bottom: 1px solid #e9ecef;
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.segment-nav a {
    margin-right: 15px;
    color: var(--color-text-light);
    font-weight: 500;
}

.segment-nav a.active {
    color: var(--color-primary);
    font-weight: 700;
    border-bottom: 2px solid var(--color-primary);
}

.top-actions .top-link {
    margin-left: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.main-header {
    background-color: var(--color-white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: none;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

.main-header.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-soft);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
}

.brand- {
    letter-spacing: -1px;
}

.brand-divider {
    margin: 0 10px;
    color: #ccc;
    font-weight: 300;
}

.brand-claim {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-light);
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav a {
    font-weight: 600;
    color: var(--color-primary);
    position: relative;
    padding-bottom: 5px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-action);
    transition: width 0.3s;
}

.main-nav a:hover::after {
    width: 100%;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.phone-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}

.phone-label {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.phone-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-primary);
}

/* Hero Section */
.hero-section {
    position: relative;
    color: var(--color-white);
    padding: 80px 0 100px;
    background: linear-gradient(135deg, #252D54 0%, #1E2647 100%);
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #252D54;
}

.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.badge-discount {
    display: inline-block;
    background-color: var(--color-action);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.trust-indicators {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.trust-item ion-icon {
    font-size: 1.5rem;
    color: var(--color-action);
}

/* Recommender Card */
.recommender-card {
    background: var(--color-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    color: var(--color-text-main);
}

.recommender-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.recommender-header h3 {
    margin-bottom: 5px;
    font-size: 1.3rem;
}

.highlight-text {
    color: var(--color-action);
    font-weight: 700;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.segment-selector {
    display: flex;
    background: #f1f3f5;
    border-radius: 6px;
    padding: 4px;
}

.segment-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.segment-btn.active {
    background: var(--color-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: var(--color-primary);
    font-weight: 700;
}

input[type="text"],
input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-disclaimer {
    margin-top: 15px;
    font-size: 0.75rem;
    color: #999;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Product Grid */
.products-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title p {
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--color-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #ffc107;
    color: #333;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.card-badge.green {
    background-color: #d4edda;
    color: #155724;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e7f5ff;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
}

.card-icon.cyan {
    background: #e3fafc;
    color: #1098ad;
}

.card-icon.teal {
    background: #e6fcf5;
    color: #0ca678;
}

.card-icon.dark-blue {
    background: #e7f5ff;
    color: #1C4A8D;
}

.product-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.product-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
    flex-grow: 1;
}

.feature-list {
    text-align: left;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #555;
}

.feature-list ion-icon {
    color: var(--color-action);
}

/* Authority Section */
.authority-section {
    padding: 80px 0;
    background: linear-gradient(to right, #ffffff 50%, #f1f3f5 50%);
}

.dual-panel {
    display: flex;
    align-items: center;
    gap: 50px;
}

.authority-text {
    flex: 1;
}

.overline {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    color: var(--color-text-light);
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.stats-grid {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.2;
}

.telemedicine-block {
    flex: 1;
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-mockup {
    width: 280px;
    height: 500px;
    background: white;
    border-radius: 30px;
    border: 8px solid #333;
    box-shadow: 0 50px 100px -20px rgba(50, 50, 93, 0.25);
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
}

.chat-interface {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-bubble {
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    max-width: 80%;
}

.chat-bubble.user {
    background: var(--color-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-bubble.doctor {
    background: #e9ecef;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.video-call-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
}

.doctor-avatar {
    width: 30px;
    height: 30px;
    background: var(--color-action);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing-indicator span {
    animation: blink 1.4s infinite both;
    font-size: 1.5rem;
    margin: 0 1px;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0% {
        opacity: .2;
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: .2;
    }
}

.overlay-text {
    position: absolute;
    bottom: -60px;
    background: white;
    padding: 20px;
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-md);
    width: 250px;
    left: -30px;
}

/* Social Proof */
.social-proof-section {
    padding: 80px 0;
    background-color: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: var(--radius-lg);
    border: 1px solid #eee;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.avatar.blue {
    background: var(--color-primary);
}

.avatar.green {
    background: var(--color-action);
}

.avatar.teal {
    background: #0ca678;
}

.user-role {
    font-size: 0.8rem;
    color: #777;
    display: block;
}

.savings-badge {
    display: inline-block;
    background: #d4edda;
    color: #155724;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 15px;
}

/* Floating UI */
.floating-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    background-color: var(--color-white);
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: transform 0.3s;
    border: 2px solid var(--color-action);
}

.floating-cta:hover {
    transform: translateY(-5px);
}

.icon-box {
    background-color: var(--color-action);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

.cta-text {
    font-weight: 700;
    color: var(--color-text-main);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Cuadro Médico Section */
.medical-directory-section {
    /* Solid color as requested */
    background-color: #5b7bb2;
    color: white;
    padding: 80px 0;
    text-align: left;
}

.medical-directory-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.medical-directory-section h2 {
    font-size: 3rem;
    font-weight: 700;
    /* Serif font might be needed to match exactly, but keeping Inter for consistency or adding serif class */
    font-family: 'Times New Roman', serif;
    /* Trying to match the serif font in image */
    margin-bottom: 20px;
}

.medical-directory-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-medical {
    background-color: white;
    /* Changed to white to fit 'single color' request */
    color: #4a69bd;
    /* Text matches the lighter blue of the background */
    padding: 15px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-medical:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Footer */
footer {
    background: var(--color-primary);
    color: #ccc;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: white;
}

.footer-brand {
    grid-column: span 4;
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    margin-top: 20px;
}

.brand-.white {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -1px;
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        padding: 0 15px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
    }

    .trust-indicators {
        justify-content: center;
    }

    .recommender-card {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .dual-panel {
        flex-direction: column;
    }

    .telemedicine-block {
        width: 100%;
        height: auto;
    }

    .app-mockup {
        margin: 0 auto;
        height: 400px;
    }

    .overlay-text {
        position: static;
        width: 100%;
        max-width: 100%;
        margin-top: 20px;
        text-align: center;
        left: 0;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: span 2;
    }

    .main-nav,
    .header-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 600px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        flex-direction: column;
        gap: 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: span 1;
    }

    h1 {
        font-size: 2rem;
    }

    .segment-nav {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--color-white);
    border: 1px solid #e9ecef;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.faq-item.active {
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

.faq-question {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--color-white);
    transition: background 0.3s;
}

.faq-question:hover {
    background: #f1f3f5;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-text-main);
    font-weight: 600;
}

.faq-item.active .faq-question h3 {
    color: var(--color-primary);
}

.faq-icon {
    font-size: 1.2rem;
    color: var(--color-text-light);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: var(--color-white);
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 1000px;
}

.faq-list {
    margin-top: 10px;
    list-style: none;
    padding: 0;
}

.faq-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: 500;
}

.faq-list ion-icon {
    color: var(--color-action);
    font-size: 1.1rem;
}

/* Currency Ticker */
.currency-ticker {
    display: inline-flex;
    align-items: center;
    margin-right: 20px;
    font-size: 0.85rem;
    background: #e9ecef;
    padding: 4px 10px;
    border-radius: 4px;
    color: #495057;
}

.ticker-label {
    font-weight: 600;
    margin-right: 5px;
}

.ticker-value {
    font-weight: 700;
    color: var(--color-primary);
}

.ticker-trend {
    margin-left: 5px;
    font-size: 0.8em;
}

.trend-up {
    color: var(--color-action);
}

.trend-down {
    color: #dc3545;
}