/* 
    The Henriksen Family Giving Fund 
    Styles - Updated with Animations and Visuals
*/

:root {
    --navy: #1A2F4D;
    --evergreen: #2C583D;
    --gold: #A18C46;
    --ivory: #F7F5F0;
    --gray: #7A7A7A;
    --white: #FFFFFF;

    /*--font-heading: 'Playfair Display', serif;
    --font-body: 'Source Sans 3', sans-serif;*/

    --font-heading: 'Work Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Source Sans 3', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

    --border-radius: 6px;
    --container-width: 1200px;
    --section-padding: 40px 0;
}

/* RESET */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--ivory);
    color: var(--navy);
    line-height: 1.6;
}

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

/* TYPOGRAPHY */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-weight: 600;
    font-size: 3rem;
}

h2 {
    font-weight: 500;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-weight: 500;
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: #333;
}

a {
    color: var(--navy);
    text-decoration: none;
    transition: 0.3s;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ANIMATIONS */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.slide-left {
    transform: translateX(-30px);
}

.slide-right {
    transform: translateX(30px);
}

.slide-left.visible,
.slide-right.visible {
    transform: translateX(0);
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--navy);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(161, 140, 70, 0.3);
}

.btn-secondary {
    background-color: var(--evergreen);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--gold);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* NAVBAR */
.navbar {
    background: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 60px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--gold);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    color: var(--evergreen) !important;
    font-weight: 700 !important;
}

/* HERO */
.hero-section {
    position: relative;
    padding: 35px 0 45px;
    text-align: center;
    background-color: var(--ivory);
    overflow: hidden;
}

