/**
 * TopLine Resources Pages Styles
 * 
 * Styles for Financial Education, Safety & Security, Community, 
 * Media, Annual Information, and Policies & Disclosures pages.
 */

/* ━━━ DARK NAVY HERO SECTION ━━━ */

/* 
 * Fix white strip below header on Resource pages with navy hero sections.
 * 
 * For manually created hero sections in Elementor:
 * Add the CSS class "navy-hero" to your section in Elementor > Advanced > CSS Classes
 */

/* Navy hero — clearance below fixed header (no negative pull-under; prevents title clipping) */
.elementor-section.navy-hero,
.e-con.navy-hero {
    margin-top: 0 !important;
    padding-top: var(--topline-fixed-header-offset, 148px) !important;
    background: #0C2333 !important;
    box-sizing: border-box;
}

.elementor-section.navy-hero > .elementor-container,
.e-con.navy-hero > .e-con-inner {
    background: #0C2333 !important;
}

/* Also handle e-con (Elementor containers/flexbox) */
.e-con.navy-hero .e-con-inner,
.e-con.navy-hero .elementor-widget-wrap {
    background: #0C2333 !important;
}

.elementor-page .elementor:has(.navy-hero:first-child) {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Target the main content wrapper */
body.elementor-page .site-main,
body.elementor-page .site-content,
body.elementor-page #content,
body.elementor-page main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Target resource pages - first section should have no gap from header */
body[class*="resources"] .elementor-section:first-child,
body[class*="resources"] .e-con:first-child {
    margin-top: 0 !important;
}

/* Force Elementor sections containing the hero to have navy background */
.elementor-section:has(.res-hero-section),
.elementor-element:has(.res-hero-section),
.elementor-section:has(.res-hero-swoosh-container),
.elementor-element:has(.res-hero-swoosh-container) {
    background: #0C2333 !important;
    margin-top: 0 !important;
    padding: 0 !important;
}

.elementor-section:has(.res-hero-section) > .elementor-container,
.elementor-section:has(.res-hero-swoosh-container) > .elementor-container {
    max-width: 100% !important;
    padding: 0 !important;
}

.elementor-section:has(.res-hero-section) .elementor-column,
.elementor-section:has(.res-hero-section) .elementor-column-gap-no,
.elementor-section:has(.res-hero-section) .elementor-widget-wrap,
.elementor-section:has(.res-hero-section) .elementor-widget-container,
.elementor-section:has(.res-hero-swoosh-container) .elementor-column,
.elementor-section:has(.res-hero-swoosh-container) .elementor-widget-wrap,
.elementor-section:has(.res-hero-swoosh-container) .elementor-widget-container {
    padding: 0 !important;
    margin: 0 !important;
    background: #0C2333 !important;
}

/* Base widget container */
.topline-resources-widget {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Intro Section */
.res-intro {
    padding: 80px 24px;
    background: #ffffff;
}

.res-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.res-tagline {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    color: #0C2333;
    margin: 0 0 20px;
    line-height: 1.2;
}

.res-intro-text {
    font-size: 17px;
    line-height: 1.7;
    color: #4a5568;
    max-width: 800px;
    margin: 0;
}

/* Features Section */
.res-features {
    padding: 60px 24px 80px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.res-features-grid {
    display: grid;
    gap: 24px;
}

.res-features-grid--4 {
    grid-template-columns: repeat(2, 1fr);
}

.res-features-grid--6 {
    grid-template-columns: repeat(3, 1fr);
}

.res-features-grid--2,
.res-features-grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (max-width: 768px) {
    .res-features-grid--4,
    .res-features-grid--6 {
        grid-template-columns: 1fr;
    }
    
    .res-intro {
        padding: 60px 20px;
    }
    
    .res-features {
        padding: 40px 20px 60px;
    }
}

/* Feature Cards */
.res-feature-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(12, 35, 51, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

.res-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(12, 35, 51, 0.1);
}

.res-feature-card__icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #00A5B5 0%, #008B99 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.res-feature-card__icon svg {
    width: 28px;
    height: 28px;
    color: #ffffff;
}

.res-feature-card__title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #0C2333;
    margin: 0 0 12px;
}

.res-feature-card__text {
    font-size: 15px;
    line-height: 1.65;
    color: #4a5568;
    margin: 0;
}

/* Benefits Section */
.res-benefits {
    padding: 60px 24px 80px;
    background: #f8fafc;
}

.res-benefits__title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 600;
    color: #0C2333;
    margin: 0 0 32px;
    text-align: center;
}

.res-benefits__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.res-benefits__list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    background: #ffffff;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(12, 35, 51, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.res-benefits__list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(12, 35, 51, 0.1);
}

.res-check-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    color: #00A5B5;
    margin-top: 1px;
    flex-shrink: 0;
}

/* CTA Section */
.res-cta {
    background: #0C2333;
    padding: 80px 24px 100px;
    text-align: center;
}

.res-cta .res-inner {
    max-width: 800px;
    width: 100%;
}

.res-cta-content {
    max-width: 700px;
    margin: 0 auto;
}

/* Title */
.topline-resources-widget .res-cta .res-cta__title,
.res-cta .res-cta__title,
.res-cta__title,
h2.res-cta__title {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: clamp(32px, 4.5vw, 48px) !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    margin: 0 0 22px !important;
    line-height: 1.15 !important;
}

/* Text */
.topline-resources-widget .res-cta .res-cta__text,
.res-cta .res-cta__text,
.res-cta__text {
    font-family: 'Inter', sans-serif !important;
    font-size: 1rem !important;
    line-height: 1.7 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    margin: 0 0 24px !important;
}

