/* =====================================================
   BARCO — DESIGN SYSTEM
   ===================================================== */
:root {
    /* Brand palette */
    --navy: #143d6b;
    --navy-dark: #0e2c4f;
    --navy-light: #1d4e89;
    --accent: #e63946;
    --accent-dark: #c1121f;
    --accent-soft: #ff6b6b;

    /* Neutrals */
    --ink: #1e293b;
    --body: #475569;
    --muted: #64748b;
    --line: #e7ebf0;
    --surface: #ffffff;
    --surface-2: #f5f7fa;

    /* Effects */
    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 22px;
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
    --ring: 0 0 0 0.2rem rgba(230, 57, 70, 0.18);
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

    /* Layout rhythm — fluid section padding */
    --section-y: clamp(56px, 8vw, 110px);
}

/* =====================================================
   BASE
   ===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--surface-2);
    color: var(--body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', Georgia, serif;
    color: var(--ink);
    line-height: 1.25;
}

p {
    line-height: 1.7;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
}

/* Accessible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 3px solid rgba(230, 57, 70, 0.55);
    outline-offset: 2px;
}

/* =====================================================
   BUTTONS (unified)
   ===================================================== */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
}

.btn-danger:hover,
.btn-danger:focus {
    background: linear-gradient(135deg, #ef4b57, var(--accent-dark));
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(230, 57, 70, 0.35);
}

.btn-danger:active {
    transform: translateY(0);
}

/* =====================================================
   NAVBAR
   ===================================================== */
.barco-navbar {
    background: #0d3364; /* matches the logo banner navy so the logo blends in seamlessly */
    padding: 8px 0;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: 0 2px 18px rgba(10, 30, 70, 0.18);
    transition: background 0.3s var(--ease), padding 0.3s var(--ease);
}

.logo-img {
    height: clamp(54px, 6vw, 92px);
    width: auto;
    object-fit: contain;
    display: block;
}

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
}

.navbar-nav {
    align-items: center;
}

.navbar .nav-link {
    color: #fff !important;
    font-weight: 500;
    position: relative;
    transition: color 0.2s var(--ease);
}

.navbar .nav-link:hover {
    color: var(--accent-soft) !important;
}

.active-link {
    color: var(--accent-soft) !important;
    font-weight: 700;
}

.active-link::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
}

.navbar-toggler {
    border: none;
    padding: 6px 10px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 12px;
        right: 12px;
        background: var(--navy);
        padding: 18px;
        border-radius: 14px;
        margin-top: 10px;
        box-shadow: var(--shadow-lg);
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    }

    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .navbar-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .navbar .nav-link {
        padding: 12px 14px;
        border-radius: 10px;
    }

    .navbar .nav-link:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .navbar .btn {
        width: 100%;
        margin: 10px 0 0 !important;
    }
}

/* =====================================================
   HOME — HERO
   ===================================================== */
.home-hero {
    position: relative;
    min-height: min(88vh, 760px);
    background: url('/images/houston-hero.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
}

.home-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(10, 30, 70, 0.9), rgba(10, 30, 70, 0.45) 70%, rgba(0, 0, 0, 0.35));
}

.home-hero h1 {
    color: #fff;
    font-size: clamp(1.9rem, 4.4vw, 3rem);
    letter-spacing: -0.5px;
}

.hero-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    overflow: hidden;
}

.hero-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.hero-card .card-header {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 16px;
    border: none;
}

.hero-btn {
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    color: #fff;
    font-size: 16px;
    letter-spacing: 0.5px;
    padding: 14px;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(230, 57, 70, 0.4);
    color: #fff;
}

.hero-btn:active {
    transform: translateY(0);
}

/* =====================================================
   FORMS
   ===================================================== */
.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    padding: 14px;
    font-size: 15px;
    background-color: #fff;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: var(--ring);
    background-color: #fff;
}

.form-floating label {
    color: var(--muted);
    font-size: 14px;
}

.text-danger.small {
    font-size: 12px;
}

/* =====================================================
   ALERTS
   ===================================================== */
.custom-alert {
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 14px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 15px;
}

.alert-success {
    background-color: #e9f9ee;
    color: #1e7e34;
    border: none;
}

.alert-danger {
    background-color: #fdecea;
    color: #a71d2a;
    border: none;
}

