/*
 * TUNCU Website Core Styles - FULLY UPDATED TO MATCH MOCKUP (Fixed Box CSS Removed)
 * File: css/style.css
 * ----------------------------------------------------
 * Sections:
 * 1. Typography and Global Resets
 * 2. Buttons and Utility Classes
 * 3. Header and Navigation Styles (Includes Mobile Toggle)
 * 4. Hero Section Styles (index.php)
 * 5. Forms and Authentication Styles
 * 6. Footer Styles
 * 7. Dashboard Styles
 * 8. Event/Ministry/Testimonial Card Styles
 * 9. Prayer Wall Styles
 * 10. Contact Page Styles
 * 11. About Us Page Styles
 * 12. Media Queries (Responsiveness)
 */

/* --- 1. Typography and Global Resets --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

:root {
    /* Define Color Palette based on mockups (Purple/Gold) */
    --color-primary: #5F27CD; 	 /* Dark Purple - Main blocks, buttons */
    --color-secondary: #FFC312; 	 /* Bright Yellow/Gold - Main CTA, Accents, Highlights */
    --color-header-bg: #7D3EC2; 	 /* Header Bar Background (Lighter Purple) */
    --color-text: #333333; 	 	 /* Dark text */
    --color-text-light: #F7F7F7; 	 /* Light text on dark backgrounds */
    --color-background-light: #F8F9FA; /* Light content background */
    --color-white: #ffffff;
    --color-dark: #212529;
    
    /* Specific colors for dashboard/status */
    --color-purple: #964ee7; 
    --color-orange: #fd7e14; 
    
    --border-radius-small: 5px;
    --border-radius-large: 12px;
    --border-radius-xl: 20px;
    --shadow-base: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.3);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif; /* Updated Font */
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background-light);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3, h4 {
    color: var(--color-dark);
    line-height: 1.2;
    margin-bottom: 10px;
    font-weight: 700; 
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--color-secondary);
}

/* Global Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 10px;
    color: var(--color-dark);
}

.section-subtitle {
    text-align: center;
    color: #666; 
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* --- 2. Buttons and Utility Classes --- */
.button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: var(--border-radius-large);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: 2px solid transparent;
    text-transform: capitalize;
    font-size: 1rem;
    text-decoration: none;
}

.button i, .btn i {
    margin-right: 8px;
}

/* Primary Button (Dark Purple) */
.primary-btn {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.primary-btn:hover {
    background-color: #4b1a9e; 
    color: var(--color-white);
}

/* Secondary/CTA Button (Bright Yellow/Gold) */
.secondary-btn {
    background-color: var(--color-secondary);
    color: var(--color-dark);
    box-shadow: var(--shadow-base);
}

.secondary-btn:hover {
    background-color: #e0a800;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.join-us-btn { /* Alias for Secondary on header */
    background-color: var(--color-secondary);
    color: var(--color-dark);
    border: none;
    padding: 10px 20px;
    font-weight: 700;
}

.member-login-btn { /* Outline style on dark header */
    background-color: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
    padding: 8px 15px;
}
.member-login-btn:hover {
    background-color: var(--color-secondary);
    color: var(--color-dark);
}

.bg-primary { background-color: var(--color-primary); }
.text-secondary { color: var(--color-secondary) !important; }

.alert-error {
    color: #c0392b !important;
    background-color: #fceae9;
    border: 1px solid #c0392b;
    padding: 15px;
    border-radius: var(--border-radius-small);
}

/* --- 3. Header and Navigation Styles (Includes Mobile Toggle) --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background-color: var(--color-header-bg); /* Lighter Purple Bar */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-white);
}
.logo-icon {
    font-size: 1.8rem;
    margin-right: 8px;
    color: var(--color-secondary); /* Yellow Icon */
}

