/* ========================================
   LOAN PRODUCT PAGE ΓÇö GoRealo Template
   Content-first editorial layout
   ======================================== */

/* --- Design Tokens --- */
:root {
    --lp-font-display: var(--font-family-primary, Arial, sans-serif);
    --lp-font-body: var(--font-family-primary, Arial, sans-serif);
    --lp-blue: var(--primary-color, #0046E5);
    --lp-green: var(--secondary-color, #00FF41);
    --lp-dark: var(--dark-blue, #002E80);
    --lp-light: var(--light-blue, #E6EFFF);
    --lp-gray-50: #F8FAFC;
    --lp-gray-100: #F1F5F9;
    --lp-gray-200: #E2E8F0;
    --lp-gray-300: #CBD5E1;
    --lp-gray-500: #475569;
    --lp-gray-700: #334155;
    --lp-gray-900: #0F172A;
    --lp-radius: 16px;
    --lp-radius-sm: 8px;
    --lp-radius-lg: 24px;
    --lp-shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 24px rgba(15, 23, 42, 0.06);
    --lp-shadow-elevated: 0 4px 12px rgba(15, 23, 42, 0.06), 0 20px 48px rgba(15, 23, 42, 0.1);
    --lp-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Page Base --- */
.lp-page {
    font-family: var(--lp-font-body);
    color: var(--lp-gray-900);
    line-height: 1.7;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

.lp-page h1, .lp-page h2, .lp-page h3 {
    font-family: var(--lp-font-display);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* --- Scroll Reveal Animation --- */
.lp-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.35s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.lp-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.lp-reveal-delay-1 { transition-delay: 0.05s; }
.lp-reveal-delay-2 { transition-delay: 0.1s; }
.lp-reveal-delay-3 { transition-delay: 0.15s; }
.lp-reveal-delay-4 { transition-delay: 0.2s; }
.lp-reveal-delay-5 { transition-delay: 0.25s; }

/* ========================================
   1. HERO ΓÇö Compact content page header
   ======================================== */
.lp-hero {
    position: relative;
    background: linear-gradient(145deg, var(--lp-blue) 0%, #0035B0 40%, var(--lp-dark) 100%);
    padding: 40px 0 36px;
    overflow: hidden;
}

.lp-hero__grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
}

.lp-hero__content {
    position: relative;
    z-index: 2;
}

/* Breadcrumb */
.lp-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.82rem;
}

.lp-hero__breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--lp-transition);
}

.lp-hero__breadcrumb a:hover {
    color: #fff;
}

.lp-hero__breadcrumb-sep {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
}

.lp-hero__breadcrumb span:last-child {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
}

.lp-hero__title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.lp-hero__subtitle {
    font-family: var(--lp-font-body);
    font-size: clamp(0.95rem, 1.3vw, 1.05rem);
    color: rgba(255, 255, 255, 0.88);
    max-width: 600px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.lp-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.lp-hero__btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--lp-green);
    color: var(--lp-gray-900);
    border: none;
    border-radius: 100px;
    padding: 10px 24px;
    font-family: var(--lp-font-body);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--lp-transition);
    box-shadow: 0 4px 16px rgba(0, 255, 65, 0.25);
}
.lp-hero__btn-primary:hover {
    background: #fff;
    color: var(--lp-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 255, 65, 0.3);
}

.lp-hero__btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 100px;
    padding: 9px 22px;
    font-family: var(--lp-font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--lp-transition);
}
.lp-hero__btn-secondary:hover {
    color: #fff;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}


/* ========================================
   2. CONTENT LAYOUT WITH SIDEBAR TOC
   ======================================== */
.lp-content-area {
    padding: 48px 0 80px;
    background: #ffffff;
}

/* ---- Rich-text typography (mirrors .content from BlogPage) ----
   Container div provides max-width + centering (Bootstrap .container).
   These rules style bare HTML from the Umbraco RTE.
   Uses > .container > child selectors so macro internals are untouched. */

/* Align text width with the .airw widget (1100px) */
.lp-content-area > .container > p,
.lp-content-area > .container > h1,
.lp-content-area > .container > h2,
.lp-content-area > .container > h3,
.lp-content-area > .container > h4,
.lp-content-area > .container > h5,
.lp-content-area > .container > h6,
.lp-content-area > .container > ul,
.lp-content-area > .container > ol,
.lp-content-area > .container > blockquote,
.lp-content-area > .container > table,
.lp-content-area > .container > figure,
.lp-content-area > .container > img,
.lp-content-area > .container > hr {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.lp-content-area > .container > p {
    font-family: var(--lp-font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--lp-gray-700, #334155);
    margin-bottom: 1.5rem;
}

.lp-content-area > .container > h1,
.lp-content-area > .container > h2,
.lp-content-area > .container > h3,
.lp-content-area > .container > h4,
.lp-content-area > .container > h5,
.lp-content-area > .container > h6 {
    font-family: var(--lp-font-heading, var(--lp-font-body));
    font-weight: 700;
    color: var(--lp-dark, #002E80);
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.lp-content-area > .container > h2 { font-size: 1.8rem; }
.lp-content-area > .container > h3 { font-size: 1.4rem; }
.lp-content-area > .container > h4 { font-size: 1.1rem; font-weight: 600; }

.lp-content-area > .container > ul,
.lp-content-area > .container > ol {
    font-family: var(--lp-font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--lp-gray-700, #334155);
    margin-bottom: 1.5rem;
    padding-left: 1.2rem;
}

.lp-content-area > .container > ul li {
    margin-bottom: 0.5rem;
}

.lp-content-area > .container > blockquote {
    border-radius: var(--lp-radius-sm, 8px);
    background: var(--lp-light, #E6EFFF);
    border-left: 5px solid var(--lp-blue, #0046E5);
    padding: 1.5rem;
    font-style: italic;
    margin: 2rem 0;
    font-size: 1.05rem;
    line-height: 1.8;
}

.lp-content-area > .container > p a {
    color: var(--lp-blue, #0046E5);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.lp-content-area > .container > p a:hover {
    color: var(--lp-dark, #002E80);
}

.lp-content-area > .container > img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.lp-content-area > .container > hr {
    border: none;
    border-top: 1px solid var(--lp-gray-200, #e2e8f0);
    margin: 2rem 0;
}

.lp-content-area > .container > table {
    font-family: var(--lp-font-body);
    font-size: 0.95rem;
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1.5rem;
}
.lp-content-area > .container > table th,
.lp-content-area > .container > table td {
    padding: 10px 14px;
    border: 1px solid var(--lp-gray-200, #e2e8f0);
    text-align: left;
}
.lp-content-area > .container > table th {
    background: var(--lp-light, #E6EFFF);
    font-weight: 700;
    color: var(--lp-dark, #002E80);
}

.lp-content-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 60px;
    align-items: start;
}

/* Sidebar / TOC */
.lp-toc {
    position: sticky;
    top: 100px;
}

/* Fix: When TinyMCE strips the <aside> wrapper, TOC children become
   direct children of the grid. Place them explicitly in column 1
   and the main content in column 2 spanning both rows. */
.lp-content-layout:has(> .lp-toc__label) {
    grid-template-rows: auto 1fr;
    gap: 0 60px;
}

.lp-content-layout > .lp-toc__label {
    grid-column: 1;
    grid-row: 1;
}

.lp-content-layout > .lp-toc__list {
    grid-column: 1;
    grid-row: 2;
    position: sticky;
    top: 100px;
    align-self: start;
}

.lp-content-layout > .lp-main-content {
    grid-column: 2;
    grid-row: 1 / 3;
}

.lp-toc__label {
    font-family: var(--lp-font-body);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lp-gray-500);
    margin-bottom: 16px;
    padding-left: 16px;
}

.lp-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lp-toc__item {
    margin-bottom: 2px;
}

.lp-toc__link {
    display: block;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--lp-gray-500);
    text-decoration: none;
    border-left: 2px solid transparent;
    border-radius: 0 var(--lp-radius-sm) var(--lp-radius-sm) 0;
    transition: all var(--lp-transition);
}

.lp-toc__link:hover {
    color: var(--lp-blue);
    background: var(--lp-gray-50);
}

.lp-toc__link.is-active {
    color: var(--lp-blue);
    font-weight: 600;
    border-left-color: var(--lp-blue);
    background: var(--lp-light);
}


/* ========================================
   3. CONTENT SECTIONS
   ======================================== */
.lp-section {
    scroll-margin-top: 90px;
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--lp-gray-200);
}

.lp-section:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.lp-section__title {
    font-size: clamp(1.4rem, 2.2vw, 1.75rem);
    font-weight: 700;
    color: var(--lp-dark);
    margin-bottom: 16px;
}

.lp-section__text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--lp-gray-700);
    margin-bottom: 16px;
}

.lp-section__text:last-child {
    margin-bottom: 0;
}

.lp-section__text a {
    color: var(--lp-blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.lp-section__text a:hover {
    color: var(--lp-dark);
}

/* Callout Box */
.lp-callout {
    background: var(--lp-light);
    border-left: 4px solid var(--lp-blue);
    border-radius: 0 var(--lp-radius-sm) var(--lp-radius-sm) 0;
    padding: 16px 20px;
    margin: 20px 0;
}
.lp-callout p {
    margin: 0;
    color: var(--lp-gray-900);
    font-size: 0.95rem;
    line-height: 1.7;
}
.lp-callout strong {
    color: var(--lp-dark);
}


/* ========================================
   4. OVERVIEW HIGHLIGHTS (colored headings + text)
   ======================================== */
.lp-highlights {
    margin-top: 24px;
}

.lp-highlight {
    margin-bottom: 20px;
}

.lp-highlight:last-child {
    margin-bottom: 0;
}

.lp-highlight__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--lp-blue);
    margin-bottom: 4px;
    line-height: 1.4;
}

.lp-highlight__text {
    font-size: 0.95rem;
    color: var(--lp-gray-700);
    line-height: 1.7;
    margin: 0;
}


/* ========================================
   5. CONTENT LISTS (bullet lists)
   ======================================== */
.lp-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}

.lp-list li {
    position: relative;
    padding: 6px 0 6px 24px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--lp-gray-700);
}

.lp-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lp-blue);
    opacity: 0.6;
}

.lp-list li strong {
    color: var(--lp-gray-900);
}


/* ========================================
   6. PROS AND CONS
   ======================================== */
.lp-proscons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 20px;
}

.lp-proscons__col {
    background: #fff;
    border-radius: var(--lp-radius);
    border: 1px solid var(--lp-gray-200);
    overflow: hidden;
}

.lp-proscons__header {
    padding: 14px 20px;
    font-family: var(--lp-font-body);
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-proscons__header--pro {
    background: #ECFDF5;
    color: #065F46;
    border-bottom: 1px solid #D1FAE5;
}

.lp-proscons__header--con {
    background: #FEF3C7;
    color: #92400E;
    border-bottom: 1px solid #FDE68A;
}

.lp-proscons__list {
    list-style: none;
    padding: 16px 20px;
    margin: 0;
}

.lp-proscons__item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.92rem;
    color: var(--lp-gray-900);
    line-height: 1.5;
    align-items: flex-start;
}

.lp-proscons__item:not(:last-child) {
    border-bottom: 1px solid var(--lp-gray-100);
}

.lp-proscons__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    margin-top: 2px;
}

.lp-proscons__icon--pro {
    background: #D1FAE5;
    color: #059669;
}

.lp-proscons__icon--con {
    background: #FDE68A;
    color: #D97706;
}


/* ========================================
   7. FAQ ACCORDION
   ======================================== */
.lp-faq {
    margin-top: 20px;
}

.lp-faq__item {
    border-bottom: 1px solid var(--lp-gray-200);
    transition: all var(--lp-transition);
}

.lp-faq__item:first-child {
    border-top: 1px solid var(--lp-gray-200);
}

.lp-faq__question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 18px 0;
    font-family: var(--lp-font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--lp-gray-900);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: color var(--lp-transition);
}

.lp-faq__question:hover {
    color: var(--lp-blue);
}

.lp-faq__question i {
    font-size: 1.2rem;
    color: var(--lp-gray-500);
    transition: transform var(--lp-transition);
    flex-shrink: 0;
}

.lp-faq__item.is-open .lp-faq__question i {
    transform: rotate(180deg);
    color: var(--lp-blue);
}

.lp-faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lp-faq__answer-inner {
    padding: 0 0 20px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--lp-gray-700);
}

.lp-faq__answer-inner ul {
    padding-left: 20px;
    margin: 12px 0;
}

.lp-faq__answer-inner li {
    margin-bottom: 6px;
}


/* ========================================
   8. CTA BANNER
   ======================================== */
.lp-cta-banner {
    background: linear-gradient(145deg, var(--lp-blue), var(--lp-dark));
    border-radius: var(--lp-radius-lg);
    padding: 48px 40px;
    margin: 48px 0 0;
    position: relative;
    overflow: hidden;
}

.lp-cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.lp-cta-banner__content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.lp-cta-banner__title {
    font-size: clamp(1.3rem, 2.2vw, 1.75rem);
    color: #fff;
    margin-bottom: 8px;
}

.lp-cta-banner__text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0;
    max-width: 500px;
}

