/*
Theme Name: RMMC Royal Theme
Theme URI: https://example.com
Author: CyderCoder
Description: A custom Royal Ministry And Miracle Center theme.
Version: 7.2
License: GNU General Public License v2 or later
Text Domain: rmmc-theme
*/

/* =========================================
   1. RESET & BASICS
   ========================================= */
:root {
    --primary: #2e004f;
    --primary-dark: #1a002e;
    --gold: #d4af37;
    --gold-bright: #ffd700;
    --text-dark: #222;
    --text-light: #ffffff;
    --bg-light: #fdfdfd;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
    --nav-height: 70px;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
    padding-top: var(--nav-height);
}

img { max-width: 100%; height: auto; display: block; }

/* FIX: Remove all underlines and dots from lists */
a { 
    text-decoration: none !important; 
    color: inherit; 
    transition: 0.3s ease; 
}
a:hover { text-decoration: none !important; }

ul, li { 
    list-style: none !important; 
    list-style-type: none !important; 
    margin: 0; 
    padding: 0; 
}

/* =========================================
   2. HEADER & NAV
   ========================================= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: var(--primary-dark);
    z-index: 9999;
    box-shadow: 0 2px 15px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}
.logo-area img {
    height: 45px;
    width: 45px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    object-fit: cover;
}
.logo-text { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; letter-spacing: 1px; }

/* Desktop Nav */
.desktop-nav { display: none; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { 
    color: #fff; text-transform: uppercase; font-size: 0.85rem; font-weight: 600; letter-spacing: 1px;
    padding: 8px 0; position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--gold); transition: 0.3s;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.current::after { width: 100%; }

/* Mobile Burger */
.mobile-toggle {
    display: flex; flex-direction: column; justify-content: space-between;
    width: 28px; height: 18px; background: none; border: none; cursor: pointer;
}
.mobile-toggle .bar { width: 100%; height: 3px; background: var(--gold); border-radius: 2px; }

/* Mobile Drawer */
.mobile-drawer {
    position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
    background: white; z-index: 10000; transition: 0.3s ease; box-shadow: -10px 0 30px rgba(0,0,0,0.2);
}
.mobile-drawer.active { right: 0; }
.drawer-header { padding: 20px; background: var(--primary); color: white; display: flex; justify-content: space-between; align-items: center; }
.drawer-close { background: none; border: none; color: var(--gold); font-size: 30px; cursor: pointer; }
.mobile-links a { display: block; padding: 18px 25px; border-bottom: 1px solid #f0f0f0; color: var(--primary); font-weight: 700; text-transform: uppercase; font-size: 0.9rem; }
.mobile-links a.current { color: var(--gold); background: #f9f9f9; }

.mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 9998; opacity: 0; visibility: hidden; transition: 0.3s; }
.mobile-overlay.active { opacity: 1; visibility: visible; }

/* =========================================
   3. HERO SECTIONS (FIXED & STABLE)
   ========================================= */
.hero, .page-hero {
    position: relative;
    width: 100%;
    /* Ensure it takes full viewport height minus nav, but never less than 600px */
    min-height: 80vh; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Reset margins to avoid 'scattering' */
    margin-top: 0; 
    padding: 80px 20px;
}

/* Page Hero can be shorter */
.page-hero {
    min-height: 50vh;
}

/* Darker Overlay for Text Pop */
.hero-overlay, .page-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6); /* Flat dark overlay is safer than gradient for text */
    z-index: 1;
}

.hero-content, .page-hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px; /* Constrain width so text doesn't span full edge-to-edge */
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.hero p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

/* Desktop sizing */
@media (min-width: 992px) {
    .hero { min-height: 100vh; }
    .hero h1 { font-size: 4.5rem; }
    .hero p { font-size: 1.4rem; }
}

/* =========================================
   4. LAYOUTS
   ========================================= */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { padding: 60px 0; }

.section-tag { color: var(--gold); font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 3px; display: block; margin-bottom: 15px; }
.section-title { font-family: var(--font-heading); font-size: 2rem; color: var(--primary); margin-bottom: 25px; line-height: 1.2; }
@media (min-width: 992px) { .section-title { font-size: 2.8rem; } }

