@font-face {
    font-family: 'Neue Haas Grot Disp-55 Roman';
    src: url('../assets/fonts/Neue-Haas-Grot-Disp-55-Roman.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Neue Haas Grot Disp-65 Medium';
    src: url('../assets/fonts/Neue-Haas-Grot-Disp-65-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Tobias';
    src: url('../assets/fonts/Tobias-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

:root {
    --primary-green: #37D193;
    /* Official green */
    --primary-green-hover: #40EBA6;
    /* Official brighter hover */
    --brand-dark-slate: #1F3640;
    /* Official dark slate */
    /* Light Green Header */
    --dark-bg: #ffffff;
    /* Dark Card Background */
    --dark-body: #F9EAE1;
    /* Dark Body Background */
    --light-text: #ffffff;
    --input-bg: #ffffff;
    --font-primary: "Neue Haas Grot Disp-55 Roman", "Haas Grot Disp", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: "Tobias", serif;
    --font-medium: "Neue Haas Grot Disp-65 Medium", sans-serif;
}

body {
    background-color: var(--dark-body);
    font-family: "Neue Haas Grot Disp-55 Roman", "Haas Grot Disp";
    font-size: 16px;
    color: var(--brand-dark-slate);
    /* Changed from white for readability on light BG */
    letter-spacing: 0.02rem;
}

.main-container {
    max-width: 1300px;
    margin: 40px auto;
    background-color: transparent;
    padding: 20px;
}

/* Header Style (Solicitud de adhesion) */
.header-section {
    background-color: #1c7353 !important;
    color: #ffffff !important;
    /* White text for better contrast on dark slate */
    padding: 25px 20px;
    border-radius: 8px 8px 0 0;
    font-weight: normal;
    font-size: 1.6rem;
    font-family: "Neue Haas Grot Disp-55 Roman", "Haas Grot Disp";
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Strictly center the text */
    position: relative;
    /* Allow logo to be absolute relative to this */
}

.header-logo {
    position: absolute;
    left: 20px;
    /* Align to the left padding */
    max-height: 40px;
    width: auto;
}

/* Card Styles */
.test {
    background-color: white;
}

.card-custom {
    background-color: var(--dark-bg);
    color: var(--brand-dark-slate);
    border: none;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.card-title-custom {
    background-color: #37D193 !important;
    color: #1F3640;
    padding: 8px 18px;
    border-radius: 50px;
    /* Pill shape like buttons */
    display: inline-block;
    margin-bottom: 20px;
    font-weight: 500 !important;
}

/* Form Controls */
.form-control,
.form-select {
    border-radius: 4px;
    border: 1px solid #DCDBDA;
    background-color: #FCFBFA;
    padding: 10px;
    font-family: inherit;
    letter-spacing: 0.03rem;
    color: var(--brand-dark-slate);
}

.form-label {
    color: #193641;
    font-family: "Neue Haas Grot Disp-55 Roman", "Haas Grot Disp", sans-serif;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    display: inline-block;
    letter-spacing: 0.03rem;
}

/* Buttons */
.btn-primary {
    background-color: #2e7d32;
    border: none;
}

.btn-primary:hover {
    background-color: #40eba6;
}

.btn-success {
    background-color: #43a047;
    border: none;
    font-size: 1.2rem;
    padding: 10px 40px;
    border-radius: 30px;
    /* Rounded pill button */
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    /* Center the whole bar */
    align-items: center;
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}

/* Connecting Line */
.step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    /* Adjust width to fit behind steps */
    height: 2px;
    background-color: #d1d9dd;
    /* Lighter line */
    z-index: 0;
    border-radius: 3px;
}

.step {
    background-color: #ffffff;
    /* Inactive color */
    color: #1F3640;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 20px;
    border-radius: 20px;
    /* Pill shape */
    position: relative;
    z-index: 1;
    margin: 0 10px;
    /* Spacing between steps */
    min-width: 120px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #d1d9dd;
    letter-spacing: 0.05rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Subtle depth */
}

/* Active State */
.step.active {
    background-color: #1F3640;
    /* Dark background */
    color: #ffffff;
    border: 2px solid #ffffff;
    /* Green border */
    transform: scale(1.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Completed State (Previous steps) */
.step.completed {
    background-color: #2e7d32;
    /* Green background */
    color: white;
}

/* Product Card Styles */
.card-product {
    border: 2px solid transparent;
    transition: all 0.3s;
    cursor: pointer;
    background-color: var(--dark-bg);
    /* Ensure styling matches card-custom */
    color: var(--brand-dark-slate);
}

.card-product .card-body {
    display: flex;
    flex-direction: column;
}

.card-product .card-title {
    font-size: 2.0rem !important;
    /* Larger title */
    margin-bottom: 20px;
}

.coverage-summary {
    font-size: 1.3rem;
    /* Larger description */
    line-height: 1.6;
    margin-bottom: 20px;
}

.price-footer {
    margin-top: auto;
    padding-top: 20px;
    color: var(--brand-dark-slate);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    /* Added subtle separator */
}

.price-footer h3 {
    font-size: 2rem !important;
    /* Very prominent price */
}

.card-product.selected {
    border-color: var(--primary-green) !important;
    background-color: #f0fdf4;
    /* Very light green hint */
}

/* Custom Utilities */
.hidden {
    display: none;
}

/* Accordion Dark Theme Overrides */
.accordion-item {
    background-color: var(--dark-bg);
    color: var(--brand-dark-slate);
    border: 1px solid #2c4a58;
    /* Slightly lighter border */
}

.accordion-button {
    background-color: var(--dark-bg);
    color: var(--brand-dark-slate);
    box-shadow: none;
    /* Remove default blue shadow */
}

.accordion-button:not(.collapsed) {
    background-color: #264e58;
    /* Active state */
    color: #ffffff;
    box-shadow: none;
}

.accordion-button::after {
    filter: invert(1);
    /* Make arrow white */
}

/* Payment Method Selection Cards */
.payment-method-card {
    background-color: var(--dark-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    color: var(--brand-dark-slate);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.payment-method-card:hover {
    border-color: var(--primary-green);
    transform: translateY(-3px);
}

.info-circle {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    cursor: help;
    color: var(--primary-green);
    font-size: 1.1rem;
    opacity: 0.9;
    transition: all 0.2s ease;
}

.info-circle:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Form Section Transitions */
.form-section {
    animation: fadeIn 0.4s ease-out;
}

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

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

.is-invalid {
    border-color: #dc3545 !important;
    background-image: none !important;
}

.payment-method-card.selected {
    border-color: var(--primary-green);
    background-color: var(--brand-dark-slate);
    color: #FFFFFF;
    /* High contrast on dark slate */
}

.info-icon {
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
    cursor: help;
    color: #66bb6a;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.info-icon:hover {
    opacity: 1;
}

/* --- 404 Error Page --- */
.error-page-body {
    background-color: var(--dark-body) !important;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0;
    padding: 20px;
}

.error-container {
    max-width: 600px;
    width: 100%;
    padding: 3rem;
    background: var(--dark-bg);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid #2c4a58;
}

.error-code {
    font-size: 7rem;
    font-weight: 700;
    color: var(--primary-green);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.error-container h1 {
    color: var(--brand-dark-slate);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.error-container p {
    color: #b0bec5;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.btn-home-pill {
    background: var(--primary-green);
    color: #1b3a47;
    text-decoration: none;
    padding: 0.8rem 2.5rem;
    border-radius: 30px;
    font-weight: 1000;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
}

.btn-home-pill:hover {
    background: #40eba6;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 187, 106, 0.3);
    color: #1b3a47;
}

.brand-logo-404 {
    max-height: 50px;
    margin-bottom: 2rem;
}

/* --- Secondary Button Global Override --- */
.btn-secondary {
    background-color: #9aa9b8 !important;
    color: #ffffff !important;
    border-radius: 30px !important;
    padding: 0.8rem 2.5rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.btn-secondary:hover {
    background-color: #34495e !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}


/* --- Primary and Success Button Global Override --- */
.btn-primary,
.btn-success {
    background-color: var(--primary-green) !important;
    color: var(--brand-dark-slate) !important;
    /* Authentic dark text on green */
    border-radius: 100px !important;
    /* True pill shape */
    padding: 0.8rem 2.5rem !important;
    font-weight: 500 !important;
    /* Simplified from 700 to match brand */
    border: none !important;
    box-shadow: none !important;
    /* Flat design as per official site */
    transition: all 0.4s ease !important;
    cursor: pointer !important;
    text-decoration: none !important;
    font-family: var(--font-medium) !important;
}

.btn-primary:hover,
.btn-success:hover {
    background-color: var(--primary-green-hover) !important;
    transform: translateY(-2px) !important;
    color: var(--brand-dark-slate) !important;
    box-shadow: none !important;
}


/* --- FINAL BUTTON UNIFICATION (Font & Size Sync) --- */
.btn-primary,
.btn-success,
.btn-secondary,
.btn-home-pill {
    font-size: 1rem !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    padding: 0.8rem 2.5rem !important;
    border-radius: 30px !important;
    text-transform: none !important;
    letter-spacing: 0.05rem !important;
    /* Fixed crowded letters */
}

/* --- BOOTSTRAP OVERRIDES FOR LIGHT THEME --- */
.text-white {
    color: var(--brand-dark-slate) !important;
}

.text-white-50 {
    color: rgba(25, 54, 65, 0.6) !important;
}

h2.text-white,
h5.text-white,
p.text-white,
h4.text-white {
    color: var(--brand-dark-slate) !important;
}

.text-success {
    color: var(--primary-green) !important;
}

.bg-success {
    background-color: var(--primary-green) !important;
}

.btn-outline-success {
    border-color: var(--primary-green) !important;
    color: var(--primary-green) !important;
}

.btn-outline-success:hover {
    background-color: var(--primary-green) !important;
    color: #FFFFFF !important;
}

.btn-outline-danger:hover {
    background-color: #dc3545 !important;
    color: #FFFFFF !important;
}

.btn-secondary {
    font-weight: 500 !important;
}

/* --- Responsive Design --- */

/* Tablets and small desktops */
@media (max-width: 992px) {
    .main-container {
        max-width: 95%;
        margin: 20px auto;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .main-container {
        padding: 10px;
        margin: 5px auto;
    }

    .header-section {
        font-size: 1.1rem;
        padding: 45px 10px 15px;
        flex-direction: column;
        text-align: center;
        min-height: 100px;
    }

    .header-logo {
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        max-height: 28px;
    }

    .step-indicator {
        margin-bottom: 20px;
        padding: 0;
        gap: 2px;
        /* Small gap instead of large margins */
    }

    .step {
        min-width: auto;
        padding: 6px 4px;
        font-size: 0.7rem;
        margin: 0;
        flex: 1;
        border-radius: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1.1;
        height: 40px;
        /* Fixed height to align steps */
    }

    .step-indicator::before {
        height: 4px;
        width: 90%;
    }

    .btn-primary,
    .btn-success,
    .btn-secondary {
        width: 100%;
        margin-bottom: 12px;
    }

    .btn-home-pill {
        width: auto !important;
        max-width: 100%;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        margin: 0 auto 12px;
    }

    .btn-primary,
    .btn-success,
    .btn-secondary,
    .btn-home-pill {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.95rem !important;
        box-sizing: border-box;
    }

    .d-flex.justify-content-between {
        flex-direction: column;
        /* Changed from column-reverse to standard stack for better flow */
    }

    .d-flex.justify-content-between .btn:last-child {
        margin-top: 5px;
    }

    .card-title-custom {
        display: block;
        text-align: center;
        width: 100%;
        font-size: 1rem;
    }

    /* 404 Specific Mobile Fixes */
    .error-container {
        padding: 1.5rem;
    }

    .error-code {
        font-size: 5rem;
    }

    .brand-logo-404 {
        max-height: 40px;
        filter: brightness(1.2);
        /* Improve visibility on dark bg */
    }
}

/* Extra small devices (Very narrow phones) */
@media (max-width: 400px) {
    .step {
        font-size: 0.65rem;
        padding: 4px 2px;
    }

    .header-section {
        font-size: 1rem;
    }

    .card-custom {
        padding: 12px;
    }

    .error-code {
        font-size: 4rem;
    }

    .error-container h1 {
        font-size: 1.5rem;
    }

    /* Hide labels and show just numbers if it's too crowded? 
       Actually, let's try to keep them but very small first. */
}