.hero-bg-roots {
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 400px;
    background-image: radial-gradient(circle, rgba(26, 47, 77, 0.08) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo-wrapper {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.hero-logo {
    /*width: 120px;
    height: 120px;
    border-radius: 50%;*/
    object-fit: cover;
}

.subheading {
    color: var(--evergreen);
    font-style: italic;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.hero-body {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: var(--navy);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* MISSION */
.mission-section {
    background: var(--white);
    padding: var(--section-padding);
}

.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.subheading-text {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    font-size: 0.9rem;
}

.watermark-container {
    margin-bottom: 20px;
    opacity: 0.2;
}

.watermark-container img {
    width: 425px;
}

/* WHAT WE DO - CARDS */
.what-we-do-section {
    background: var(--ivory);
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.card-grid h3 {
    text-align: center;
}

.card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border-bottom: 4px solid transparent;
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--gold);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-icon img {
    display: block;
    width: 50px;
    height: 50px;
    filter: brightness(0) saturate(100%) invert(13%) sepia(35%) saturate(1469%) hue-rotate(178deg) brightness(93%) contrast(93%);

    /* Optional: Add a transition so it changes color on hover */
    transition: filter 0.3s ease, transform 0.3s ease;
}

/* Bonus: Change icon to Gold on hover */
.card:hover .card-icon img {
    /* Turns the icon into Warm Gold (#A18C46) when hovering the card */
    filter: brightness(0) saturate(100%) invert(64%) sepia(10%) saturate(1814%) hue-rotate(7deg) brightness(90%) contrast(83%);
    transform: scale(1.1);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* VISUAL BREAK */
.visual-break {
    position: relative;
    height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.visual-break-overlay {
    position: relative;
    z-index: 2;
    background: rgba(26, 47, 77, 0.85);
    padding: 40px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-text {
    color: var(--white);
    text-align: center;
    max-width: 800px;
    font-size: 2.5rem;
}

/* GRANTS */
.grants-section {
    background: var(--white);
    padding: var(--section-padding);
}

.grants-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    margin-top: 40px;
}

/* Update this section in styles.css */

.styled-list {
    list-style: none;
    /* <--- This removes the default blue bullet */
    margin: 0;
    padding: 0;
}

.styled-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
}

.styled-list li::before {
    content: '•';
    color: var(--gold);
    position: absolute;
    left: 0;
    font-size: 1.5em;
    line-height: 1;
    top: -2px;
    /* Slight adjustment to align perfectly with text */
}

.guidelines-card {
    background: var(--ivory);
    padding: 30px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--evergreen);
}

.check-list li {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

/* DONORS */
.donors-section {
    background: var(--ivory);
    padding: var(--section-padding);
}

.donor-visual-placeholder {
    margin-top: 30px;
}

.rounded-img {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.ways-to-give-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.give-item {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.give-item:last-child {
    border: none;
}

.give-item h4 {
    color: var(--evergreen);
    margin-bottom: 5px;
}

/* FORM */
/* Fix for the affirmation checkbox alignment */
.affirmation-box label {
    display: flex;
    /* Lays out the checkbox and text side-by-side */
    align-items: flex-start;
    /* Aligns checkbox to the top of the text (good for mobile wrapping) */
    gap: 12px;
    /* Adds space between the box and the text */
    cursor: pointer;
}

.affirmation-box input[type="checkbox"] {
    width: auto;
    /* Overrides the global 100% width */
    margin-top: 5px;
    /* visually aligns the box with the first line of text */
    flex-shrink: 0;
    /* Prevents the checkbox from getting squished */
}

.apply-section {
    background: var(--ivory);
    padding: var(--section-padding);
}

.apply-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
}

.form-card {
    background: var(--white);
    max-width: 800px;
    margin: 0 auto;
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.form-header-icon {
    text-align: center;
    margin-bottom: 30px;
}

.form-icon-img {
    width: 110px;
    height: 110px;
    margin: 0 auto;
    display: block;
}

fieldset {
    border: none;
    margin-bottom: 30px;
    padding: 0;
}

legend {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--evergreen);
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    width: 100%;
    padding-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-group.half {
    width: 50%;
}

/* Fix for Radio Button Alignment */
.radio-group label {
    display: flex;
    /* Places input and text in a row */
    align-items: center;
    /* Vertically centers them */
    gap: 10px;
    /* Space between the dot and the text */
    cursor: pointer;
    margin-bottom: 10px;
    /* Spacing between the two options */
    font-weight: 400;
    /* Optional: Makes text slightly lighter than headers */
}

.radio-group input[type="radio"] {
    width: auto;
    /* Overrides the global 100% width */
    margin: 0;
    /* Removes default margins */
    accent-color: var(--navy);
    /* Colors the dot with your brand Navy */
    flex-shrink: 0;
    /* Prevents the dot from squishing on small screens */
    height: 1.2em;
    /* Ensures the clickable area is good size */
    width: 1.2em;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--navy);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--navy);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 47, 77, 0.1);
}

.hidden {
    display: none;
}

.legal-note {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 20px;
    text-align: center;
}

/* CONTACT */
.contact-section {
    background: var(--white);
    padding: var(--section-padding);
}

.faq-item {
    margin-bottom: 20px;
}

.faq-item h4 {
    color: var(--evergreen);
    font-size: 1.1rem;
}

.contact-details {
    background: var(--ivory);
    padding: 30px;
    border-radius: var(--border-radius);
}

.simple-input {
    margin-bottom: 15px;
}

.link-styled {
    text-decoration: underline;
    text-decoration-color: var(--gold);
}

/* FOOTER */
#footer {
    background: var(--navy);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

#footer p {
    color: rgba(255, 255, 255, 0.8);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    .two-col-layout,
    .grants-layout,
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-group.half {
        width: 100%;
    }

    .mobile-menu-btn {
        display: block;
        position: relative;
        z-index: 1002;
        width: 30px;
        height: 20px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .mobile-menu-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background: var(--navy);
        position: absolute;
        transition: 0.3s;
    }

    .mobile-menu-btn span:nth-child(1) {
        top: 0;
    }

    .mobile-menu-btn span:nth-child(2) {
        top: 9px;
    }

    .mobile-menu-btn span:nth-child(3) {
        top: 18px;
    }

    .mobile-menu-btn.open span:nth-child(1) {
        transform: rotate(45deg);
        top: 9px;
    }

    .mobile-menu-btn.open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.open span:nth-child(3) {
        transform: rotate(-45deg);
        top: 9px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 80%;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        transform: translateX(0);
    }
}

/* FORM VALIDATION STYLES */
/* 1. The "Clean" Fix: Use :user-invalid 
   This only turns red AFTER the user types or tries to submit.
*/
.grant-form input:user-invalid,
.grant-form select:user-invalid,
.grant-form textarea:user-invalid {
    border-color: #D32F2F; /* Red border */
    background-color: #FFF4F4; /* Subtle pink tint (optional, delete if you want white) */
    box-shadow: 0 0 0 1px #D32F2F; /* Adds a tiny bit of weight to the red border */
}

/* 2. Visual cue for valid fields (Optional: gives a subtle evergreen border when correct) */
.grant-form input:user-valid,
.grant-form select:user-valid,
.grant-form textarea:user-valid {
    border-color: #2C583D; 
}

/* 3. Checkbox Validation */
.affirmation-box input[type="checkbox"]:user-invalid {
    outline: 2px solid #D32F2F;
    outline-offset: 2px;
}