/* Design System & Global Styles */
:root {
    --bg-dark: #0a0a0c;
    --bg-card: rgba(255, 255, 255, 0.05);
    --accent: #ffb400; /* Amber/Gold for cinematic feel */
    --accent-hover: #ffca4a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Grain Overlay */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
}


/* Background Decoration */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 180, 0, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Layout */
.container {
    max-width: 1600px; /* Increased from 1200px for bigger video cards */
    margin: 0 auto;
    padding: 0 4rem;
}

/* Header & Hero */
header {
    height: 25vh; /* Reduced to reduce gap above logo */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Align content towards the bottom to minimize gap to categories */
    align-items: center;
    text-align: center;
    background: var(--bg-dark);
    margin: 0;
    padding-bottom: 2rem; /* Give some space but much less than before */
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
}

/* Categories */
.categories-section {
    padding: 0.5rem 0 2rem; /* Reduced top padding from 1rem */
    background: var(--bg-dark);
    margin-top: -2px; /* Overlap slightly to prevent rendering lines */
}

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

.category {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1rem;
    opacity: 1 !important; /* Force visibility */
    visibility: visible !important;
    display: inline-block;
}

.category:hover, .category.active-category {
    background: var(--accent);
    color: #000000 !important; /* Text is now black for better contrast on active state */
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 180, 0, 0.2);
}

/* Video Grid */
.videos {
    display: none;
    grid-template-columns: repeat(3, 1fr); /* Forced 3 columns per row */
    gap: 2rem;
    animation: fadeInUp 0.8s ease forwards;
}

.videos.active {
    display: grid;
}

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

.video-card {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg-card);
    border-radius: 1.5rem;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.video-card:hover {
    transform: scale(1.02);
    border-color: var(--accent);
}

.video-card iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none; /* Disable interaction on grid to allow card click */
}

.video-card::after {
    content: '\f04b'; /* FontAwesome Play icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 180, 0, 0.9);
    color: var(--bg-dark);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transition: var(--transition);
}

.video-card:hover::after {
    opacity: 1;
}

/* Testimonials */
.testimonials-section {
    padding: 4rem 0;
    overflow: hidden;
    position: relative;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

.testimonials-section::before,
.testimonials-section::after {
    content: '';
    position: absolute;
    top: 0;
    width: 15%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.testimonials-section::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-dark), transparent);
}

.testimonials-section::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-dark), transparent);
}

.testimonials-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.testimonials-track {
    display: flex;
    gap: 2rem;
    animation: testimonialScroll 30s linear infinite !important;
    width: max-content;
    will-change: transform;
}

.testimonial-card {
    width: 400px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-img-container {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(255, 180, 0, 0.3);
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(3); /* Zoom into the face */
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.testimonial-info h4 {
    color: var(--text-primary);
}

.testimonial-info span {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.testimonial-card p {
    font-style: italic;
    color: var(--text-secondary);
}

@keyframes testimonialScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Popup / Modal */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.popup-overlay.active {
    display: flex;
}

.popup-content {
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    position: relative;
    animation: zoomIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.popup-content iframe {
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    box-shadow: 0 0 50px rgba(255, 180, 0, 0.2);
}

.popup-close {
    position: absolute;
    top: -3rem;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.popup-close:hover {
    color: var(--accent);
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 { font-size: 3rem; }
    .container { padding: 0 1.5rem; }
    .testimonial-card { width: 300px; }
    @keyframes scroll {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-300px * 7 - 2rem * 7)); }
    }
}
