/*
Theme Name: Jesus Bless Foundation
Theme URI: https://jbfusa.org
Author: Rehana
Author URI: https://rehana.dev
Description: A modern nonprofit theme for WordPress — the official Jesus Bless Foundation design system. Navy/Gold color palette with full Customizer support for text, images, and forms.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bless-impact
Tags: one-page, nonprofit, charity, custom-colors, custom-logo, featured-images, theme-options
*/

/* CSS Variables - Navy/Gold Design System */
:root {
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(220, 60%, 15%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(220, 60%, 15%);
    --primary: hsl(220, 60%, 25%);
    --primary-foreground: hsl(0, 0%, 100%);
    --secondary: hsl(210, 20%, 96%);
    --secondary-foreground: hsl(220, 60%, 25%);
    --muted: hsl(210, 20%, 96%);
    --muted-foreground: hsl(220, 15%, 45%);
    --accent: hsl(45, 70%, 55%);
    --accent-foreground: hsl(220, 60%, 15%);
    --border: hsl(220, 15%, 90%);
    --input: hsl(220, 15%, 90%);
    --ring: hsl(220, 60%, 25%);
    --gold: hsl(45, 70%, 55%);
    --gold-dark: hsl(45, 60%, 45%);
    --navy: hsl(220, 60%, 25%);
    --navy-dark: hsl(220, 70%, 20%);
    --gradient-hero: linear-gradient(135deg, hsl(220, 60%, 25%) 0%, hsl(220, 60%, 35%) 100%);
    --gradient-overlay: linear-gradient(to right, hsla(220, 60%, 25%, 0.95) 0%, hsla(220, 60%, 25%, 0.85) 50%, hsla(220, 60%, 25%, 0.70) 100%);
    --gradient-card: linear-gradient(145deg, hsl(0, 0%, 100%) 0%, hsl(210, 20%, 98%) 100%);
    --gradient-section: linear-gradient(180deg, hsl(210, 20%, 98%) 0%, hsl(210, 20%, 96%) 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Resets */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--foreground);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }

/* WordPress admin bar fix */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
    body.admin-bar .site-header { top: 46px; }
}

/* Typography */
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--muted-foreground) !important; }
.text-foreground { color: var(--foreground) !important; }
.text-white { color: #fff !important; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.leading-relaxed { line-height: 1.625; }
.text-center { text-align: center; }

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Grid System (Bootstrap-like) */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}
.row > [class*="col-"] {
    padding: 0 0.75rem;
    box-sizing: border-box;
    width: 100%;          /* stack by default on mobile */
}
.col-6 { width: 50%; }
.col-12 { width: 100%; }

@media (min-width: 768px) {
    .col-md-3 { width: 25%; }
    .col-md-4 { width: 33.333%; }
    .col-md-6 { width: 50%; }
}
@media (min-width: 992px) {
    .col-lg-4 { width: 33.333%; }
    .col-lg-6 { width: 50%; }
}
@media (min-width: 1200px) {
    .col-xl-3 { width: 25%; }
}

/* Utilities */
.d-flex { display: flex; }
.d-none { display: none; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.w-100 { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.list-unstyled { list-style: none; padding: 0; margin: 0; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.opacity-90 { opacity: 0.9; }

/* Background Colors */
.bg-primary { background: var(--primary); color: var(--primary-foreground); }
.bg-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.bg-muted { background: var(--muted); }

/* Section Spacing */
.py-section { padding-top: 5rem; padding-bottom: 5rem; }

/* Section Divider */
.section-divider {
    width: 5rem;
    height: 0.25rem;
    background: var(--accent);
    margin: 0 auto 1.5rem;
    border-radius: 9999px;
}

/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
}
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    min-width: 160px;
}
.btn-primary {
    background: var(--accent);
    color: var(--accent-foreground);
    box-shadow: var(--shadow-md);
}
.btn-primary:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--accent-foreground);
}
.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
    box-shadow: var(--shadow-md);
}
.btn-secondary:hover {
    background: hsl(210, 20%, 92%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==================== HEADER ==================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition-smooth);
    background: transparent;
}
.site-header.scrolled {
    background: var(--primary);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}
.site-logo img {
    height: 120px;
    width: auto;
}

/* Desktop Nav */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}
.main-navigation a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}
.main-navigation a:hover { color: var(--accent); }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}
.mobile-menu a:hover { color: var(--accent); }

@media (max-width: 768px) {
    .main-navigation { display: none; }
    .mobile-menu-toggle { display: block; }
    .site-logo img { display: none; }
}