/* =====================================================
   WHY BARCO
   ===================================================== */
.why-barco-section {
    background: #fff;
    padding: var(--section-y) 0;
}

.why-underline {
    height: 4px;
    width: 70px;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
    margin: 12px auto 25px;
    border-radius: 10px;
}

.why-card {
    max-width: 820px;
    padding: clamp(26px, 4vw, 44px);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(15, 23, 42, 0.05);
    position: relative;
    transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.why-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.why-text {
    font-size: clamp(15px, 1.6vw, 17px);
    line-height: 1.9;
    color: var(--body);
}

/* =====================================================
   HOW IT WORKS
   ===================================================== */
.how-section {
    position: relative;
    padding: var(--section-y) 0;
    background: linear-gradient(135deg, #ffffff 0%, #f3f6fb 40%, #eef2ff 100%);
    overflow: hidden;
    z-index: 1;
}

.how-section::before,
.how-section::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    z-index: 0;
    pointer-events: none;
}

.how-section::before {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: -120px;
    left: -120px;
}

.how-section::after {
    width: 350px;
    height: 350px;
    background: #4f46e5;
    bottom: -120px;
    right: -120px;
}

.how-section .container {
    position: relative;
    z-index: 2;
}

.how-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid #f0f0f0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.how-step:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.step-icon {
    min-width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 15px rgba(230, 57, 70, 0.3);
}

.how-step h6 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.how-step p {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

.how-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.how-image-wrapper::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    max-width: 100%;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.22), transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.how-image {
    position: relative;
    z-index: 1;
    max-width: 520px;
    width: 100%;
    border-radius: var(--radius-lg);
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.22));
    transition: transform 0.5s var(--ease);
}

.how-image:hover {
    transform: translateY(-6px) scale(1.02);
}

/* =====================================================
   LOAN SECTION (home)
   ===================================================== */
.loan-section {
    position: relative;
    padding: var(--section-y) 0;
    background: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.96)), url('/images/87af3c1a.webp');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    color: #fff;
    overflow: hidden;
}

.loan-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(230, 57, 70, 0.18), transparent 42%);
    pointer-events: none;
}

.loan-section h2 {
    color: #fff;
    letter-spacing: 0.5px;
}

.loan-section > .container {
    position: relative;
    z-index: 1;
}

.loan-section p {
    color: rgba(255, 255, 255, 0.78) !important;
}

.loan-divider {
    height: 4px;
    width: 80px;
    margin: 20px auto;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
    box-shadow: 0 0 12px rgba(230, 57, 70, 0.55);
}

.loan-card-modern {
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    animation: fadeUp 0.6s var(--ease) both;
}

.loan-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
}

.icon-circle-modern {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(230, 57, 70, 0.04));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(230, 57, 70, 0.18);
}

.icon-circle-modern i {
    font-size: 22px;
    color: var(--accent);
}

.loan-card-modern h5 {
    color: var(--ink);
}

.loan-card-modern p {
    color: var(--muted) !important;
}

.link-modern {
    font-size: 0.92rem;
    color: var(--accent);
    font-weight: 600;
    transition: color 0.25s var(--ease);
}

.link-modern:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   DISCLOSURE PREVIEW (home) + DISCLOSURES PAGE
   ===================================================== */
.disclosure-section {
    background: linear-gradient(180deg, #f8fafc, #ffffff);
    border-top: 1px solid var(--line);
    padding: var(--section-y) 0;
}

.disclosure-card {
    display: block;
    padding: 26px 20px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    height: 100%;
}

.disclosure-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    color: #000;
}

.disclosure-card h6 {
    font-weight: 700;
    margin-bottom: 6px;
}

.disclosure-card span {
    font-size: 13px;
    color: var(--muted);
}

.view-all-link {
    font-size: 14px;
    color: var(--muted);
    transition: color 0.2s var(--ease);
}

.view-all-link:hover {
    color: var(--accent);
}

