/* ===================================================================
   3SRB — Home Page (index.html) specific styles
   =================================================================== */

/* ========== SCROLL SNAP ========== */
html {
    scroll-snap-type: y mandatory;
}

section {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
}

.section-inner {
    max-width: var(--section-max);
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ========== NAV OVERRIDE: transparent until scrolled ========== */
nav {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

nav.scrolled {
    background: rgba(237, 232, 220, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

/* ========== DECORATIVE CIRCLES ========== */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(92, 35, 35, 0.06);
    pointer-events: none;
    z-index: 0;
}
.deco-circle--1 {
    width: 600px; height: 600px;
    top: -200px; right: -200px;
}
.deco-circle--2 {
    width: 400px; height: 400px;
    bottom: -100px; left: -100px;
}
.deco-circle--3 {
    width: 300px; height: 300px;
    top: 50%; right: -80px;
    transform: translateY(-50%);
}

/* ========== HERO ========== */
.hero {
    padding-top: calc(var(--nav-height) + 40px);
    text-align: center;
}

.hero .hero-badge {
    display: inline-block;
    font-family: var(--font-button);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(184, 134, 11, 0.2);
    padding: 6px 18px;
    border-radius: 100px;
    margin-bottom: 2rem;
}

.hero h1 {
    margin-bottom: 0.4em;
}

.hero .hero-quote {
    font-family: var(--font-subheading);
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    font-style: italic;
    color: var(--primary);
    margin: 2rem auto 0;
    max-width: 700px;
    line-height: 1.5;
    opacity: 0.85;
}

.hero .hero-quote cite {
    display: block;
    font-size: 0.8rem;
    font-style: normal;
    font-family: var(--font-body);
    color: var(--muted);
    margin-top: 0.8rem;
    letter-spacing: 0.05em;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-family: var(--font-button);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.5;
    animation: fadeInUp 1s ease 1.5s both;
}

.hero-scroll-indicator .scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--muted), transparent);
}

/* ========== MASTER SECTION — enhanced photo ========== */
#master .col-image {
    position: relative;
}

#master .col-image .master-photo-wrap::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: 12px;
    bottom: 12px;
    border: 1px solid rgba(216, 162, 62, 0.2);
    border-radius: 16px;
    pointer-events: none;
    z-index: 0;
}

#master .col-image .master-photo-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(216, 162, 62, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

#master .col-image .master-photo-wrap img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 12px;
    box-shadow:
        0 8px 40px rgba(0,0,0,0.06),
        0 0 0 1px rgba(216, 162, 62, 0.08);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
    position: relative;
    z-index: 1;
}

#master .col-image .master-photo-wrap img:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 20px 60px rgba(0,0,0,0.1),
        0 0 0 2px rgba(216, 162, 62, 0.15);
}

/* ========== TWO-COLUMN LAYOUT ========== */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.two-col--reversed {
    grid-template-columns: 1.5fr 1fr;
}

.two-col--reversed .col-image { order: 2; }
.two-col--reversed .col-text { order: 1; }

.col-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.col-image img {
    width: 100%;
    max-width: 280px;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.06);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.col-image img:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 60px rgba(0,0,0,0.1);
}

.col-image figcaption {
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
    font-family: var(--font-body);
    font-weight: 400;
}

.col-image figcaption strong {
    color: var(--text);
    font-weight: 500;
}

.col-text p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.8;
}

.col-text p:last-child { margin-bottom: 0; }

.section-separator {
    width: 60px;
    height: 2px;
    background: var(--secondary);
    margin: 1.5rem 0 2rem;
    opacity: 0.5;
}

/* ========== RESOURCES GRID ========== */
.resources-section {
    padding-top: calc(var(--nav-height) + 40px);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 2.5rem;
}

.resource-card {
    background: var(--card);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
    border: 1px solid var(--border-light);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.320, 1), box-shadow 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.resource-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.resource-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    font-family: var(--font-heading);
    font-weight: 600;
}

