/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;600;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #fa6400;
    --primary-hover: #fb8332;
    --bg-color: #050505;
    --text-color: #ffffff;
    --glass-bg: rgba(25, 25, 25, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shine: rgba(255, 255, 255, 0.1);
    --neon-glow: 0 0 20px rgba(250, 100, 0, 0.6), 0 0 60px rgba(250, 100, 0, 0.3);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: var(--bg-color);
    background-image: url('img/bg_web2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* content body aligns to top, index centers. We can keep justify-content center for index via a class maybe, 
       but for subpages we want top alignment. Let's make body flex-start by default and center only for landing? 
       Or just let content flow naturally. */
    overflow-x: hidden;
    position: relative;
    animation: breathing-bg 20s ease-in-out infinite alternate;
}

p {
    font-family: 'Roboto', sans-serif;
    text-transform: none;
    line-height: 1.6;
    letter-spacing: 0.2px;
}

@keyframes breathing-bg {
    0% {
        background-size: 100% auto;
    }

    100% {
        background-size: 110% auto;
    }
}

/* Dark overlay */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Dynamic Orange Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle orange gradient from center or bottom-right */
    background: radial-gradient(circle at 60% 40%, rgba(250, 100, 0, 0.15), transparent 60%);
    z-index: -1;
    pointer-events: none;
    animation: orange-pulse 10s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

@keyframes orange-pulse {
    0% {
        opacity: 0.4;
        transform: scale(1);
        filter: hue-rotate(0deg);
    }

    100% {
        opacity: 0.7;
        transform: scale(1.1);
        filter: hue-rotate(-10deg);
    }
}

.container {
    width: 100%;
    max-width: 1400px;
    padding: 4rem 1.5rem 2rem 1.5rem;
    /* Increased top padding for subpages */
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.landing-page .container {
    height: 100vh;
    padding: 1.5rem;
    justify-content: center;
}

.layout-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    width: 100%;
    flex: 1;
    min-height: 0;
    /* Allow shrinking */
}

/* Header / Logo (Landing) */
header {
    animation: fadeInDown 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.logo {
    max-width: 240px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.8));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05) rotateZ(2deg);
    filter: drop-shadow(0 0 25px rgba(250, 100, 0, 0.4));
}

/* Language Cards Grid (Landing) */
.language-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 450px;
    height: 100%;
    justify-content: space-between;
    perspective: 1000px;
}

.lang-card {
    background: rgba(40, 40, 40, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    text-align: left;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    flex: 1;
    animation: fadeInUp 0.8s ease-out backwards;
    transform-style: preserve-3d;
}

.lang-card:nth-child(1) {
    animation-delay: 0.1s;
}

.lang-card:nth-child(2) {
    animation-delay: 0.2s;
}

.lang-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Dynamic Shine Effect */
.lang-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 255, 255, 0.08),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 2;
}

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

.lang-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--neon-glow);
}

.flag-icon {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
    transform: translateZ(20px);
}

.lang-card:hover .flag-icon {
    transform: scale(1.1) translateZ(30px);
}

.card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
    transform: translateZ(15px);
}

.cta-text {
    /* font-family: 'Oswald', sans-serif; -- Inherited */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 1.5px;
    color: var(--text-color);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.arrow-icon {
    width: 24px;
    height: 24px;
    opacity: 0.5;
    transform: translateX(-10px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lang-card:hover .cta-text {
    color: var(--primary-color);
    letter-spacing: 2px;
}

.lang-card:hover .arrow-icon {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Content Page Styles --- */

/* Sticky Navbar */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    animation: fadeInDown 0.8s ease-out;
}

.navbar .logo-small {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(250, 100, 0, 0.5));
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(250, 100, 0, 0.6);
}

/* Media Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    width: 100%;
    padding: 2rem 0;
}

/* Media Card */
.media-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
    animation: fadeInUp 0.8s ease-out backwards;
}

.media-card:hover {
    /* transform: translateY(-8px);  <-- Removed as per user request */
    box-shadow: var(--neon-glow);
    border-color: var(--primary-color);
}

.media-img-container {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

.media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.media-card:hover .media-img {
    transform: scale(1.1);
}

.media-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex-grow: 1;
}

.media-title {
    /* font-family: 'Oswald', sans-serif; -- Inherited */
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.media-desc {
    font-family: 'Roboto', sans-serif;
    text-transform: none;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    flex-grow: 1;
}

.btn-primary {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #c85000);
    color: white;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    text-align: center;
    transition: filter 0.3s ease, transform 0.2s ease;
    margin-top: 1rem;
    align-self: flex-start;
}

.btn-primary:hover {
    filter: brightness(1.2);
    /* transform: translateY(-2px); <-- Removed */
    box-shadow: 0 5px 15px rgba(250, 100, 0, 0.4);
}

/* Iframe adjustments */
.video-container {
    width: 100%;
    aspect-ratio: 16/9;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.main-promo {
    flex: 1;
    max-width: 900px;
    aspect-ratio: 16/9;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(250, 100, 0, 0.2);
    border: 1px solid var(--glass-border);
    animation: fadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
    animation-delay: 0.2s;
}

/* Stagger animations for grid items */
.media-card:nth-child(1) {
    animation-delay: 0.1s;
}

.media-card:nth-child(2) {
    animation-delay: 0.2s;
}

.media-card:nth-child(3) {
    animation-delay: 0.3s;
}

.media-card:nth-child(4) {
    animation-delay: 0.4s;
}

.media-card:nth-child(5) {
    animation-delay: 0.5s;
}

.media-card:nth-child(6) {
    animation-delay: 0.6s;
}

@media (max-width: 768px) {
    .container {
        gap: 2rem;
        padding: 1rem;
    }

    .language-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .media-grid {
        grid-template-columns: 1fr;
    }

    .logo {
        max-width: 180px;
    }

    .navbar {
        padding: 1rem;
    }

    /* Disable breathing bg on mobile for performance */
    body {
        animation: none;
        background-size: cover;
    }

    .lang-card {
        padding: 1rem;
        gap: 1.5rem;
    }

    .flag-icon {
        width: 50px;
    }

    .cta-text {
        font-size: 0.9rem;
    }
}