/* Mobile Menu Toggle Button (Hidden on desktop) */
.menu-toggle {
    display: none; 
    font-size: 1.5rem;
    color: var(--color-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.main-nav {
    /* Desktop Styles */
    margin-right: 20px;
    transition: max-height 0.3s ease-in-out;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 10px;
}

.main-nav ul li a {
    padding: 10px 15px;
    display: block;
    font-weight: 600;
    color: var(--color-white);
    border-bottom: 3px solid transparent; 
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--color-secondary);
    border-bottom-color: var(--color-secondary);
}

.header-actions {
    display: flex;
    gap: 15px;
}

/* --- 4. Hero Section Styles (index.php) --- */
.hero-section {
    background-color: var(--color-primary);
    background-image: linear-gradient(135deg, var(--color-primary) 0%, #7D3EC2 100%); 
    padding: 100px 5%;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 800;
    color: var(--color-white);
}

.hero-text .highlight {
    color: var(--color-secondary);
}

.hero-text .tagline {
    font-size: 1.1rem;
    color: var(--color-light-text);
    margin: 15px 0 30px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-dark);
}

/* Retaining base style for .setup-box in case it is conditionally used */
.setup-box {
    background-color: var(--color-primary);
    border: 1px solid var(--color-secondary);
    padding: 25px;
    border-radius: var(--border-radius-xl);
    color: var(--color-light-text);
    margin-top: 30px;
    box-shadow: var(--shadow-base);
    max-width: 300px; 
}
.setup-box h4 {
    color: var(--color-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

/* Removed: .setup-box-container fixed positioning styles */

/* --- 5. Forms and Authentication Styles --- */
form {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    border: none;
    border-radius: var(--border-radius-large);
    background-color: var(--color-white);
    box-shadow: var(--shadow-base);
}

form input[type="text"],
form input[type="email"],
form input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* --- 6. Footer Styles --- */
.main-footer {
    background-color: var(--color-primary); /* Dark Purple Footer */
    color: var(--color-white);
    padding: 40px 5%;
    background-image: linear-gradient(0deg, #4b1a9e 0%, var(--color-primary) 100%);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.first-time-setup-box {
    /* Inherits from .setup-box but overrides max-width for full column width */
    max-width: 100%;
}

.get-in-touch h2, .get-in-touch p, 
.contact-form-card label, .contact-form-card input, .contact-form-card textarea {
    color: var(--color-white);
}

.contact-form-card input, .contact-form-card textarea {
    border: 1px solid #666;
    background-color: #333;
}


/* --- 7. Dashboard Styles --- */
.profile-avatar {
    background-color: var(--color-secondary);
    color: var(--color-dark);
}

.stat-card {
    border-radius: var(--border-radius-large);
}
.stat-card.purple { background-color: var(--color-primary); } 
.stat-card.yellow { background-color: var(--color-secondary); color: var(--color-dark); }
.stat-card.blue { background-color: #2c97df; }
.stat-card.orange { background-color: var(--color-orange); }

/* --- 8. Event/Ministry/Testimonial Card Styles --- */
.card {
    background-color: var(--color-white);
    border-radius: var(--border-radius-large);
    padding: 25px;
    box-shadow: var(--shadow-base);
    transition: box-shadow var(--transition-speed);
}
.card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.events-grid, .ministry-cards-grid, .testimony-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.ministry-card {
    border-radius: var(--border-radius-large);
    border: 1px solid #ddd;
}

/* --- New Event Card Specific Styles (Matching Mockup) --- */
.event-card {
    /* Base card styling is inherited, but we need to remove padding from the top-level card */
    padding: 0;
    overflow: hidden; /* Ensures the image respects the border-radius */
    border-top: none !important; /* Override the inline border-top added previously */
    transition: transform 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
}

.event-card .image-container {
    width: 100%;
    height: 180px; /* Fixed height for the image area */
    overflow: hidden;
    position: relative;
    background-color: var(--color-primary); /* Default background color */
}

.event-card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills the container without distortion */
}

.event-card .card-content {
    padding: 25px; /* Add padding back to the content area */
}

/* Styling for the purple/gradient overlay on the image */
.event-card .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient overlay from dark to transparent (like in the mockup) */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent); 
    display: flex;
    align-items: flex-end;
    padding: 15px;
    color: var(--color-white);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Event metadata icons (the small yellow icons in the content area) */
.event-meta-icon {
    color: var(--color-secondary);
    margin-right: 8px;
    width: 18px; /* Fixed width to align icons */
}

.event-details-row {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    margin-bottom: 10px;
}


/* --- 9. Prayer Wall Styles --- */
.prayer-submission-card {
    border-radius: var(--border-radius-xl);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    background-color: var(--color-white);
}

.prayer-request-item {
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-base);
}

/* --- 10. Contact Page Styles --- */
.info-item i {
    color: var(--color-primary);
}
.social-links-area a {
    color: var(--color-dark);
}


/* --- 11. About Us Page Styles --- */
.mission-vision-grid .card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.mission-vision-grid .card i {
    color: var(--color-primary);
}
.belief-item i {
    color: var(--color-secondary);
}


/* --- 12. Media Queries (Responsiveness) --- */
@media (max-width: 992px) {
    .mission-vision-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    /* Header and Navigation adjustments for mobile */
    .main-header {
        flex-wrap: wrap; 
        padding: 10px 15px;
    }
    
    .logo {
        flex-grow: 1;
        font-size: 1.1rem;
    }

    /* SHOW the toggle button on mobile */
    .menu-toggle {
        display: block; 
        order: 2;
    }
    
    /* Initially hide navigation links */
    .main-nav {
        width: 100%;
        max-height: 0; 
        overflow: hidden;
        order: 3; 
        background-color: var(--color-header-bg);
    }

    /* JavaScript will add this class to show the menu */
    .main-nav.active {
        max-height: 500px; 
    }

    .main-nav ul {
        flex-direction: column;
        padding: 10px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        gap: 0;
    }
    
    .main-nav ul li a {
        padding: 12px 20px;
        border-bottom: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Hide action buttons on mobile */
    .header-actions {
        display: none; 
    }

    /* Hero Section Stacking */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }
    
    .setup-box {
        max-width: none;
    }

    /* Grid Stacking */
    .dashboard-grid, .prayer-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}