.resource-card p {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.resource-card .btn-download {
    display: inline-block;
    font-family: var(--font-button);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.4s cubic-bezier(0.23, 1, 0.320, 1), transform 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

.resource-card .btn-download:hover {
    background: #7a2e2e;
    transform: translateY(-2px);
}

.resource-card .tag {
    display: inline-block;
    font-family: var(--font-button);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 100px;
    background: rgba(216, 162, 62, 0.1);
    color: var(--accent);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

/* ========== VIDEO GRID ========== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 2rem;
}

/* ========== YOUTUBE FEED ========== */
.yt-section--featured {
    background: rgba(92, 35, 35, 0.03);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid rgba(92, 35, 35, 0.08);
}

.yt-section-label {
    font-family: var(--font-button);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.yt-section-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.yt-section-title--sm {
    font-size: 1.3rem;
}

.yt-section-desc {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    max-width: 560px;
    line-height: 1.6;
}

.yt-section--secondary {
    padding: 8px 0;
}

/* Channel Header */
.yt-channel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 24px;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.yt-channel-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.yt-avatar-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg);
}

.yt-avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yt-channel-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    display: block;
    transition: color 0.3s;
}

.yt-channel-name:hover {
    color: var(--primary);
}

.yt-channel-stats {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 2px;
}

.yt-visit-btn {
    font-family: var(--font-button);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
    white-space: nowrap;
}

.yt-visit-btn:hover {
    background: #7a2e2e;
}

/* Thumbnail video cards */
.video-card-thumb {
    background: var(--card);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.320, 1), box-shadow 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.video-card-thumb:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg);
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.video-card-thumb:hover .thumb-wrapper img {
    transform: scale(1.05);
}

.thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(92, 35, 35, 0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.4s cubic-bezier(0.23, 1, 0.320, 1), transform 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.video-card-thumb:hover .thumb-play {
    background: var(--primary);
    transform: translate(-50%, -50%) scale(1.12);
}

.video-card-thumb .video-title {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--text);
    padding: 10px 14px 6px;
    line-height: 1.4;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card-thumb .video-meta {
    font-family: var(--font-button);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 14px 10px;
}

.yt-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    font-size: 0.9rem;
    font-family: var(--font-subheading);
    font-style: italic;
}

.yt-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-size: 0.85rem;
}

/* Simple video cards (Facebook) */
.video-card {
    background: var(--card);
    border-radius: 10px;
    padding: 16px 18px;
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.06);
}

.video-card .day {
    font-family: var(--font-button);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 500;
    white-space: nowrap;
}

.video-card .play-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.7rem;
    transition: background 0.3s, transform 0.3s;
}

.video-card:hover .play-icon {
    background: var(--secondary);
    transform: scale(1.05);
}

/* Contextual links */
.context-link {
    display: inline-block;
    font-family: var(--font-button);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    margin-top: 1rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
    transition: border-color 0.3s, color 0.3s;
}

.context-link:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.video-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.video-section-header .badge {
    font-family: var(--font-button);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
    font-weight: 500;
}

.badge-youtube { background: rgba(255,0,0,0.08); color: #cc0000; }
.badge-facebook { background: rgba(24,119,242,0.08); color: #1877F2; }

.view-all {
    display: inline-block;
    font-family: var(--font-button);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-top: 1rem;
    transition: opacity 0.3s;
}

.view-all:hover { opacity: 0.7; }

/* ========== FOOTER OVERRIDE ========== */
footer {
    scroll-snap-align: end;
}

/* ========== ANIMATIONS (IntersectionObserver variant) ========== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    animation: none;
}

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

/* Stagger children */
.fade-in-child > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-child.visible > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.fade-in-child.visible > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.fade-in-child.visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.fade-in-child.visible > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.fade-in-child.visible > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

/* ========== DISCIPLE SECTIONS ========== */
[id^="disciple-"] .two-col {
    scroll-margin-top: var(--nav-height);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .two-col {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .two-col--reversed .col-image { order: 1; }
    .two-col--reversed .col-text { order: 2; }
    .col-image img {
        max-width: 200px;
    }
    .section-separator {
        margin: 1.5rem auto 2rem;
    }
    .resources-grid {
        grid-template-columns: 1fr;
    }
    [id^="disciple-"] .two-col {
        margin-bottom: 0;
    }
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    section {
        padding: 60px 24px;
    }
}

@media (max-width: 600px) {
    .col-image img { max-width: 160px; }
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .yt-channel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px 18px;
    }
    .yt-channel-info {
        gap: 12px;
    }
    .yt-avatar-wrapper {
        width: 44px;
        height: 44px;
    }
    .yt-channel-name {
        font-size: 1rem;
    }
    .yt-channel-stats {
        font-size: 0.72rem;
    }
    .yt-visit-btn {
        align-self: stretch;
        text-align: center;
    }
    .yt-section--featured {
        padding: 20px 16px;
        margin-left: -16px;
        margin-right: -16px;
        border-radius: 12px;
    }
    .yt-section-title {
        font-size: 1.3rem;
    }
    .yt-section-title--sm {
        font-size: 1.1rem;
    }
}
