/* =========================================
   GLOBAL STYLES — Crusaders Outreach Ministries
========================================= */

/* =========================================
   STANDARD PAGE HERO (used by all pages)
========================================= */

.page-hero {
    position: relative;
    color: var(--color-white);
    padding: var(--space-7) 0;
    text-align: center;

    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(13, 27, 42, 0.75),
        rgba(13, 27, 42, 0.35)
    );
    z-index: 0;
}

.page-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.page-hero h1 {
    color: var(--color-white);
    margin-bottom: var(--space-3);
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.page-hero-tagline {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    color: var(--color-gray-200);
}

/* ------------------------------
   RESET / NORMALIZE
------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    font-size: var(--text-md);
    color: var(--text-body);
    background: var(--bg-light);
    line-height: 1.6;
}

/* ------------------------------
   TYPOGRAPHY
------------------------------ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    margin-bottom: var(--space-3);
    line-height: 1.25;
}

h1 { font-size: var(--text-xxl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

p {
    margin-bottom: var(--space-3);
}

a {
    color: var(--color-navy);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ------------------------------
   LAYOUT / CONTAINERS
------------------------------ */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.section {
    padding: var(--space-7) 0;
}

/* ------------------------------
   BUTTONS
------------------------------ */
.button {
    display: inline-block;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.button-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

.button-primary:hover {
    background: var(--color-navy-light);
}

.button-secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
}

.button-secondary:hover {
    background: var(--color-gold-light);
}

/* ------------------------------
   UTILITIES
------------------------------ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

/* ------------------------------
   IMAGES
------------------------------ */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ------------------------------
   HEADER LOGO
------------------------------ */
.site-header {
    position: relative;
    z-index: 1000;
}



.site-header .logo img {
    height: 150px;
    width: auto;
    display: block;
}

@media (max-width: 600px) {
    .site-header .logo img {
        height: 120px;
    }
}

/* ------------------------------
   FOOTER LOGO
------------------------------ */
.footer-logo img {
    height: 150px;
    width: auto;
    display: block;
    opacity: 0.9;
}

@media (max-width: 600px) {
    .footer-logo img {
        height: 100px;
    }
}

/* ------------------------------
   RESPONSIVE TYPOGRAPHY
------------------------------ */
@media (max-width: var(--bp-md)) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
}

/* =========================================
   HEADER + NAVIGATION
========================================= */

/* Header Layout */
.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Desktop Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0;
    position: relative;
    transition: color 0.2s ease;
}

/* Hover underline */
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0%;
    height: 2px;
    background: var(--color-gold);
    transition: width 0.25s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* CTA link */
.main-nav .nav-cta {
    color: var(--color-gold);
    font-weight: 600;
}

/* Hide mobile toggle on desktop */
.nav-toggle {
    display: none;
}

/* =========================================
   NON-LINK NAV ITEM (Resources)
   Matches <a> exactly
========================================= */

.main-nav .nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0; /* match .main-nav a */
    position: relative;
    cursor: pointer;
    display: inline-block;
    line-height: 1; /* ensures vertical alignment */
}

/* Hover color match */
.main-nav .nav-link:hover {
    color: var(--color-navy-dark);
}

/* Underline animation (match <a>) */
.main-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px; /* match .main-nav a::after */
    width: 0%;
    height: 2px;
    background: var(--color-gold); /* match underline color */
    transition: width 0.25s ease;
}

.main-nav .nav-link:hover::after {
    width: 100%;
}

/* =========================================
   MOBILE NAVIGATION
========================================= */
@media (max-width: 768px) {

    .nav-toggle {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 9999;
        flex-shrink: 0;
    }

    .nav-toggle .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        width: 100%;
        height: 100%;
    }

    .nav-toggle .hamburger .bar {
        display: block;
        width: 24px;
        height: 3px;
        background: #000;
        border-radius: 2px;
        flex-shrink: 0;
    }

    .main-nav {
        display: none;
    }

    .main-nav.open {
        display: block;
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--bg-white);
        padding: 1rem 1.5rem;
        box-shadow: var(--shadow-md);
        z-index: 2000;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .header-inner {
        gap: 1rem;
        width: 100%;
    }

    .site-header .logo {
        flex-shrink: 1;
    }
}