.split-layout { display: flex; flex-direction: column; gap: 40px; }
.split-image img { border-radius: 15px; box-shadow: var(--shadow-soft); }

.cards-grid, .times-grid, .values-grid { display: grid; grid-template-columns: 1fr; gap: 25px; }

/* Overlapping Cards */
.features { background: #f8f8f8; padding-top: 0; }
.cards-grid { margin-top: -50px; position: relative; z-index: 10; }

.glass-card, .value-card {
    background: white; padding: 40px 30px; border-radius: 15px; text-align: center;
    box-shadow: var(--shadow-soft); transition: 0.3s;
}
.glass-card:hover, .value-card:hover { transform: translateY(-10px); }
.icon-box, .value-icon {
    width: 65px; height: 65px; background: var(--primary); color: var(--gold);
    border-radius: 50%; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}

/* Service Strip */
.service-strip { background: var(--primary-dark); color: white; }
.time-item { background: rgba(255,255,255,0.05); padding: 30px; border-radius: 12px; text-align: center; border: 1px solid rgba(212,175,55,0.1); }
.time-item h4 { color: var(--gold); font-family: var(--font-heading); font-size: 1.3rem; margin-bottom: 10px; }

/* =========================================
   5. CONTACT FORM (IMPROVED DESIGN)
   ========================================= */
.contact-card-wrapper {
    display: flex; flex-direction: column; background: white; border-radius: 20px;
    overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.contact-visual-side {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; padding: 50px 40px;
}

.contact-form-side { padding: 50px 40px; background: #fff; }

.form-group { margin-bottom: 25px; }
.form-group label {
    display: block; font-weight: 700; font-size: 0.85rem; color: var(--primary);
    margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px;
}

.form-control {
    width: 100%; padding: 16px; border: 2px solid #eee; border-radius: 10px;
    font-family: inherit; font-size: 1rem; transition: 0.3s; background: #f9f9f9;
}
.form-control:focus {
    outline: none; border-color: var(--gold); background: white; box-shadow: 0 5px 15px rgba(212, 175, 55, 0.1);
}

.btn-gold {
    background: linear-gradient(45deg, var(--gold), #f9e29c);
    color: var(--primary-dark); border: none; padding: 18px 40px;
    font-weight: 800; text-transform: uppercase; letter-spacing: 2px;
    border-radius: 12px; cursor: pointer; transition: 0.3s; display: inline-block;
    width: 100%; font-size: 1rem;
}
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3); }

/* =========================================
   6. DESKTOP MEDIA QUERIES
   ========================================= */
@media (min-width: 992px) {
    :root { --nav-height: 85px; }
    .desktop-nav { display: block; }
    .mobile-toggle { display: none; }
    .split-layout { flex-direction: row; align-items: center; gap: 80px; }
    .split-layout.reverse { flex-direction: row-reverse; }
    .cards-grid, .times-grid, .values-grid { grid-template-columns: repeat(3, 1fr); }
    .values-grid { grid-template-columns: repeat(4, 1fr); }
    .contact-card-wrapper { flex-direction: row; }
    .contact-visual-side { flex: 1; }
    .contact-form-side { flex: 1.5; }
}

/* =========================================
   ROYAL LOADER (PREMIUM)
   ========================================= */
#loader {
    position: fixed;
    inset: 0;
    background: var(--primary-dark);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader-content {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    animation: pulseLogo 2s infinite ease-in-out;
}

.loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--gold);
    border-radius: 50%;
    animation: spinRing 1.5s linear infinite;
}

.loader-text {
    margin-top: 20px;
    font-family: var(--font-heading);
    color: var(--gold);
    font-size: 1.2rem;
    letter-spacing: 4px;
    opacity: 0;
    animation: fadeInText 1s ease-out forwards 0.5s;
}

@keyframes spinRing { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulseLogo { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes fadeInText { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* HERO BACKGROUND FIX */
.hero, .page-hero {
    /* Ensure background image set inline works perfectly */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll; /* Fixed attachment can be buggy on mobile, scroll is safer */
}