/*
Theme Name: Redemption Children's Home
Theme URI: https://rchghana.org
Author: RCH Team
Author URI: https://rchghana.org
Description: Custom WordPress theme for Redemption Children's Home - A charity organization providing love, education, and care to children in Ghana
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rch-theme
Tags: charity, children, nonprofit, responsive, custom-colors
*/

/* ============================================
   GOOGLE FONTS IMPORT
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Dosis:wght@400;500;600;700&family=Overpass:wght@300;400;500&display=swap');

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Overpass', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    color: #555555;
    background-color: #FFFFFF;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Dosis', sans-serif;
    color: #222222;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2.5rem; font-weight: 700; }
h3 { font-size: 2rem; font-weight: 600; }
h4 { font-size: 1.5rem; font-weight: 600; }
h5 { font-size: 1.25rem; font-weight: 500; }
h6 { font-size: 1rem; font-weight: 500; }

p {
    margin-bottom: 1rem;
}

a {
    color: #2E7D32;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #F7CA44;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 5rem 1rem;
}

.text-center {
    text-align: center;
}

.primary-color { color: #2E7D32; }
.secondary-color { color: #C62828; }
.accent-color { color: #F7CA44; }
.dark-color { color: #222222; }

.bg-primary { background-color: #2E7D32; }
.bg-secondary { background-color: #C62828; }
.bg-accent { background-color: #F7CA44; }
.bg-dark { background-color: #222222; }
.bg-light { background-color: #FAFAFA; }
.bg-white { background-color: #FFFFFF; }

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #222;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-branding img,
.site-logo img {
    height: 48px;
    width: auto;
}

/* Desktop Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-menu,
#primary-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu > li,
#primary-menu > li {
    position: relative;
}

.nav-menu > li > a,
#primary-menu > li > a {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-menu > li > a:hover,
#primary-menu > li > a:hover,
.nav-menu .current-menu-item > a,
#primary-menu .current-menu-item > a {
    color: #F7CA44;
}

/* Dropdown Menu */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #222;
    padding: 0.5rem 0;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px rgba(0,0,0,0.3);
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.sub-menu a:hover {
    background-color: #F7CA44;
    color: #222;
}

/* Donate Button */
.donate-button {
    background-color: #C62828;
    color: #fff !important;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    font-family: 'Dosis', sans-serif;
    font-weight: 600;
    margin-left: 1rem;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.donate-button:hover {
    background-color: #B71C1C;
    transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-icon {
    position: relative;
    width: 24px;
    height: 3px;
    background: #fff;
    display: block;
    transition: background 0.3s ease;
}

.menu-icon::before,
.menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 24px;
    height: 3px;
    background: #fff;
    transition: transform 0.3s ease, top 0.3s ease;
}

.menu-icon::before { top: -7px; }
.menu-icon::after  { top: 7px; }

/* Hamburger → X animation */
.menu-toggle.is-active .menu-icon { background: transparent; }
.menu-toggle.is-active .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-toggle.is-active .menu-icon::after  { top: 0; transform: rotate(-45deg); }

/* ============================================
   DESKTOP NAVIGATION (explicit)
   ============================================ */
@media (min-width: 1025px) {
    .menu-toggle {
        display: none !important;
    }

    .main-navigation {
        display: flex !important;
        align-items: center;
        gap: 0.25rem;
    }

    .nav-menu,
    #primary-menu {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 0.25rem;
        list-style: none;
        margin: 0;
        padding: 0;
    }
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */
@media (max-width: 1024px) {

    .menu-toggle {
        display: block !important;
    }

    .main-navigation {
        display: none !important;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #222;
        padding: 2rem 1rem;
        overflow-y: auto;
        z-index: 999;
    }

    .main-navigation.active {
        display: block !important;
    }

    .nav-menu,
    #primary-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .nav-menu > li,
    #primary-menu > li {
        width: 100%;
        border-bottom: 1px solid #333;
    }

    .nav-menu > li > a,
    #primary-menu > li > a {
        display: block;
        padding: 1rem;
        width: 100%;
    }

    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 1rem;
        background-color: #1a1a1a;
        display: none;
    }

    .menu-item-has-children.open > .sub-menu {
        display: flex;
    }

    .donate-button {
        display: block;
        width: calc(100% - 2rem);
        text-align: center;
        margin: 1rem auto 0;
    }
}
/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    padding: 6rem 1rem;
    margin-top: 80px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 1024px;
    margin: 0 auto;
    color: #FFFFFF;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 1.5rem;
    font-family: 'Dosis', sans-serif;
}

.hero-content p {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-button {
    display: inline-block;
    background-color: #C62828;
    color: #FFFFFF;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-family: 'Dosis', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
}

.hero-button:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.3);
    color: #FFFFFF;
}

/* ============================================
   PAGE HERO (Smaller Hero for Internal Pages)
   ============================================ */
.page-hero {
    position: relative;
    padding: 8rem 1rem;
    background-size: cover;
    background-position: center;
    margin-top: 80px;
}

.page-hero .hero-overlay {
    background-color: rgba(0, 0, 0, 0.6);
}

.page-hero h1 {
    font-size: clamp(2rem, 4vw, 3.75rem);
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   SECTION HEADINGS
   ============================================ */
.section-heading {
    text-align: center;
    margin-bottom: 4rem;
}

.section-heading h2 {
    color: #2E7D32;
    font-family: 'Dosis', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-heading .underline {
    width: 96px;
    height: 4px;
    background-color: #F7CA44;
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

.section-heading p {
    color: #555555;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: #FFFFFF;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    background-color: #2E7D32;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.card-icon svg,
.card-icon i {
    color: #FFFFFF;
    font-size: 1.5rem;
}

.card-title {
    font-family: 'Dosis', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #222222;
    margin-bottom: 0.75rem;
}

.card-description {
    color: #555555;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ============================================
   STATS COUNTER
   ============================================ */
.stats-section {
    background-color: #2E7D32;
    padding: 5rem 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1280px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Dosis', sans-serif;
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.75rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    font-weight: 300;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-family: 'Dosis', sans-serif;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: #C62828;
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: #B71C1C;
    transform: scale(1.05);
    color: #FFFFFF;
}

.btn-secondary {
    background-color: #2E7D32;
    color: #FFFFFF;
}

.btn-secondary:hover {
    background-color: #1B5E20;
    transform: scale(1.05);
    color: #FFFFFF;
}

.btn-outline {
    background-color: transparent;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
}

.btn-outline:hover {
    background-color: #FFFFFF;
    color: #2E7D32;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-family: 'Dosis', sans-serif;
    font-weight: 600;
    color: #222222;
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #E0E0E0;
    border-radius: 0.75rem;
    font-family: 'Overpass', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #2E7D32;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background-color: #222222;
    color: #FFFFFF;
    padding: 3rem 1rem 2rem;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-family: 'Dosis', sans-serif;
    color: #2E7D32;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section li {
    color: #A0A0A0;
    font-size: 0.875rem;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #A0A0A0;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #F7CA44;
}

.footer-logo img {
    height: 48px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-bottom {
    border-top: 1px solid #404040;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #A0A0A0;
    font-size: 0.875rem;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    
    .section {
        padding: 3rem 1rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #F7CA44;
    outline-offset: 2px;
}
