/* Variables */
:root {
    --primary: #4843BB; /* Custom Violet/Indigo */
    --primary-light: #6c67db;
    --accent: #4843BB; /* Match the new brand color */
    --accent-hover: #36329e;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-white: #ffffff;
    --bg-light: #f3f4f6;
    --bg-dark: #111827;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--bg-dark);
}

p {
    margin-bottom: 1rem;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.text-center {
    text-align: center;
}

.bg-light {
    background-color: var(--bg-light);
}

.mt-4 {
    margin-top: 2rem;
    display: inline-block;
}

/* Typography & Utils */
.section-tag {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.divider {
    height: 3px;
    width: 60px;
    background-color: var(--accent);
    margin: 1.5rem auto 2rem;
}

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

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-primary-outline {
    display: inline-block;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 0.6rem 1.4rem;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

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

.btn-secondary {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
    padding: 1.5rem 0;
    background: transparent;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.logo-badge-nav {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.logo-badge-nav img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-logo-white {
    display: block;
}

.nav-logo-purple {
    display: none;
}

.navbar.scrolled .nav-logo-white {
    display: none;
}

.navbar.scrolled .nav-logo-purple {
    display: block;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    transition: var(--transition);
}

.navbar.scrolled .logo-text {
    color: var(--primary);
}

.logo-accent {
    color: var(--accent);
}

.logo-link:hover .logo-badge-nav {
    transform: scale(1.08);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.95rem;
}

.navbar.scrolled .nav-links a {
    color: var(--text-main);
}

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

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.navbar.scrolled .mobile-toggle {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-image: url('hero.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(17, 24, 39, 0.8), rgba(17, 24, 39, 0.4));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 auto;
}

/* Hero Announcement Badge */
.hero-announcement {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    margin-top: 2.5rem;
    font-size: 0.9rem;
    animation: pulseGlow 3s infinite ease-in-out;
}

.announcement-badge {
    background-color: var(--accent);
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.announcement-text {
    font-weight: 500;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 rgba(72, 67, 187, 0);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.4);
    }
}

/* Hero Brand Box (bracket layout based on user logo) */
.hero-brand-box {
    position: relative;
    padding: 2rem 2.5rem;
    margin-bottom: 3.5rem;
    display: inline-block;
    text-align: center;
    max-width: 520px;
    width: 100%;
}

.hero-brand-box::before,
.hero-brand-box::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px; /* Length of the horizontal lines of the brackets */
    border: 3px solid rgba(255, 255, 255, 0.85);
    pointer-events: none;
}

.hero-brand-box::before {
    left: 0;
    border-right: none;
}

.hero-brand-box::after {
    right: 0;
    border-left: none;
}

.hero-brand-logo {
    position: absolute;
    top: -48px;
    left: 50%;
    transform: translateX(-50%);
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.hero-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-brand-title {
    font-family: var(--font-body);
    font-size: 2.25rem;
    font-weight: 700;
    color: white;
    letter-spacing: 3px;
    margin: 0.5rem 0;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hero-brand-subtitle {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-style: italic;
    color: white;
    background-color: transparent;
    padding: 0 15px;
    white-space: nowrap;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 576px) {
    .hero-brand-box {
        padding: 1.5rem 1.5rem;
        margin-bottom: 2.5rem;
    }
    .hero-brand-box::before,
    .hero-brand-box::after {
        width: 60px;
    }
    .hero-brand-title {
        font-size: 1.5rem;
    }
    .hero-brand-subtitle {
        font-size: 1.1rem;
        bottom: -14px;
    }
    .hero-brand-logo {
        width: 75px;
        height: 75px;
        top: -37.5px;
    }
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-text {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Values Section */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.value-card {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid transparent;
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-top-color: var(--accent);
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.value-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.value-card p {
    color: var(--text-muted);
}

/* Worship Section */
.worship-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.info-box {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-icon {
    font-size: 1.5rem;
    color: var(--accent);
    background: rgba(217, 119, 6, 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.info-item strong {
    display: block;
    color: var(--bg-dark);
}

.info-item span {
    color: var(--text-muted);
}

.worship-image-placeholder {
    background-color: var(--primary);
    border-radius: 8px;
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.15);
    position: relative;
    overflow: hidden;
}

.worship-image-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, var(--primary-light), transparent 70%);
    opacity: 0.3;
}

.verse-quote {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
}

.verse-quote blockquote {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.verse-quote cite {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Worship Tabs */
.worship-tabs {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.worship-tab-btn {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding-bottom: 0.5rem;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    margin-bottom: -0.5rem; /* Align with parent bottom border */
}

.worship-tab-btn:hover {
    color: var(--primary);
}

.worship-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.worship-panel {
    display: none;
    opacity: 0;
}

.worship-panel.active {
    display: block;
    animation: fadeInWorship 0.4s ease forwards;
}

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

/* Worship Announcement Alert */
.worship-announcement {
    background-color: rgba(72, 67, 187, 0.05);
    border-left: 4px solid var(--primary);
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    text-align: left;
}

.worship-announcement p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.5;
}

.info-icon-badge {
    font-size: 1.25rem;
    line-height: 1;
}

/* Resources Section */
.ressources {
    background-color: var(--bg-white);
}

.tabs-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-btn {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border: 2px solid transparent;
    background: var(--bg-light);
    color: var(--text-muted);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    background-color: rgba(72, 67, 187, 0.1);
    color: var(--primary);
}

.tab-btn.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(72, 67, 187, 0.3);
}

.tab-content-container {
    position: relative;
    min-height: 350px;
}

.tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.tab-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.predications-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 992px) {
    .predications-container.has-spotify {
        grid-template-columns: 350px 1fr;
        align-items: start;
    }
}

.spotify-show-embed-container {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.article-audio-player-spotify {
    margin-bottom: 3rem;
}

.ressources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.ressource-card {
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.ressource-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(72, 67, 187, 0.08);
    background: var(--bg-white);
    border-color: rgba(72, 67, 187, 0.15);
}

.card-audio-preview {
    height: 180px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-audio-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 60%);
}

.play-btn {
    width: 60px;
    height: 60px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    padding-left: 4px; /* Align play icon */
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: var(--transition);
    z-index: 1;
}

.ressource-card:hover .play-btn {
    transform: scale(1.1);
    background-color: var(--bg-light);
}

.card-image-placeholder {
    height: 180px;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary-light);
    transition: var(--transition);
}

.ressource-card:hover .card-image-placeholder {
    background-color: rgba(72, 67, 187, 0.05);
}

.card-image-container {
    height: 180px;
    width: 100%;
    overflow: hidden;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-badge {
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(72, 67, 187, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1rem;
}

.meta-author {
    font-weight: 500;
    color: var(--text-main);
}

/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 1rem;
}

.footer-logo-link {
    display: inline-flex;
    margin-bottom: 1.5rem;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
}

.footer h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.social-links a:hover {
    background-color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
}

.footer-affiliations {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: center;
}

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

.footer-affiliations a:hover {
    color: var(--accent);
}

.footer-affiliations .separator {
    color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .footer-affiliations {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    .footer-affiliations .separator {
        display: none;
    }
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Media Queries */
@media (max-width: 900px) {
    .worship-wrapper {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 110px;
        height: auto;
        min-height: 100vh;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--bg-white);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: 0.4s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        color: var(--text-main);
        font-size: 1.25rem;
    }

    .mobile-toggle {
        display: block;
        z-index: 1001;
    }

    .mobile-toggle.active {
        color: var(--text-main);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Loading & Error States */
.loading-state, .error-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(72, 67, 187, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-state {
    color: #dc2626;
}

.error-state .error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
