/* ============================================
   CESHM - Common Styles
   Church of Emmanuel Spiritual Healing Ministry
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #0f2744;
    --secondary-color: #c9a227;
    --secondary-light: #d4b84a;
    --accent-color: #8b0000;
    --text-dark: #1a202c;
    --text-light: #4a5568;
    --text-muted: #718096;
    --bg-light: #f7fafc;
    --bg-cream: #faf8f5;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
    --font-primary: 'Playfair Display', Georgia, serif;
    --font-secondary: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1200px;
    --header-height: 80px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-secondary);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

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

ul, ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-wide {
    max-width: 1400px;
}

/* Section Spacing */
.section {
    padding: 5rem 0;
}

.section-sm {
    padding: 3rem 0;
}

.section-lg {
    padding: 7rem 0;
}

/* Section Headers */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.section-header .subtitle {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--bg-white);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-light);
    border-color: var(--secondary-light);
    color: var(--bg-white);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--bg-white);
    border-color: var(--bg-white);
}

.btn-outline:hover {
    background-color: var(--bg-white);
    color: var(--primary-color);
}

.btn-outline-dark {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-dark:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text .church-name {
    font-family: var(--font-primary);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.logo-text .tagline {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

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

.nav-item {
    position: relative;
    margin: 0;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.625rem;
    margin-left: 0.375rem;
    transition: var(--transition);
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-dark);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--secondary-color);
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* Header CTA */
.header-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    padding-top: 4rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    margin-top: 1rem;
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--secondary-color);
}

.footer h4 {
    color: var(--bg-white);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 1rem;
}

.footer-contact i {
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    margin: 0;
}

/* Cards */
.card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-white { color: var(--bg-white); }
.text-muted { color: var(--text-muted); }

.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--secondary-color); }
.bg-light { background-color: var(--bg-light); }
.bg-cream { background-color: var(--bg-cream); }
.bg-white { background-color: var(--bg-white); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* Divider */
.divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1.5rem auto;
    border-radius: 2px;
}

.divider-left {
    margin-left: 0;
}

/* Icon Box */
.icon-box {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.icon-box-sm {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
}

/* Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.9), rgba(15, 39, 68, 0.95));
}

/* Page Header / Banner */
.page-header {
    position: relative;
    padding: 8rem 0 5rem;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin-top: var(--header-height);
}

.page-header .overlay {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.85), rgba(15, 39, 68, 0.9));
}

.page-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--bg-white);
}

.page-header h1 {
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.page-header .subtitle {
    color: var(--secondary-color);
    font-size: 1.125rem;
    font-weight: 500;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
}

.breadcrumb a {
    color: rgba(255,255,255,0.7);
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

.breadcrumb span {
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .section {
        padding: 3.5rem 0;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 2rem;
        transform: translateX(100%);
        transition: var(--transition);
        overflow-y: auto;
    }
    
    .main-nav.active {
        transform: translateX(0);
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link {
        padding: 1rem 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 1rem;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .header-cta {
        display: none;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .logo-text .church-name {
        font-size: 0.9rem;
    }
    
    .logo-text .tagline {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .page-header {
        padding: 6rem 0 3rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

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

.slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

/* Scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
