:root {
    --primary-blue: #002B5C;
    /* Deep Royal Blue */
    --accent-blue: #0056b3;
    /* Lighter blue for gradients/hovers */
    --white: #ffffff;
    --text-color: #ffffff;
    --card-bg-gray: #d0d0d0;
    /* Placeholder gray for cards if image fails */
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--primary-blue);
    color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 2rem 0;
    column-gap: 11rem;
}

header .logo {
    grid-column: 2;
    justify-self: center;
}

header .header-right {
    grid-column: 3;
    justify-self: start;
}

header .social-icons {
    grid-column: 1;
    justify-self: end;
}

.logo {
    display: flex;
    flex-direction: column;
    font-weight: 800;
    line-height: 1;
}

.logo-img {
    width: 100px;
    height: 70px;
}

.logo .gc {
    font-size: 3rem;
    font-style: italic;
    letter-spacing: -2px;
}

.logo .audiovisual {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.flags {
    display: flex;
    gap: 0.5rem;
}

.flags img {
    width: 30px;
    height: auto;
    border-radius: 2px;
    cursor: pointer;
    transition: transform 0.2s;
}

.flags img:hover {
    transform: scale(1.1);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: var(--white);
    font-size: 1.5rem;
    transition: color 0.2s;
}

.social-icons a:hover {
    color: #ccc;
}

.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    width: 100%;
    margin-bottom: 3rem;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.greeting {
    margin-bottom: 3rem;
    text-align: center;
}

.greeting h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.greeting p {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.5;
}

/* Cards */
.cards {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 800px;
    align-items: center;
}

.card {
    position: relative;
    background-color: transparent;
    /* Transparent as image covers it */
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    /* Default text white for contrast on images */
    height: auto;
    /* Allow height to be determined by image */
    display: flex;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}


.card-banner {
    position: relative;
    /* Changed from absolute to flow naturally */
    width: 100%;
    height: auto;
    /* Maintain aspect ratio */
    display: block;
    z-index: 0;
    transition: transform 0.3s ease;
}

.card:hover .card-banner {
    transform: scale(1.05);
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: auto;
    font-style: italic;
}

/* Portfolio Page Redesign - Carousel Layout */
/* Kept the carousel layout but removed black theme overrides to match index.html */

/* Portfolio Title */
body.portfolio-page h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--white);
}

/* Carousel Container */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    /* Flex row layout: Button | Track | Button */
    align-items: center;
    gap: 15px;
    /* Space between button and track */
}

/* Carousel Track (Scrollable Area) */
.carousel-track {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
    flex: 1;
    /* Take up remaining space */
    width: 0;
    /* Important for flex child to scroll correctly */
    min-width: 0;
    /* CSS Grid/Flex scrolling fix */
    -ms-overflow-style: none;
    scrollbar-width: none;
    border-radius: 12px;
}

/* Video Card Styling */
.video-item {
    flex: 0 0 auto;
    /* Fit 5 items: (100% - 4 gaps of 0.5rem) / 5 */
    width: calc((100% - 2rem) / 5);
    min-width: 200px;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    background-color: #1a1a1a;
    transition: transform 0.3s ease;
    /* Force rounding with clip-path (robust against transforms) */
    -webkit-clip-path: inset(0 round 12px);
    clip-path: inset(0 round 12px);
    /* Hardware acceleration to fix overflow clipping during animation */
    transform: translateZ(0);
    will-change: transform;
}

.video-item:hover {
    transform: scale(1.02);
    z-index: 5;
}

.video-item iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: inherit;
    /* Ensure iframe matches parent radius */
}

/* Carousel Buttons */
.carousel-btn {
    position: static;
    /* Remove absolute positioning */
    transform: none;
    background: rgba(0, 0, 0, 0.3);
    /* Mobile style: semi-transparent */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: #fca311;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 20;
    flex-shrink: 0;
    /* Prevent shrinking */
    box-shadow: none;
}

.carousel-btn:hover {
    color: #fff;
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.5);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    header {
        grid-template-columns: 1fr 1fr;
        column-gap: 1rem;
        row-gap: 1rem;
        padding: 1rem 0;
    }

    header .logo {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
    }

    header .social-icons {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    header .header-right {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }

    .carousel-track {
        scroll-snap-type: x mandatory;
        gap: 0;
        /* Remove gap so next video doesn't peek */
        padding: 0;
        /* maximize space */
    }

    .video-item {
        flex: 0 0 100%;
        /* Force full width of track */
        width: 100%;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        margin: 0;
        border-radius: 12px;
    }

    .carousel-btn {
        display: flex;
        /* Ensure buttons are visible */
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        background: rgba(0, 0, 0, 0.3);
        flex-shrink: 0;
    }

    .carousel-container {
        gap: 5px;
    }
}