/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --accent-color: #fbbf24;
    --accent-dark: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.8rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu li a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary-color);
}

.nav-menu li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.btn-login,
.btn-register {
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
}

.btn-login {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-login:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-register {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-register:hover {
    background-color: var(--primary-dark);
}

.btn-give {
    padding: 0.5rem 1.5rem;
    background-color: var(--accent-color);
    color: var(--text-dark);
    border-radius: 0.375rem;
    font-weight: 600;
}

.btn-give:hover {
    background-color: var(--accent-dark);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 0.375rem;
    list-style: none;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
}

.dropdown-menu li a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--text-dark);
}

.btn-accent:hover {
    background-color: var(--accent-dark);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid currentColor;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

.card {
    background-color: var(--white);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.card-text {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

/* Section */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    color: var(--success);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    font-size: 1.25rem;
}

.social-links a:hover {
    background-color: var(--primary-color);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu li a {
        display: block;
        padding: 0.75rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
    }
    
    .dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.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; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Video Embed */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.badge-accent {
    background-color: var(--accent-color);
    color: var(--text-dark);
}

.badge-success {
    background-color: var(--success);
    color: var(--white);
}

/* ============================================
   INDEX PAGE SPECIFIC STYLES
   ============================================ */

/* Service Times Section */
.service-times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* Latest Sermon / Live Stream Section */
.sermon-info {
    text-align: center;
    margin-top: 2rem;
}

.sermon-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.sermon-info .text-light {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* Ministry Cards */
.ministry-card {
    text-align: center;
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
}

.ministry-card:hover {
    transform: translateY(-5px);
}

.ministry-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 0.5rem;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.cta-section p {
    margin-bottom: 2rem;
    font-size: 1.125rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Event Card Enhancements */
.event-card-date {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    height: 200px;
}

.event-card-date .month {
    font-weight: 600;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.event-card-date .day {
    font-size: 3rem;
    font-weight: bold;
    margin: 0;
}

/* Testimony Cards */
.testimony-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.testimony-card .card-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.testimony-author {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 1rem;
}

/* Progress Bar for Event Capacity */
.capacity-bar {
    background: var(--bg-light);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.capacity-bar-fill {
    background: var(--accent-color);
    height: 100%;
    transition: width 0.3s ease;
}

.capacity-info {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Icon Boxes */
.icon-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.icon-box-icon {
    background: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.icon-box-content h3 {
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
}

.icon-box-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Live Badge */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--danger);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.live-badge::before {
    content: '';
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-light);
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Grid Variations */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Announcement Bar */
.announcement-bar {
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 0.75rem 0;
    text-align: center;
    font-size: 0.875rem;
}

.announcement-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.close-announcement {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    position: absolute;
    right: 0;
    font-size: 1rem;
}

/* Skip to Content */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
    top: 0;
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(0,0,0,0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Profile Photo */
.profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.profile-photo-lg {
    width: 100px;
    height: 100px;
}

/* Stats Card */
.stats-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.stats-icon.primary { background: var(--primary-color); }
.stats-icon.success { background: var(--success); }
.stats-icon.warning { background: var(--warning); }
.stats-icon.danger { background: var(--danger); }
.stats-icon.accent { background: var(--accent-color); }

.stats-content h3 {
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
}

.stats-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Responsive Grid Updates */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .cta-section {
        padding: 2rem 1rem;
    }
    
    .cta-section h2 {
        font-size: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .icon-box {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .alert {
        display: none;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
}