/* ========================================
   Sermons Page Styles - Google Inspired
   ======================================== */

:root {
    --google-blue: #4285f4;
    --google-red: #ea4335;
    --google-yellow: #fbbc05;
    --google-green: #34a853;
    --google-grey-100: #f1f3f4;
    --google-grey-300: #dadce0;
    --card-shadow-1: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --card-shadow-2: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
    --card-radius: 24px;
}

/* Hero Section - Clean & Bold with Premium Effects */
.page-title-hero {
    background: var(--color-bg);
    color: var(--color-text-main);
    padding: 80px 0 40px;
    text-align: center;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

/* Animated Blob Background */
.hero-blob-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: blob-float 20s ease-in-out infinite;
}

.hero-blob-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--color-brand-primary) 0%, #ef4444 100%);
    top: -150px;
    right: -100px;
    animation-delay: 0s;
}

.hero-blob-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f59e0b 0%, var(--color-brand-primary) 100%);
    bottom: -100px;
    left: -50px;
    animation-delay: -10s;
}

@keyframes blob-float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    75% {
        transform: translate(20px, 30px) scale(1.05);
    }
}

/* Grid Overlay - React/Sass Style */
.hero-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(220, 38, 38, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
}

[data-theme="dark"] .hero-grid-overlay {
    background-image:
        linear-gradient(rgba(220, 38, 38, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.05) 1px, transparent 1px);
}

.page-title-hero-content {
    position: relative;
    z-index: 2;
}

.page-title {
    font-family: var(--font-main);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--color-text-main);
    line-height: 1.2;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Bar - Floating Pill */
.sermons-filter-bar {
    max-width: 700px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.search-box {
    position: relative;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
    border-radius: 24px;
    background: var(--color-bg);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    height: 48px;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
}

.search-box:hover,
.search-box:focus-within {
    box-shadow: 0 4px 12px rgba(32, 33, 36, 0.18), 0 2px 6px rgba(32, 33, 36, 0.12);
    background: #fff;
    border-color: var(--color-brand-primary);
    transform: translateY(-2px);
}

[data-theme="dark"] .search-box {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    box-shadow: none;
}

.search-box svg {
    margin-left: 16px;
    color: #9aa0a6;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 0 16px;
    flex-grow: 1;
    height: 100%;
    font-size: 16px;
    color: var(--color-text-main);
    outline: none;
}

/* Grid Layout */
.sermons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding-bottom: 60px;
}

/* Material Card */
.sermon-card {
    background: var(--color-bg);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    transform: translateY(20px);
    border: 1px solid var(--color-border);
}

/* Remove default border in light mode for cleaner card look if preferred, 
   but keeping a light grey border is often safer. 
   Google usually does border: 1px solid #dadce0; */

.sermon-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.sermon-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-2);
    border-color: transparent;
}

/* Thumbnail Area */
.sermon-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--color-bg-alt);
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
}

.sermon-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sermon-card:hover .sermon-thumbnail img {
    transform: scale(1.03);
}

/* FAB Play Button */
.sermon-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sermon-card:hover .sermon-overlay {
    opacity: 1;
}

.play-icon {
    width: 56px;
    /* FAB standard size */
    height: 56px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-main);
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);
    transform: scale(0.8);
    transition: transform 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.play-icon svg {
    fill: currentColor;
    width: 24px;
    height: 24px;
    margin-left: 2px;
    /* Visual centering adjustment */
}

.sermon-card:hover .play-icon {
    transform: scale(1);
}

.sermon-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Content Area */
.sermon-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sermon-meta {
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
}

.sermon-title {
    font-family: 'Google Sans', 'Roboto', sans-serif;
    font-size: 22px;
    /* Larger title */
    font-weight: 400;
    /* Regular weight, Google style */
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--color-text-main);
}

.sermon-title a {
    text-decoration: none;
    color: inherit;
}

.sermon-title a:hover {
    color: var(--google-blue);
    text-decoration: underline;
}

.sermon-excerpt {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sermon-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
}

.sermon-speaker {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-main);
}

.speaker-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--google-grey-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: bold;
}

/* Pagination - Google Style */
.pagination-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 60px;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-main);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.pagination-btn:hover {
    background: var(--color-bg-alt);
}

.pagination-btn.active {
    background: var(--color-bg-alt);
    /* Light grey circle */
    font-weight: bold;
    color: var(--google-blue);
}

/* Single Sermon Layout adjustments */
.single-sermon-hero {
    background: var(--color-bg);
    padding: 80px 0 40px;
    border-bottom: none;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.grid-split-asym {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Responsive */
@media (max-width: 900px) {
    .grid-split-asym {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 2.25rem;
    }
}