.lp-cta-banner__actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lp-cta-banner__phone {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    text-decoration: none;
}
.lp-cta-banner__phone:hover {
    color: #fff;
}


/* ========================================
   9. RELATED PRODUCTS
   ======================================== */
.lp-related {
    padding: 64px 0;
    background: var(--lp-gray-50);
}

.lp-related__header {
    text-align: center;
    margin-bottom: 40px;
}

.lp-related__title {
    font-size: clamp(1.4rem, 2.2vw, 1.75rem);
    color: var(--lp-gray-900);
    margin-bottom: 8px;
}

.lp-related__subtitle {
    font-size: 1rem;
    color: var(--lp-gray-500);
}

.lp-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.lp-product-card {
    background: #fff;
    border-radius: var(--lp-radius);
    padding: 28px 24px;
    border: 1px solid var(--lp-gray-200);
    transition: all var(--lp-transition);
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

.lp-product-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--lp-blue), var(--lp-green));
    transform: scaleX(0);
    transition: transform var(--lp-transition);
}

.lp-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--lp-shadow-elevated);
    border-color: transparent;
}

.lp-product-card:hover::after {
    transform: scaleX(1);
}

.lp-product-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--lp-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--lp-blue);
    margin-bottom: 16px;
}

.lp-product-card__title {
    font-family: var(--lp-font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--lp-gray-900);
    margin-bottom: 6px;
}

