/* Define variables in :root for global scope */
:root {
    --primary-color: #233065;
    --accent-color: #76d0eb;
    --accent-dark: #5ab8d3; /* Slightly darker than accent-color for hover */
    --highlight-color: #77b0c1;
    --text-color: #252525;
    --white: #fff;
    --overlay-color: rgba(35, 48, 101, 0.5);
}

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

body {
    font-family: 'Figtree', 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: none;
    position: relative;
}

/* Header */
#header {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

#logo {
    flex: 0 0 auto;
}

#logo a {
    display: block;
    width: 212px;
    height: 66px;
    text-indent: -9999px;
}

#logo .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.home-icon {
    display: block;
    width: 224px;
    height: 224px;
    margin: 0 auto;
    text-indent: -9999px;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 25px;
    position: relative;
    flex: 0 0 auto;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    position: absolute;
    transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle span:nth-child(3) { bottom: 0; }

.menu-toggle.active span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

#main-navigation {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

#main-navigation ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

#main-navigation ul li { margin-left: 30px; }

#main-navigation ul li a {
    text-decoration: none;
    color: var(--primary-color);
    font-family: 'Figtree', 'Open Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 16px;
}

#main-navigation ul li a:hover { color: var(--accent-color); }

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Sections */
.section.page-section {
    position: relative;
    min-height: 64vh;
    margin-bottom: 60px;
}

/* Hero Section with Background Image in HTML */
#ndn-hero .divider {
    position: relative;
    min-height: 64vh;
}

#ndn-hero .hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 75%; /* Shifted further down (75% from top) */
    z-index: 1;
}

#ndn-hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-color);
    z-index: 2;
}

#ndn-hero .container {
    position: relative;
    z-index: 3;
}

/* Hero Content */
.hero-content {
    position: relative;
    color: var(--white);
    text-align: center;
    padding: 100px 0;
    margin-top: 48px;
}

.hero-content h1 {
    font-family: 'Abril Fatface', serif;
    font-size: 60px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-content h2 {
    font-family: 'Abril Fatface', serif;
    font-size: 48px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: white;
}

.hero-content h3 {
    font-family: 'Figtree', 'Open Sans', sans-serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 1px;
    margin-top: 20px;
}

hr {
    height: 4px;
    width: 120px;
    margin: 20px auto;
    border: none;
    background: linear-gradient(to bottom, var(--primary-color) 50%, var(--accent-color) 50%);
    opacity: 1;
}

.main-content-wrapper {
    position: relative;
    background: var(--white);
    padding: 100px 0;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.main-content h2 {
    font-family: 'Abril Fatface', serif;
    font-size: 48px;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--primary-color);
    text-align: center;
}

.main-content h3 {
    font-family: 'Figtree', 'Open Sans', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    padding: 34px 0 10px;
}

.main-content h4 {
    font-family: 'Figtree', 'Open Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    padding: 20px 0 10px;
}

.main-content ul {
    margin-bottom: 20px;
    color: var(--text-color);
}

/* Join Hero Section */
.join-hero {
    background: var(--primary-color);
    padding: 60px 0;
    text-align: center;
    width: 100%;
    margin-bottom: 60px;
}

.join-hero-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.join-hero-inner h2.free-membership {
    font-family: 'Abril Fatface', serif;
    font-size: 48px;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 20px;
    text-align: center;
}

/* Buttons */
.btn, a.btn, a.btn:visited {
    background: var(--accent-color);
    border-radius: 30px;
    font-size: 16px;
    color: var(--white);
    padding: 12px 28px;
    text-decoration: none;
    text-transform: uppercase;
    display: inline-block;
    font-family: 'Figtree', 'Open Sans', sans-serif;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, transform 0.2s ease, color 0.3s ease;
}

.btn:hover, a.btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Specific styling for join-hero button */
.join-hero-inner .btn, .join-hero-inner a.btn, .join-hero-inner a.btn:visited {
    background: var(--accent-color);
    color: var(--primary-color);
}

.join-hero-inner .btn:hover, .join-hero-inner a.btn:hover {
    background: var(--accent-dark);
    color: var(--primary-color);
}

/* Card Styles */
.card-grid {
    display: grid;
    gap: 20px;
    margin: 40px 0;
}

.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Benefits List Styling */
.benefits-list {
    list-style: disc;
    margin-left: 20px;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px 0;
    position: relative;
    z-index: 2;
    margin-top: 60px;
}

.footer-wrapper .container { text-align: center; }

.footer-content p {
    font-family: 'Figtree', 'Open Sans', sans-serif;
    font-size: 14px;
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-sm-4, .col-xs-12 { padding: 15px; }

.col-sm-4 { width: 33.33%; }
.col-xs-12 { width: 100%; }

/* Accordion Styles */
.accordion {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.accordion-item {
    margin-bottom: 15px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.accordion-header {
    cursor: pointer;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    transition: background 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 72px;
    position: relative;
    text-align: center;
    color: var(--white);
    font-size: 22px;
}

.accordion-item:nth-child(odd) .accordion-header {
    background: var(--primary-color);
    color: var(--white);
}

.accordion-item:nth-child(even) .accordion-header {
    background: var(--accent-color);
    color: var(--primary-color);
}

.accordion-header.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--white);
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from { width: 0; }
    to { width: 100px; }
}

.accordion-content {
    display: none;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--highlight-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.accordion-content.active {
    display: block;
}

/* Form Styles */
.keap-form-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
}

.keap-form-container iframe {
    width: 100%;
    border: none;
    display: block;
}

/* Desktop-specific adjustments */
@media (min-width: 769px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
    }

    .keap-form-container {
        max-width: 2000px;
        padding: 20px;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .keap-form-container iframe {
        height: 1200px;
    }

    .join-hero {
        padding: 80px 0;
    }

    .join-hero-inner {
        padding: 0 30px;
    }

    /* Enhanced Benefits List for Desktop */
    .benefits-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        list-style: none;
        margin: 0 0 40px 0;
        padding: 0;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
    }

    .benefits-list li {
        position: relative;
        padding-left: 30px;
        font-size: 18px;
        line-height: 1.5;
        color: var(--text-color);
    }

    .benefits-list li::before {
        content: '\2713'; /* Unicode checkmark */
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        color: var(--primary-color);
        font-size: 20px;
        font-weight: bold;
    }

    .benefits-list li strong {
        font-weight: 700;
    }
}

/* Responsive (Mobile) */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 10px 15px;
    }
    #header {
        width: 100%;
        top: 0;
        left: 0;
    }
    #logo { order: 1; }
    .menu-toggle { display: block; order: 2; }
    #main-navigation {
        display: none;
        width: 100%;
        order: 3;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--white);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    #main-navigation ul {
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
    }
    #main-navigation ul li { margin: 10px 0; }
    .hero-content {
        padding: 60px 0;
    }
    .hero-content h1 { font-size: 36px; }
    .hero-content h2 { font-size: 28px; }
    .col-sm-4 { width: 100%; }
    .container { padding: 0 20px; }
    #logo a {
        width: 175px;
        height: 54px;
    }
    .home-icon {
        width: 175px;
        height: 175px;
    }
    .accordion {
        display: block;
    }
    .accordion-item {
        margin-bottom: 15px;
    }
    .accordion-header {
        padding: 15px 20px;
        font-size: 20px;
    }
    .keap-form-container {
        max-width: 100%;
    }
    .keap-form-container iframe {
        height: 1600px;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .join-hero {
        padding: 40px 0;
    }
    .join-hero-inner h2.free-membership {
        font-size: 32px;
    }
    .main-content-wrapper {
        padding: 60px 0;
    }
}