/* ==========================================
   CLAYVILLE GARDENS SDA CHURCH - PREMIUM CSS
   Modern, Professional, Beautiful Design
   ========================================== */

/* ========== CSS VARIABLES ========== */
:root {
    /* Primary Colors - Elegant Maroon Palette */
    --maroon: #8B0000;
    --maroon-dark: #5a0000;
    --maroon-light: #a61c1c;
    --maroon-ultra-light: #fff5f5;
    
    /* Neutral Colors - Clean & Modern */
    --gray: #4b5563;
    --gray-light: #f9fafb;
    --gray-medium: #e5e7eb;
    --gray-dark: #1f2937;
    --black: #0f172a;
    --white: #ffffff;
    
    /* Accent Colors */
    --gold: #d4af37;
    --success: #10b981;
    --error: #ef4444;
    
    /* Shadows & Effects */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-serif: 'Georgia', 'Times New Roman', serif;
}

/* ========== GLOBAL RESET ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--black);
    line-height: 1.7;
    background: var(--white);
    overflow-x: hidden;
}

/* ========== NAVIGATION ========== */
nav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(139, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--black);
    transition: var(--transition-base);
}

.logo:hover {
    transform: translateY(-2px);
}

.logo img {
    height: 55px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo-symbol {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 800;
    font-size: 1.6rem;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.25);
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--maroon), var(--maroon-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-dark);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition-base);
    letter-spacing: 0.3px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--maroon), var(--maroon-light));
    transition: width var(--transition-base);
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--maroon);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ========== HERO SLIDER ========== */
.hero-slider {
    position: relative;
    height: 700px;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.55) 100%
    );
}

.slide.active {
    opacity: 1;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    padding: 2rem;
    z-index: 1;
}

.slide-overlay h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
    animation: fadeInUp 1s ease;
    line-height: 1.2;
    max-width: 900px;
    letter-spacing: -1px;
}

.slide-overlay p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease 0.2s backwards;
    font-weight: 400;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1.25rem;
    animation: fadeInUp 1s ease 0.4s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== BUTTONS ========== */
.btn {
    padding: 1.1rem 2.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
    opacity: 0;
    transition: var(--transition-base);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--maroon);
    border: 2px solid var(--white);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: transparent;
    color: var(--white);
    transform: translateY(-3px);
}

.btn-small {
    padding: 0.65rem 1.4rem;
    font-size: 0.9rem;
}

.btn-danger {
    background: var(--error);
    color: white;
}

/* ========== CONTAINERS & SECTIONS ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5rem 3rem;
}

.section-heading {
    text-align: center;
    margin-bottom: 4rem;
}

.section-heading h2 {
    font-size: 3rem;
    margin-bottom: 1.25rem;
    color: var(--maroon);
    font-weight: 800;
    position: relative;
    display: inline-block;
    letter-spacing: -0.5px;
}

.section-heading h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--maroon), var(--gold));
    border-radius: 2px;
}

.section-heading p {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 650px;
    margin: 0 auto;
    margin-top: 1.5rem;
    line-height: 1.7;
}

/* ========== CARDS GRID ========== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    border: 1px solid var(--gray-medium);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--maroon-light);
}

.card-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.card:hover .card-image {
    transform: scale(1.08);
}

.card-content {
    padding: 2rem;
}

.card-title {
    font-size: 1.65rem;
    margin-bottom: 0.75rem;
    color: var(--black);
    font-weight: 700;
    line-height: 1.3;
}

.card-meta {
    color: var(--maroon);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.card-description {
    color: var(--gray);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* ========== FOOTER ========== */
footer {
    background: linear-gradient(135deg, var(--black) 0%, var(--gray-dark) 100%);
    color: var(--white);
    padding: 4rem 3rem;
    text-align: center;
    margin-top: 5rem;
    border-top: 3px solid var(--maroon);
}

footer p {
    margin: 0.75rem 0;
    font-size: 1.05rem;
}

footer a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition-base);
    font-weight: 600;
}

footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* ========== ADMIN PANEL ========== */
.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem 3rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.admin-header h1 {
    color: var(--maroon);
    font-size: 2.5rem;
    font-weight: 800;
}

.admin-grid {
    display: grid;
    gap: 2.5rem;
}

.admin-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-medium);
}

.admin-card h2 {
    margin-bottom: 2rem;
    color: var(--maroon);
    font-size: 1.75rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.65rem;
    font-weight: 700;
    color: var(--black);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-medium);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-base);
    background: var(--gray-light);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--maroon);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(139, 0, 0, 0.08);
}

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

.alert {
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    font-weight: 600;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.admin-table th,
.admin-table td {
    padding: 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-medium);
}

.admin-table th {
    background: var(--gray-light);
    font-weight: 700;
    color: var(--black);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.admin-table tr:hover {
    background: var(--maroon-ultra-light);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1200px) {
    .nav-container {
        padding: 1rem 2rem;
    }
    
    .container {
        padding: 4rem 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        gap: 1.5rem;
        font-size: 0.85rem;
    }
    
    .hero-slider {
        height: 550px;
    }
    
    .slide-overlay h1 {
        font-size: 2.5rem;
    }
    
    .slide-overlay p {
        font-size: 1.15rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .container {
        padding: 3rem 1.5rem;
    }
    
    .section-heading h2 {
        font-size: 2.25rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .slide-overlay h1 {
        font-size: 2rem;
    }
    
    .slide-overlay p {
        font-size: 1rem;
    }
    
    .section-heading h2 {
        font-size: 1.9rem;
    }
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

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

.animate-slide-in {
    animation: slideIn 0.6s ease;
}

/* ========== SCROLLBAR STYLING ========== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--maroon);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--maroon-dark);
}
/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
                transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ========== NAV SCROLLED STATE ========== */
nav.scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

/* ========== EXTRA MISSING VARS ========== */
:root {
    --cream: #faf8f4;
    --maroon-glow: rgba(139,0,0,0.12);
    --gold-light: #e8c96a;
    --gold-pale: #fdf6e8;
    --gray-mid: #d4d0c8;
    --ink: #1a1a1a;
    --charcoal: #1a1a1a;
    --font-display: Georgia, 'Times New Roman', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --ease-out: cubic-bezier(0.22,1,0.36,1);
    --shadow-xs: 0 1px 4px rgba(0,0,0,0.06);
}

/* ========== MOBILE NAV FIX (don't stack on small phones) ========== */
@media (max-width: 640px) {
    .nav-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    .logo-text { font-size: 0.95rem; }
    .logo img  { height: 40px; }
    .nav-links {
        flex-wrap: wrap;
        gap: 0.1rem;
        justify-content: center;
    }
    .nav-links a {
        font-size: 0.78rem;
        padding: 0.3rem 0.5rem;
    }
}