.lp-product-card__text {
    font-size: 0.85rem;
    color: var(--lp-gray-700);
    line-height: 1.6;
    margin-bottom: 14px;
}

.lp-product-card__link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--lp-blue);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--lp-transition);
}

.lp-product-card:hover .lp-product-card__link {
    gap: 8px;
}


/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1199px) {
    .lp-content-layout {
        grid-template-columns: 200px 1fr;
        gap: 40px;
    }
}

@media (max-width: 991px) {
    .lp-hero {
        padding: 32px 0 28px;
    }

    .lp-content-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 0;
    }

    /* Reset explicit grid placement for single-column layout */
    .lp-content-layout > .lp-toc__label,
    .lp-content-layout > .lp-toc__list,
    .lp-content-layout > .lp-main-content {
        grid-column: 1;
        grid-row: auto;
    }

    .lp-content-layout > .lp-toc__list {
        position: relative;
        top: auto;
        align-self: auto;
    }

    .lp-toc {
        position: relative;
        top: auto;
        margin-bottom: 32px;
        background: #fff;
        border: 1px solid var(--lp-gray-200);
        border-radius: var(--lp-radius);
        padding: 16px;
    }

    .lp-toc__list {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .lp-toc__link {
        border-left: none;
        border-radius: var(--lp-radius-sm);
        padding: 6px 12px;
        font-size: 0.82rem;
    }

    .lp-toc__link.is-active {
        background: var(--lp-light);
        border-left: none;
    }

    .lp-proscons {
        grid-template-columns: 1fr;
    }

    .lp-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lp-cta-banner {
        padding: 36px 24px;
    }

    .lp-cta-banner__content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 767px) {
    .lp-hero {
        padding: 24px 0 20px;
    }

    .lp-hero__title {
        font-size: 1.5rem;
    }

    .lp-hero__breadcrumb {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }

    .lp-toc {
        display: none;
    }

    /* Hide unwrapped TOC elements on mobile too */
    .lp-content-layout > .lp-toc__label,
    .lp-content-layout > .lp-toc__list {
        display: none;
    }

    .lp-section {
        margin-bottom: 36px;
        padding-bottom: 36px;
    }

    .lp-related__grid {
        grid-template-columns: 1fr;
    }

    .lp-related {
        padding: 48px 0;
    }

    .lp-cta-banner {
        border-radius: var(--lp-radius);
        margin: 36px 0 0;
    }

}

@media (max-width: 480px) {
    .lp-hero__actions {
        flex-direction: column;
        width: 100%;
    }
    .lp-hero__btn-primary,
    .lp-hero__btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .lp-content-area > .container > p {
        font-size: 1rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .lp-hero { padding: 20px 0; }
    .lp-toc, .lp-hero__actions, .lp-cta-banner { display: none !important; }
    .lp-product-card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
    .lp-section { break-inside: avoid; }
}