.modern-card {
    background: #fff;
    padding: clamp(22px, 3vw, 32px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.modern-badge {
    background: linear-gradient(135deg, #f1f5f9, #ffffff);
    border: 1px solid var(--line);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--navy);
}

.info-box {
    background: linear-gradient(to right, #f8fafc, #ffffff);
    padding: 22px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}

.warning-box {
    background: linear-gradient(to right, #fff3cd, #fff8e1);
    padding: 22px;
    border-radius: var(--radius-sm);
    border: 1px solid #ffe8a1;
    box-shadow: var(--shadow-sm);
}

/* =====================================================
   FEE SCHEDULE TABLES
   ===================================================== */
.fee-table table {
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.fee-table thead th {
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.2px;
    border: none;
    padding: 12px 14px;
    white-space: nowrap;
}

.fee-table tbody td {
    color: var(--ink);
    font-size: 15px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.fee-table tbody tr:nth-child(even) td {
    background: var(--surface-2);
}

.fee-table tbody td:first-child {
    font-weight: 700;
}

.fee-table tbody td:last-child {
    font-weight: 700;
    color: var(--accent-dark);
}

/* =====================================================
   ABOUT PAGE
   ===================================================== */
.about-hero {
    height: clamp(260px, 38vw, 380px);
    overflow: hidden;
}

.about-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(10, 30, 70, 0.78), rgba(10, 30, 70, 0.35));
}

.about-hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
}

.about-hero-content h1 {
    color: #fff;
    font-size: clamp(2rem, 5vw, 3rem);
}

.about-hero-content .lead {
    color: rgba(255, 255, 255, 0.9);
}

.about-card {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* =====================================================
   CONTACT PAGE
   ===================================================== */
.contact-card {
    background: #fff;
}

.contact-hours {
    background: var(--surface-2);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
}

.map-container {
    min-height: 360px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    min-height: 360px;
    border: 0;
    display: block;
}

/* =====================================================
   LOAN OPTIONS PAGE
   ===================================================== */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: clamp(24px, 4vw, 40px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.hero-img {
    border-radius: var(--radius);
    transition: transform 0.4s var(--ease);
}

.hero-img:hover {
    transform: scale(1.04);
}

.loan-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 26px 28px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    position: relative;
}

.loan-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 4px;
    background: var(--accent);
    border-radius: 4px;
    opacity: 0.85;
}

.loan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.loan-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.loan-info h4 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.loan-info p {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
    max-width: 650px;
    line-height: 1.6;
}

.loan-action {
    display: flex;
    align-items: center;
}

.loan-btn {
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 10px;
    white-space: nowrap;
    min-width: 120px;
    text-align: center;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer-barco {
    background: #0d3364; /* matches the logo banner navy so the footer logo blends in */
    background: linear-gradient(180deg, #0d3364, var(--navy-dark));
}

.footer-logo {
    height: 52px;
    width: auto;
}

.footer-link {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s var(--ease);
}

.footer-link:hover {
    color: var(--accent-soft);
}

/* =====================================================
   REUSABLE PAGE HEADER + DIVIDER
   ===================================================== */
.page-hero {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    overflow: hidden;
}

.section-divider {
    height: 4px;
    width: 80px;
    margin: 20px auto 0;
    border-radius: 10px;
    background: #b22234;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

/* Tablets */
@media (max-width: 991.98px) {
    .home-hero {
        min-height: auto;
        padding: 40px 0;
    }

    .how-image {
        max-width: 420px;
    }
}

/* Phones */
@media (max-width: 767.98px) {
    body {
        font-size: 15.5px;
    }

    .home-hero {
        text-align: center;
    }

    .home-hero .d-flex.flex-column {
        align-items: center;
    }

    .hero-card {
        margin-top: 28px;
        text-align: left;
    }

    .how-section {
        text-align: center;
    }

    .how-step {
        text-align: left;
    }

    .how-image {
        max-width: 300px;
        margin-top: 30px;
    }

    .loan-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .loan-action {
        width: 100%;
    }

    .loan-btn {
        width: 100%;
    }

    .hero-img {
        margin-bottom: 22px;
    }

    .map-container {
        min-height: 320px;
    }

    .map-container iframe {
        min-height: 320px;
    }
}

/* Small phones */
@media (max-width: 400px) {
    .loan-card,
    .loan-card-modern,
    .modern-card {
        padding: 20px;
    }

    .why-card {
        padding: 22px;
    }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .hero-card:hover,
    .loan-card:hover,
    .loan-card-modern:hover,
    .how-step:hover,
    .modern-card:hover,
    .disclosure-card:hover,
    .why-card:hover,
    .hero-img:hover,
    .how-image:hover {
        transform: none;
    }
}