/* Contact Row */
.res-cta__contact {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

/* Phone & Email Links */
.topline-resources-widget .res-cta .res-cta__phone,
.topline-resources-widget .res-cta .res-cta__email,
.res-cta .res-cta__phone,
.res-cta .res-cta__email,
.res-cta__phone,
.res-cta__email,
a.res-cta__phone,
a.res-cta__email {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
}

.topline-resources-widget .res-cta .res-cta__phone:hover,
.topline-resources-widget .res-cta .res-cta__email:hover,
.res-cta .res-cta__phone:hover,
.res-cta .res-cta__email:hover,
.res-cta__phone:hover,
.res-cta__email:hover {
    color: #ffffff !important;
    opacity: 0.8;
}

.topline-resources-widget .res-cta .res-cta__phone svg,
.topline-resources-widget .res-cta .res-cta__email svg,
.res-cta .res-cta__phone svg,
.res-cta .res-cta__email svg,
.res-cta__phone svg,
.res-cta__email svg {
    width: 20px;
    height: 20px;
    color: #ffffff !important;
    stroke: #ffffff !important;
}

/* CTA Button - Teal */
.topline-resources-widget .res-cta .res-cta__btn,
.res-cta .res-cta__btn,
.res-cta__btn,
a.res-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #2fa3a2 !important;
    color: #ffffff !important;
    padding: 16px 32px !important;
    border-radius: 50px !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 16px rgba(47, 163, 162, 0.35);
}

.topline-resources-widget .res-cta .res-cta__btn:hover,
.res-cta .res-cta__btn:hover,
.res-cta__btn:hover {
    background: #248a89 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 163, 162, 0.45);
}

.topline-resources-widget .res-cta .res-cta__btn svg,
.res-cta .res-cta__btn svg,
.res-cta__btn svg {
    transition: transform 0.2s ease;
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.res-cta__btn:hover svg {
    transform: translateX(3px);
}

@media (max-width: 600px) {
    .res-cta {
        padding: 64px 20px 80px;
    }
    
    .topline-resources-widget .res-cta .res-cta__title,
    .res-cta .res-cta__title,
    h2.res-cta__title {
        font-size: 32px !important;
    }
    
    .res-cta__contact {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    
    .topline-resources-widget .res-cta .res-cta__btn,
    .res-cta .res-cta__btn,
    .res-cta__btn {
        padding: 14px 28px !important;
        font-size: 0.9375rem !important;
    }
    
    .res-benefits {
        padding: 40px 20px;
    }
    
    .res-benefits__list {
        grid-template-columns: 1fr;
    }
}

/* Quote/Testimonial styling in feature cards */
.res-feature-card__text em,
.res-feature-card__text i {
    font-style: italic;
    color: #1a3a52;
}

/* ━━━ CCUFC TABLE STYLES ━━━ */
.ccufc-table-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.ccufc-table-section h2 {
    font-size: 2rem;
    color: #000;
    margin-bottom: 30px;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.ccufc-table-wrapper {
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #FAFAFA;
    overflow: hidden;
    background: #fff;
}

.ccufc-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.95rem;
    margin: 0;
    padding: 0;
    border: none;
}

.ccufc-table thead {
    background: #0C2333;
}

.ccufc-table thead th {
    padding: 16px 20px;
    text-align: left;
    color: #fff;
    font-weight: 600;
    letter-spacing: -0.01em;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.ccufc-table thead th:last-child {
    border-right: none;
}

.ccufc-table tbody {
    background: #fff;
}

.ccufc-table tbody tr {
    transition: background 0.2s ease;
}

.ccufc-table tbody tr:hover {
    background: #f9fafb;
}

.ccufc-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.ccufc-table tbody tr:nth-child(even):hover {
    background: #f5f7f9;
}

.ccufc-table tbody td {
    padding: 14px 20px;
    color: #4a5568;
    vertical-align: middle;
    border: 1px solid #FAFAFA;
    border-top: none;
    background: transparent;
}

.ccufc-table tbody td:first-child {
    font-weight: 600;
    color: #0C2333;
    border-left: none;
}

.ccufc-table tbody td:last-child {
    border-right: none;
}

.ccufc-table tbody tr:last-child td {
    border-bottom: none;
}

/* CCUFC Table Mobile Responsive */
@media (max-width: 768px) {
    .ccufc-table-section {
        padding: 40px 15px;
        background: transparent;
    }
    
    .ccufc-table-wrapper {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
    }
    
    .ccufc-table {
        background: transparent !important;
    }
    
    .ccufc-table thead {
        display: none;
    }
    
    .ccufc-table tbody {
        background: transparent !important;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .ccufc-table tbody tr {
        display: block;
        padding: 20px;
        margin-bottom: 0;
        border: 1px solid #e2e2e2 !important;
        border-radius: 12px;
        background: #fff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    .ccufc-table tbody tr:nth-child(even) {
        background: #fff !important;
    }
    
    .ccufc-table tbody tr:last-child {
        margin-bottom: 0;
    }
    
    .ccufc-table tbody td {
        display: block;
        padding: 8px 0 !important;
        border: none !important;
        background: transparent !important;
    }
    
    .ccufc-table tbody td:first-child {
        font-size: 1.1rem;
        padding-bottom: 12px !important;
        margin-bottom: 12px;
        border-bottom: 1px solid #f0f0f0 !important;
    }
    
    .ccufc-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #5AA9AC;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        display: block;
        margin-bottom: 4px;
    }
    
    .ccufc-table tbody td:first-child::before {
        display: none;
    }
}
