/* =========================================
   1. GOOGLE FONTS & VARIABLES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Brand Colors */
    --brand-green: #25D366;
    --brand-green-hover: #1EBE5D;
    --bg-dark: #0B1120;
    
    /* Text Colors */
    --text-main: #FFFFFF;
    --text-muted: #94A3B8;
    
    /* UI Elements (Cards, Borders) */
    --card-bg: #1E293B;
    --card-border: rgba(255, 255, 255, 0.1);
    --accent-glow: rgba(37, 211, 102, 0.15);
}

/* =========================================
   2. GLOBAL RESET & BASE STYLES
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    margin-top: 0;
}

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: url('https://images.unsplash.com/photo-1511497584788-876760111969?q=80&w=1632&auto=format&fit=crop') center/cover no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11, 17, 32, 0.95) 0%, rgba(11, 17, 32, 0.7) 100%);
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 80px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
}

.hero-content {
    flex: 1.2;
    max-width: 650px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 211, 102, 0.1);
    color: var(--brand-green);
    border: 1px solid rgba(37, 211, 102, 0.2);
    padding: 8px 16px;
    border-radius: 100px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: var(--brand-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--brand-green);
    animation: blink 2s infinite;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 600;
    color: var(--brand-green);
    margin-bottom: 24px;
    line-height: 1.4;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.benefits-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 48px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    transition: transform 0.2s ease, background 0.2s ease;
}

.benefit-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.06);
}

.benefit-item strong {
    font-family: 'Poppins', sans-serif;
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.benefit-item p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.hero-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--brand-green);
    color: #000;
    text-decoration: none;
    padding: 18px 48px;
    border-radius: 100px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.cta-btn:hover {
    background-color: var(--brand-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
}

.hero-visual {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-logo {
    width: 100%;
    max-width: 450px;
    height: auto;
    position: relative;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6));
}

.glow-effect {
    position: absolute;
    width: 350px;
    height: 350px;
    background: var(--brand-green);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}

/* =========================================
   4. TRIBE STORIES SECTION (PLAYLIST)
   ========================================= */
.tribe-stories-section {
    padding: 20px 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -1px;
}