/* ==================== HERO ==================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-section .hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-overlay);
    z-index: 1;
}
.hero-section .hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.hero-section .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-section .hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem 1rem;
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #fff;
}
.hero-description {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
    color: #fff;
}

/* ==================== ABOUT ==================== */
.about-card {
    background: var(--card);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-smooth);
    height: 100%;
}
.about-card:hover { box-shadow: var(--shadow-xl); }

.values-card {
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
}
.value-item h4 {
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.value-item p {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ==================== SERVICE CARDS ==================== */
.service-card {
    background: var(--card);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
    border: none;
    height: 100%;
}
.service-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}
.service-card .service-image {
    height: 12rem;
    overflow: hidden;
}
.service-card .service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.service-card:hover .service-image img {
    transform: scale(1.05);
}
.service-icon-wrapper {
    display: inline-flex;
    padding: 0.75rem;
    background: hsl(45, 70%, 55%, 0.1);
    border-radius: 9999px;
}
.icon-accent { color: var(--accent); }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.card-header { padding: 1.5rem 1.5rem 0; }
.card-content { padding: 0 1.5rem 1.5rem; }

/* ==================== CARDS (Generic) ==================== */
.card {
    background: var(--card);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
}
.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

/* ==================== GALLERY ==================== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-smooth);
}
.gallery-item:hover { box-shadow: var(--shadow-xl); }
.gallery-image {
    width: 100%;
    height: 20rem;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.gallery-item:hover .gallery-image { transform: scale(1.1); }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, hsla(220, 60%, 25%, 0.9) 0%, hsla(220, 60%, 25%, 0.5) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-content {
    padding: 1.5rem;
    color: var(--primary-foreground);
}

/* ==================== CONTACT ==================== */
.contact-info-card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
}
.contact-icon-wrapper {
    display: inline-flex;
    padding: 0.75rem;
    background: hsl(45, 70%, 55%, 0.1);
    border-radius: 9999px;
}

/* Form Styles */
.form-group { margin-bottom: 1.5rem; }
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--input);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: var(--transition-smooth);
    font-family: inherit;
}
.form-control:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px hsla(220, 60%, 25%, 0.1);
}
textarea.form-control {
    resize: vertical;
    min-height: 8rem;
}

/* Form Messages */
.form-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-weight: 500;
}
.form-message.success {
    background: hsl(142, 71%, 95%);
    color: hsl(142, 71%, 29%);
    border: 1px solid hsl(142, 71%, 80%);
}
.form-message.error {
    background: hsl(0, 71%, 95%);
    color: hsl(0, 71%, 40%);
    border: 1px solid hsl(0, 71%, 80%);
}

/* Social Icons */
.social-icon {
    display: inline-flex;
    padding: 0.75rem;
    background: hsl(45, 70%, 55%, 0.1);
    border-radius: 9999px;
    transition: var(--transition-smooth);
}
.social-icon:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}

/* ==================== FOOTER ==================== */
.site-footer {
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 3rem 0 2rem;
}
.site-footer h3 {
    color: var(--accent);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.site-footer a {
    color: var(--primary-foreground);
    text-decoration: none;
    transition: var(--transition-smooth);
}
.site-footer a:hover { color: var(--accent); }
.footer-divider {
    border-top: 1px solid hsla(0, 0%, 100%, 0.2);
    margin-top: 2rem;
    padding-top: 2rem;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.8s ease-out forwards; }

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-foreground);
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-to-top.visible { opacity: 1; }
.back-to-top:hover { transform: translateY(-4px); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .py-section { padding-top: 3rem; padding-bottom: 3rem; }
    .hero-title { font-size: 2rem; }
    .col-md-3, .col-md-4, .col-md-6, .col-lg-4, .col-lg-6 { width: 100%; }
    .row { margin: 0 -0.5rem; }
    .row > [class*="col-"] { padding: 0 0.5rem; }
    .d-flex.flex-column.flex-sm-row { flex-direction: column; }
}

@media (min-width: 576px) {
    .flex-sm-row { flex-direction: row !important; }
}

/* WordPress specific */
.wp-block-image img { border-radius: 0.5rem; }
.entry-content { padding: 2rem 0; }
.alignwide { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; max-width: 100%; }

/* 404 page */
.error-404 {
    text-align: center;
    padding: 6rem 2rem;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.error-404 h1 { font-size: 6rem; color: var(--accent); margin-bottom: 1rem; }
.error-404 p { font-size: 1.25rem; color: var(--muted-foreground); margin-bottom: 2rem; }
