/*
Theme Name: Harvest Call Child
Theme URI: https://harvestcallafrica.org
Description: Child theme for Harvest Call Ministries. Includes custom event styling and header/footer overrides.
Author: Harvest Call Ministries
Author URI: https://harvestcallafrica.org
Template: hello-elementor
Version: 1.0.4
Text Domain: harvest-call-child
*/

/* ==============================
   1. Variables & Global Setup
================================ */

:root {
  /* Layout */
  --hcm-header-height-desktop: 0px;
  --hcm-header-height-mobile: 0px;
  --hcm-container-width: 1200px;
  
  /* Brand Colors */
  --hcm-blue: #0B3C66;
  --hcm-green: #4CAF50;
  --hcm-orange: #F28C28;
  --hcm-light-gray: #f9f9fb;
  --hcm-text: #444444;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--hcm-text);
    line-height: 1.6;
}

.hcm-container {
    max-width: var(--hcm-container-width);
    margin: 0 auto;
    padding: 0 25px;
}

/* ==============================
   2. Theme Cleanup (Hide Defaults)
================================ */

/* Hide Hello Elementor default header/footer parts */
header.site-header,
.hello-header,
.elementor-location-header,
.elementor-section.elementor-section-hello-header,
.site-footer,
.hello-footer,
.elementor-location-footer,
.entry-title,
.page-title,
.site-description {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ==============================
   3. Header & Navigation Logic
================================ */

.hcm-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Admin bar support */
body.admin-bar .hcm-header { top: 32px; }

@media (max-width: 782px) {
  body.admin-bar .hcm-header { top: 46px; }
}

/* Push content below fixed header */
main, 
#content, 
.site-content,
.hcm-event-archive,
.hcm-event-single {
    padding-top: var(--hcm-header-height-desktop) !important;
}

@media (max-width: 1024px) {
  main, #content, .site-content, .hcm-event-archive, .hcm-event-single {
    padding-top: var(--hcm-header-height-mobile) !important;
  }
}

/* ==============================
   4. Buttons & UI Elements
================================ */

.hcm-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--hcm-blue);
    color: white !important;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(11, 60, 102, 0.2);
    border: none;
}

.hcm-btn-primary:hover {
    background: var(--hcm-orange);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 140, 40, 0.3);
}

.hcm-btn-secondary {
    display: inline-block;
    color: var(--hcm-blue);
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: 0.3s ease;
}

.hcm-btn-secondary span { transition: transform 0.3s ease; display: inline-block; }
.hcm-btn-secondary:hover { color: var(--hcm-orange); }
.hcm-btn-secondary:hover span { transform: translateX(5px); }

/* ==============================
   5. Event Archive (Grid View)
================================ */

.hcm-event-archive { background-color: var(--hcm-light-gray); padding-bottom: 80px; }

.hcm-archive-hero {
    background: linear-gradient(135deg, var(--hcm-blue) 0%, #1a4a73 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 50px;
}

.hcm-archive-hero h1 { font-family: 'Georgia', serif; font-size: 3rem; margin: 0 0 15px; }
.hcm-archive-hero p { font-size: 1.1rem; max-width: 700px; margin: 0 auto; opacity: 0.9; }

.hcm-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding-bottom: 50px;
}

.hcm-event-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.hcm-event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.hcm-event-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.hcm-event-card-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }

.hcm-event-date-badge {
    color: var(--hcm-orange);
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.hcm-event-card-title { font-family: 'Georgia', serif; font-size: 1.4rem; margin: 0 0 15px; line-height: 1.3; }
.hcm-event-card-title a { color: var(--hcm-blue); text-decoration: none; transition: 0.2s; }
.hcm-event-card-title a:hover { color: var(--hcm-orange); }

.hcm-event-card-excerpt { color: #666; font-size: 0.9rem; margin-bottom: 20px; flex-grow: 1; }

/* ==============================
   6. Single Event Page
================================ */

.hcm-event-hero {
    position: relative;
    min-height: 450px;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hcm-event-hero-bg { position: absolute; inset: 0; z-index: -1; }
.hcm-event-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hcm-event-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(11, 60, 102, 0.95), rgba(11, 60, 102, 0.4));
}

.hcm-event-title { font-family: 'Georgia', serif; font-size: 3.5rem; margin: 0; line-height: 1.1; }
.hcm-event-subtitle { font-size: 1.3rem; color: var(--hcm-green); font-weight: 600; margin: 10px 0 25px; }

.hcm-event-quick-meta { display: flex; gap: 40px; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 20px; }
.meta-item strong { display: block; color: var(--hcm-orange); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; }

.hcm-single-layout { padding: 60px 25px; max-width: 850px; margin: 0 auto; }

.hcm-main-description { font-size: 1.15rem; line-height: 1.8; color: var(--hcm-text); margin-bottom: 40px; }

.hcm-event-section {
    margin-bottom: 50px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    border-left: 5px solid var(--hcm-blue);
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.hcm-section-takeaways { border-left-color: var(--hcm-orange); }
.hcm-section-audience { border-left-color: var(--hcm-green); }

.hcm-section-bullets { list-style: none; padding: 0; margin: 20px 0; }
.hcm-section-bullets li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    font-weight: 500;
}

.hcm-section-bullets li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--hcm-green);
    font-weight: 900;
}

.hcm-event-register-box {
    background: var(--hcm-blue);
    color: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    margin-top: 60px;
}

.hcm-event-register-box h3 { font-family: 'Georgia', serif; font-size: 2rem; margin-bottom: 10px; color: white; }
.hcm-event-register-box p { margin-bottom: 30px; opacity: 0.9; }
.hcm-btn-large { font-size: 1.2rem; padding: 15px 45px; background: var(--hcm-orange); }

/* ==============================
   7. Footer Overrides
================================ */

.hcm-footer { position: relative; width: 100%; }

/* ==============================
   8. Responsive Adjustments
================================ */

@media (max-width: 768px) {
    .hcm-event-title { font-size: 2.2rem; }
    .hcm-event-quick-meta { flex-direction: column; gap: 15px; }
    .hcm-archive-hero h1 { font-size: 2.2rem; }
    .hcm-event-grid { grid-template-columns: 1fr; }
    .hcm-event-register-box { padding: 30px 20px; }
}