/* Slick gradient effect for the "Tribe Stories" text */
.section-title span {
    background: linear-gradient(135deg, #25D366 0%, #0DAA48 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stories-container {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

/* --- Main Video Player --- */
.main-video-wrapper {
    flex: 1.6; /* Takes up slightly more space than the playlist */
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.video-player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Perfect 16:9 Aspect Ratio */
    background: #000;
}

.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.main-video-info {
    padding: 30px;
}

.now-watching {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-green);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    background: rgba(37, 211, 102, 0.1);
    padding: 6px 12px;
    border-radius: 50px;
}

#main-video-title {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

/* --- Playlist Sidebar --- */
.playlist-sidebar {
    flex: 1;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 340px;
    max-height: 600px; /* Aligns roughly with main video height */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.playlist-header {
    padding: 24px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    border-radius: 20px 20px 0 0;
}

.playlist-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.playlist-meta {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.playlist-items-container {
    padding: 16px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Custom Sleek Scrollbar */
.playlist-items-container::-webkit-scrollbar {
    width: 6px;
}
.playlist-items-container::-webkit-scrollbar-track {
    background: transparent;
}
.playlist-items-container::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}
.playlist-items-container::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.playlist-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.playlist-item.active {
    background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
    border: 1px solid rgba(37, 211, 102, 0.2);
    border-left: 4px solid var(--brand-green);
}

.thumbnail-wrapper {
    position: relative;
    width: 120px;
    height: 68px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.playlist-item:hover .thumbnail-wrapper img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.playlist-item:hover .play-overlay,
.playlist-item.active .play-overlay {
    opacity: 1;
}

.thumbnail-wrapper .duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden; /* Prevents text from breaking layout */
}

.item-info h5 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-footer {
    padding: 20px;
    border-top: 1px solid var(--card-border);
    text-align: center;
    background: rgba(0,0,0,0.1);
    border-radius: 0 0 20px 20px;
}

.playlist-footer a {
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.playlist-footer a:hover {
    color: var(--brand-green);
}

/* =========================================
   5. KEYFRAME ANIMATIONS
   ========================================= */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.15; }
    50% { transform: scale(1.1); opacity: 0.25; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* =========================================
   6. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 1024px) {
    /* Hero Adjustments */
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    .hero-content {
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    .benefit-item {
        text-align: left;
    }
    .hero-action {
        align-items: center;
    }
    .hero-visual {
        width: 100%;
        margin-top: 40px;
    }

    /* Playlist Adjustments */
    .stories-container {
        flex-direction: column;
    }
    .main-video-wrapper,
    .playlist-sidebar {
        width: 100%;
        flex: none; /* Stops flex from overriding width */
    }
    .playlist-sidebar {
        max-height: 500px; /* Sets a strict height so mobile users can scroll inside it */
    }
}

@media (max-width: 768px) {
    /* Tighten padding on smaller phones */
    .tribe-stories-section {
        padding: 60px 16px;
    }
    .hero-container {
        padding-left: 16px;
        padding-right: 16px;
    }
    .main-video-info {
        padding: 20px 16px;
    }
    .playlist-item {
        flex-direction: column;
        gap: 8px;
    }
    .thumbnail-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
}

/* =========================================
   7. FITNESS CHALLENGES SECTION
   ========================================= */
.challenges-section {
    padding: 100px 24px;
    background-color: var(--bg-dark); /* Blends perfectly with the rest of the page */
    position: relative;
    overflow: hidden;
}

/* Subtle background glow to make the section pop */
.challenges-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 211, 102, 0.05) 0%, rgba(11, 17, 32, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

.challenges-container {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.challenges-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.challenges-header .badge {
    margin-bottom: 20px;
}

.section-description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-top: 16px;
}

/* --- Challenges Grid --- */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.challenge-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 32px 24px;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Hover effects for the cards */
.challenge-card:hover {
    transform: translateY(-8px);
    border-color: rgba(37, 211, 102, 0.4);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37,211,102,0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.challenge-card:hover .card-glow {
    opacity: 1;
}

/* Internal Card Elements (Need to sit above the glow) */
.challenge-icon, .challenge-tags, .challenge-title, .challenge-text, .challenge-footer {
    position: relative;
    z-index: 1;
}

.challenge-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1;
}

.challenge-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.tag {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    padding: 4px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-duration {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.tag-type {
    background: rgba(37, 211, 102, 0.15);
    color: var(--brand-green);
}

.challenge-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.challenge-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex-grow: 1; /* Pushes footer to the bottom */
    margin-bottom: 24px;
}

.challenge-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 16px;
}

.participants {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748B;
}

/* Special styling for the "Active" challenge card */
.active-challenge {
    border-color: rgba(37, 211, 102, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.active-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(37, 211, 102, 0.15);
    color: var(--brand-green);
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(37, 211, 102, 0.3);
    z-index: 2;
}

/* Reuse the blink animation from the Hero section for the live dot */

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .challenges-section {
        padding: 60px 16px;
    }
    .challenges-header {
        margin-bottom: 40px;
    }
    .challenges-grid {
        gap: 20px;
    }
}

/* =========================================
   8. FAMILY & VOLUNTARY SECTION
   ========================================= */
.family-section {
    padding: 60px 24px;
    background-color: var(--bg-dark);
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Subtle separator from previous section */
}

.family-container {
    max-width: 1000px; /* Slightly narrower for easier reading */
    margin: 0 auto;
}

.family-header {
    text-align: center;
    margin-bottom: 60px;
}

.family-header .badge {
    background: rgba(255, 71, 87, 0.1); /* Soft red/heart vibe */
    color: #ff4757;
    border-color: rgba(255, 71, 87, 0.2);
}

.family-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.family-feature-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    border-top: 4px solid var(--brand-green); /* Green accent line at the top */
    transition: transform 0.3s ease;
    text-align: center;
}

.family-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.feature-icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
}

.feature-icon {
    font-size: 2rem;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

.feature-text {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.family-quote {
    text-align: center;
    padding: 30px;
    background: linear-gradient(90deg, transparent, rgba(37, 211, 102, 0.05), transparent);
    border-radius: 12px;
}

.family-quote em {
    display: block;
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 10px;
    font-weight: 500;
}

.family-quote span {
    font-size: 0.9rem;
    color: var(--brand-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .family-section {
        padding: 60px 16px;
    }
    .family-feature-card {
        padding: 30px 20px;
    }
}

/* =========================================
   9. DONATE / SUPPORT SECTION (SIMPLE FULL WIDTH)
   ========================================= */
.donate-section {
    background-color: var(--card-bg); /* Uses your existing dark slate variable */
    padding: 80px 24px;
    text-align: center;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    width: 100%;
}

.donate-content {
    max-width: 800px;
    margin: 0 auto;
}

.donate-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 20px 0;
}

.donate-title span {
    color: var(--brand-green);
}

.donate-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 40px 0;
}

.donate-btn {
    display: inline-block;
    background-color: var(--brand-green);
    color: #000;
    text-decoration: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    transition: background-color 0.2s ease;
}

.donate-btn:hover {
    background-color: var(--brand-green-hover);
}