/* ChartedWay Custom Styles */

/* ===== Root Variables ===== */
:root {
    /* Colors */
    --chartedway-blue: #084992;
    --chartedway-blue-light: #5DADE2;
    --chartedway-blue-dark: #2E86C1;
    --chartedway-orange: #F5A623;
    --chartedway-orange-light: #F8C471;
    --chartedway-orange-dark: #E67E22;
    --chartedway-green: #58D68D;
    --chartedway-green-light: #7DCEA0;
    --chartedway-green-dark: #28B463;
    --text-muted: #6c757d;
    --light-gray: #e0e0e0;

    /* Fonts */
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    
    /* Font Sizes */
    --hero-title-size: 34px;
    --carousel-caption-size: 1.5rem;
    --carousel-caption-size-mobile: 1.1rem;
    --partner-icon-size: 3rem;
    --feature-icon-size: 3rem;
    --service-icon-size: 2.5rem;
    
    /* Dimensions */
    --premium-badge-width: 25px;
    --premium-badge-height: 35px;
    --partner-card-width: 280px;
    --partner-card-width-mobile: 220px;
    --partner-card-margin: 15px;
}

/* ===== Base Styles ===== */
* {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: #333;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* ===== Custom Color Classes ===== */
.text-chartedway-blue {
    color: var(--chartedway-blue) !important;
}

.text-chartedway-orange {
    color: var(--chartedway-orange) !important;
}

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

.text-light-gray {
    color: #b0b0b0 !important;
}

.bg-chartedway-blue {
    background-color: var(--chartedway-blue) !important;
}

.bg-chartedway-orange {
    background-color: var(--chartedway-orange) !important;
}

.donation-hero {
    padding-top: 140px;
    padding-bottom: 60px;
}

.donation-icon {
    font-size: 2.5rem;
}

.donation-progress {
    height: 20px;
}

.donate-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--chartedway-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    z-index: 1030;
    text-decoration: none;
}

.donate-fab:hover,
.donate-fab:focus {
    background-color: var(--chartedway-green-dark);
    color: #fff;
}

