/**
 * File: style.css
 * Purpose: Complete, unified stylesheet for the Rainbow Hearts Foundation website.
 * Author: Lyzfy Micro Systems SMC Limited
 * Lyzfy CEO profile: linkedin.com/in/harrytheafrican
 */

/* ==========================================================================
   1. CSS Variables & Theme Configuration (Branded to RH_LOGO.png)
   ========================================================================== */
:root {
    --primary-color: #1474B8;    /* Official RHF Blue */
    --secondary-color: #F05A28;  /* Official RHF Orange */
    --accent-color: #D35400;     /* Darker Orange for Hover Interactions */
    
    --text-main: #333333;
    --text-muted: #666666;
    --bg-light: #F8FBFE;         /* Clean, premium blue-tinted off-white */
    --bg-white: #FFFFFF;
    
    --font-heading: 'Georgia', serif;
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    --border-radius: 4px;
    --transition-speed: 0.3s;
}

/* ==========================================================================
   2. Base Reset & Typography
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 0.5em;
    font-weight: 600;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   3. Header & Navigation (Dropdown Logic)
   ========================================================================== */
.site-header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    border-bottom: 3px solid var(--secondary-color);
}

.logo-container h1 a {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

.main-nav .nav-item {
    position: relative;
    margin-left: 20px;
}

.main-nav .nav-item > a {
    color: var(--primary-color);
    font-weight: 600;
    padding: 10px 15px;
    display: block;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.main-nav .nav-item:hover > a {
    color: var(--secondary-color);
}

/* Dropdown Submenus (H2 Items) */
.main-nav .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-white);
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-top: 2px solid var(--secondary-color);
    z-index: 100;
}

.main-nav .nav-item:hover .dropdown {
    display: block;
}

.main-nav .dropdown li {
    width: 100%;
}

.main-nav .dropdown li a {
    padding: 12px 20px;
    display: block;
    color: var(--text-main);
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.main-nav .dropdown li a:hover {
    background-color: var(--bg-light);
    color: var(--secondary-color);
    padding-left: 25px;
}

/* ==========================================================================
   4. Hero Slider
   ========================================================================== */
.hero-slider {
    position: relative;
    width: 100%;
    height: 65vh;
    min-height: 400px;
    overflow: hidden;
    background-color: var(--primary-color);
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 10;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.3));
}

.slide-overlay {
    position: relative;
    z-index: 20;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}

.slide-caption {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin: 0;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 116, 184, 0.6);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 30;
    font-size: 1.5rem;
    border-radius: var(--border-radius);
    transition: background var(--transition-speed);
}

.slider-btn:hover {
    background: var(--secondary-color);
}

.slider-btn.prev { left: 20px; }
.slider-btn.next { right: 20px; }

/* ==========================================================================
   5. Main Content Structure & Core Typography
   ========================================================================== */
.main-content {
    flex: 1;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-body h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.page-body p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-main);
}

.page-body ul {
    margin-bottom: 20px;
    padding-left: 20px;
    font-size: 1.1rem;
}

.page-body li {
    margin-bottom: 10px;
}

/* ==========================================================================
   6. Custom Button Interfaces
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--secondary-color);
    color: #fff !important; /* Locks text readability */
    border-radius: var(--border-radius);
    font-weight: bold;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.btn:hover {
    background-color: var(--primary-color);
    color: #fff !important;
}

/* Highly visible interface buttons */
.btn-outline {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    color: #ffffff !important; /* Solves visibility issues */
    border-radius: var(--border-radius);
    margin-top: 15px;
    font-weight: bold;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff !important;
}

/* ==========================================================================
   7. Core Layout Utilities & Highly Compressed Vertical Rhythm
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Tight configuration reducing whitespace gaps down to 5px or less */
.section-padding {
    padding: 5px 0;
    margin-bottom: 5px;
}

.bg-light { background-color: var(--bg-light); }
.bg-primary { background-color: var(--primary-color) !important; }
.bg-white { background-color: var(--bg-white); }
.text-white { color: #ffffff !important; }
.text-accent { color: var(--accent-color); }
.text-secondary { color: var(--secondary-color); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 25px; }
.mb-5 { margin-bottom: 40px; }
.mt-2 { margin-top: 15px; }
.mr-3 { margin-right: 20px; }
.w-100 { width: 100%; }
.max-w-700 { max-width: 700px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.d-flex { display: flex; }
.align-items-start { align-items: flex-start; }
.shadow-box { box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.border-radius { border-radius: 8px; }

/* Dynamic Layout Frameworks */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.gap-4 { gap: 30px; }
.gap-5 { gap: 50px; }

/* Modern Typography Headers */
.section-subtitle {
    color: var(--secondary-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* ==========================================================================
   8. Component Stylings
   ========================================================================== */
.placeholder-image {
    width: 100%;
    height: 400px;
    background-color: #ddd;
    border-radius: var(--border-radius);
    background-size: cover;
    background-position: center;
}

.video-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.info-card {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--secondary-color);
    transition: transform var(--transition-speed);
}

.info-card:hover {
    transform: translateY(-5px);
}

/* Premium Page Layout Subcomponents */
.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.social-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition-speed);
}

.social-icon:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    color: #fff;
}

.cta-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d4d7a 100%);
    color: #fff;
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-banner h3 {
    color: #fff;
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.page-banner {
    background-color: var(--primary-color);
    padding: 80px 0;
    text-align: center;
    color: white;
    background-image: linear-gradient(rgba(20, 116, 184, 0.9), rgba(20, 116, 184, 0.9)), url('../images/banner-bg.jpg');
    background-size: cover;
    background-position: center;
    border-bottom: 4px solid var(--secondary-color);
}

.page-banner h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #fff;
}

/* Custom Interactive Entry Forms */
.custom-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.custom-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.custom-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    transition: border-color var(--transition-speed);
}

.custom-form .form-control:focus {
    border-color: var(--secondary-color);
    outline: none;
}

/* ==========================================================================
   9. Footer Architecture
   ========================================================================== */
.site-footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 30px 20px;
    text-align: center;
    border-top: 4px solid var(--secondary-color);
}

.site-footer p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* ==========================================================================
   10. Device Media Viewport Adaptations
   ========================================================================== */
@media (max-width: 768px) {
    .grid-2-col, .grid-3-col {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .mr-3 {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .site-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .main-nav .nav-item {
        margin-left: 0;
    }
}