/* =========================================
   HAMBURGER ANIMATION
========================================= */
.nav-toggle.active .hamburger .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active .hamburger .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* =========================================
   FOOTER — POLISHED LAYOUT & TYPOGRAPHY
========================================= */

.site-footer {
    background: var(--color-deep-navy);
    color: var(--text-inverse);
    padding: var(--space-8) 0;
    border-top: var(--border-light);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
    align-items: flex-start;
}

.footer-col {
    flex: 1 1 220px;
}

.footer-col h4 {
    margin-bottom: var(--space-3);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-inverse);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: var(--space-2);
}

.footer-col a {
    color: var(--color-accent-gold);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    text-decoration: underline;
    color: #fff;
}

.footer-logo img {
    height: 96px;
    margin-bottom: var(--space-3);
    display: block;
}

.footer-mission {
    font-size: var(--text-base);
    line-height: var(--leading-loose);
    margin-top: 0;
    margin-bottom: var(--space-4);
    color: #e0e0e0;
}

.footer-address {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: #e0e0e0;
}

.footer-bottom {
    margin-top: var(--space-6);
    text-align: center;
    color: #e0e0e0;
    font-size: var(--text-sm);
}

/* =========================================
   FOOTER — POLISHED LAYOUT & TYPOGRAPHY
========================================= */

.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: var(--space-8) 0;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
    align-items: flex-start;
}

.footer-col {
    flex: 1 1 220px;
}

.footer-col h4 {
    margin-bottom: var(--space-3);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--footer-text);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: var(--space-2);
}

.footer-col a {
    color: var(--footer-link);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--footer-link-hover);
    text-decoration: underline;
}

.footer-logo img {
    height: 96px;
    margin-bottom: var(--space-3);
    display: block;
}

.footer-mission {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 320px;
    color: var(--footer-text-muted);
}

.footer-address {
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--footer-text-muted);
}

.footer-bottom {
    margin-top: var(--space-6);
    text-align: center;
    color: var(--footer-text-muted);
    font-size: var(--text-sm);
}

/* ================================
   DROPDOWN CARET
================================ */

.main-nav ul li.has-dropdown > a {
    position: relative;
    padding-right: 1.25rem;
}

.main-nav ul li.has-dropdown > a::after {
    content: "▾";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

/* Rotate caret when open (mobile) */
.main-nav ul li.has-dropdown.open > a::after {
    transform: translateY(-50%) rotate(180deg);
}

/* ================================
   DESKTOP DROPDOWN
================================ */

.main-nav ul li.has-dropdown {
    position: relative;
}

.main-nav ul li.has-dropdown > .dropdown {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: var(--space-2) 0;
    min-width: 180px;
    z-index: 999;
}

.main-nav ul li.has-dropdown:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav ul li.has-dropdown > .dropdown li a {
    display: block;
    padding: var(--space-2) var(--space-3);
    color: var(--color-navy);
    text-decoration: none;
    white-space: nowrap;
}

.main-nav ul li.has-dropdown > .dropdown li a:hover {
    background: var(--color-gray-100);
}

/* ================================
   MOBILE DROPDOWN
================================ */

@media (max-width: 768px) {

    .main-nav ul li.has-dropdown > .dropdown {
        position: static;
        box-shadow: none;
        background: transparent;
        padding-left: var(--space-3);
        opacity: 1;
        visibility: visible;
        transform: none;
        display: block;
    }

    .main-nav ul li.has-dropdown.open > .dropdown {
        display: block;
    }

    .main-nav ul li.has-dropdown > .dropdown li a {
        padding: var(--space-2) 0;
        background: none;
    }

    .main-nav ul li.has-dropdown > .dropdown li a:hover {
        background: none;
        text-decoration: underline;
    }
}

/* =========================================
   FORCE OVERRIDES — MUST BE LAST
========================================= */
.nav-toggle .bar {
    height: 3px !important;
    width: 24px !important;
    background: #000 !important;
    display: block !important;
}