/* ===== Button Styles ===== */
.btn-chartedway-blue {
    background-color: var(--chartedway-blue);
    border-color: var(--chartedway-blue);
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-chartedway-blue:hover {
    background-color: var(--chartedway-blue-dark);
    border-color: var(--chartedway-blue-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-chartedway-blue-light {
    background-color: var(--chartedway-blue-light);
    border-color: var(--chartedway-blue-light);
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-chartedway-blue-light:hover {
    background-color: #7fc1eb;
    border-color: #7fc1eb;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 173, 226, 0.3);
}

.btn-outline-chartedway-blue {
    border-color: var(--chartedway-blue);
    color: var(--chartedway-blue);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-chartedway-blue:hover {
    background-color: var(--chartedway-blue);
    border-color: var(--chartedway-blue);
    color: white;
    transform: translateY(-2px);
}

.btn-chartedway-orange {
    background-color: var(--chartedway-orange);
    border-color: var(--chartedway-orange);
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-chartedway-orange:hover {
    background-color: var(--chartedway-orange-dark);
    border-color: var(--chartedway-orange-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
}

.btn-chartedway-green {
    background-color: var(--chartedway-green);
    border-color: var(--chartedway-green);
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-chartedway-green:hover {
    background-color: var(--chartedway-green-dark);
    border-color: var(--chartedway-green-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 214, 141, 0.3);
}

/* ===== Navigation Styles ===== */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: white !important;
}

.nav-link {
    font-weight: 500;
    color: white !important;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--light-gray) !important;
}

/* ===== Hero Section ===== */
.hero-section {
    padding-top: 80px;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.hero-section-dark {
    background: #000;
}

.hero-section-dark .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.hero-title {
    line-height: 1.2;
    color: #1a1a1a;
}

/* Hero Carousel Caption */
.carousel-caption-custom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    padding: 30px 20px 20px;
    text-align: center;
}

.carousel-caption-custom p {
    color: white;
    font-size: var(--carousel-caption-size);
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-family: var(--font-heading);
}

.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

@media (max-width: 768px) {
    .carousel-caption-custom p {
        font-size: var(--carousel-caption-size-mobile);
    }
}

.stats-card {
    border-left: 4px solid var(--chartedway-orange);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.stats-icon i {
    font-size: 2.5rem;
}

/* ===== Section Padding ===== */
.section-padding {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 3rem 0;
    }
}

.story-page-offset {
    margin-top: 120px;
}

@media (max-width: 768px) {
    .story-page-offset {
        margin-top: 100px;
    }
}

/* ===== Feature Cards ===== */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.feature-icon i {
    font-size: var(--feature-icon-size);
}

.service-icon i {
    font-size: var(--service-icon-size);
}

/* ===== Step Numbers ===== */
.step-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--chartedway-blue), var(--chartedway-blue-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    font-family: var(--font-heading);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

/* ===== Testimonials ===== */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chartedway-blue), var(--chartedway-orange));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

/* ===== CTA Section ===== */
.cta-section {
    background: linear-gradient(135deg, var(--chartedway-blue), var(--chartedway-blue-dark));
    position: relative;
    overflow: hidden;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

/* ===== Forms ===== */
.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #ddd;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--chartedway-blue);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.15);
}

.form-check-input {
    border-radius: 0.25rem;
}

.form-check-input:checked {
    background-color: var(--chartedway-blue);
    border-color: var(--chartedway-blue);
}

.partnership-option-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.partnership-option-card {
    border-radius: 1.25rem;
    border: 1px solid rgba(8, 73, 146, 0.15);
    background-color: #fff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.partnership-option-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

.partnership-option-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.partnership-option-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    padding: 1.5rem;
    cursor: pointer;
    border-radius: 1.25rem;
    border: 2px solid transparent;
    margin: 0;
}

.partnership-option-input:checked + .partnership-option-label {
    border-color: var(--chartedway-blue);
    box-shadow: 0 0 0 4px rgba(8, 73, 146, 0.08);
    background: linear-gradient(135deg, rgba(8, 73, 146, 0.05), rgba(8, 73, 146, 0.01));
}

.partnership-option-input:focus-visible + .partnership-option-label {
    border-color: var(--chartedway-blue-light);
    box-shadow: 0 0 0 4px rgba(93, 173, 226, 0.3);
}

.option-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.option-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.option-title {
    font-weight: 600;
    color: #0f1b33;
}

.option-subtext {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.option-check {
    font-size: 1.5rem;
    color: #d0d5dd;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.partnership-option-input:checked + .partnership-option-label .option-check {
    color: var(--chartedway-green);
}

@media (max-width: 576px) {
    .partnership-option-label {
        flex-direction: column;
        align-items: flex-start;
    }

    .option-check {
        align-self: flex-end;
    }
}

/* ===== Footer ===== */
footer a:hover {
    color: var(--chartedway-blue) !important;
    transition: color 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    display: inline-block;
    transition: all 0.3s ease;
}

/* ===== Flash Messages ===== */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.flash-messages .alert {
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== Utility Classes ===== */
.rounded-4 {
    border-radius: 1rem !important;
}

.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* ===== Smooth Scroll Offset for Fixed Header ===== */
section {
    scroll-margin-top: 80px;
}

/* ===== Loading State ===== */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Additional Enhancements ===== */
.card {
    border-radius: 0.75rem;
}

.card-body {
    padding: 1.5rem;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Carousel Images ===== */
.carousel-item img {
    height: 600px;
    object-fit: cover;
}

/* ===== Partnership Carousel Images ===== */
.partnership-carousel-img {
    height: 400px;
    object-fit: cover;
}

/* ===== Benefit Icons ===== */
.benefit-icon {
    font-size: 3rem;
}

/* ===== Testimonials Marquee ===== */
.testimonial-marquee {
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
}

.testimonial-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: testimonial-scroll 45s linear infinite;
    will-change: transform;
}

.testimonial-marquee:hover .testimonial-track {
    animation-play-state: paused;
}

.testimonial-card {
    flex: 0 0 320px;
    min-width: 320px;
    border-radius: 1rem;
}

@keyframes testimonial-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .testimonial-card {
        min-width: 280px;
        flex-basis: 280px;
    }

    .testimonial-track {
        animation-duration: 35s;
    }
}

/* ===== Partnership Hero Slider ===== */
.partnership-hero-slider {
    min-height: 100vh;
}

/* Mission Card Overlay for Carousel Slide */
.slide-mission-card {
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
    padding: 2rem;
    color: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    display: inline-block;
}

.partnership-slide-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}



.partnership-hero-slider .container {
    position: relative;
    top: 80px;
    z-index: 2;
    height: 100%;
}

.partnership-hero-slider .carousel-item {
    height: 100vh;
    min-height: 600px;
}

/* Specific slide backgrounds */
.partnership-slide-1 {
    /* background-image and background-size moved to inline styles */
}

.partnership-slide-1::before {
    background: rgba(30, 30, 30, 0.8);
}

.partnership-slide-2 {
    /* background-image moved to inline styles */
}

/* ===== Story Images ===== */
.story-rainbow-img {
    max-height: 400px;
}

/* ===== Community Page Styles ===== */
.community-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.image-disclaimer-below {
    border: 1px solid rgba(0,0,0,0.1);
    max-width: 100%;
}

.clickable-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.clickable-image:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .image-disclaimer-below {
        font-size: 0.875rem;
    }
}
@media print {
    /* Preserve colors and backgrounds */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Hide elements that shouldn't print */
    .navbar {
        display: none !important;
    }

    /* Ensure page breaks don't split content awkwardly */
    section,
    .card,
    .row {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Reset animations for print */
    .partners-scroll {
        animation: none !important;
    }

    /* Stop infinite scroll, show all partners */
    .partners-scroll-container {
        overflow: visible !important;
    }

    .partners-scroll {
        flex-wrap: wrap !important;
        width: 100% !important;
        transform: none !important;
    }

    /* Preserve backgrounds and gradients */
    .bg-chartedway-blue,
    .bg-chartedway-orange,
    .cta-section,
    .premium-badge,
    .btn-chartedway-blue,
    .btn-chartedway-green,
    .btn-chartedway-orange,
    .step-number {
        background: inherit !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Ensure proper spacing */
    body {
        margin: 0;
        padding: 0;
    }

    section {
        padding: 2rem 0 !important;
    }

    /* Make sure images print */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* Preserve shadows and effects */
    .shadow,
    .shadow-sm,
    .shadow-lg {
        box-shadow: inherit !important;
    }

    /* Show all carousel items */
    .carousel-item {
        display: block !important;
        opacity: 1 !important;
        page-break-inside: avoid;
    }

    /* Adjust font sizes for print */
    body {
        font-size: 12pt;
    }

    h1 { font-size: 24pt; }
    h2 { font-size: 20pt; }
    h3 { font-size: 16pt; }
    h4 { font-size: 14pt; }
    h5 { font-size: 12pt; }
    h6 { font-size: 11pt; }

    /* Preserve link colors */
    a {
        color: var(--chartedway-blue) !important;
        text-decoration: underline;
    }
}
