/* custom.css */

/* --- Core Responsive Video Embed Styles --- */

/* Parent container for the video embed that defines its aspect ratio */
.video-wrapper-aspect {
    width: 100%; /* Ensure it takes full available width */
    overflow: hidden; /* Hide any overflow */
    background-color: black; /* Good default background for video area */

    /* Modern Aspect Ratio property (preferred) */
    aspect-ratio: 16 / 9; /* Standard widescreen video ratio (width / height) */

    /* Fallback for browsers that don't support aspect-ratio (like older Safari) */
    position: relative; /* Needed for absolute positioning of iframe below */
    height: 0; /* Collapse height so padding-bottom defines it */
    padding-bottom: 56.25%; /* (9 / 16) * 100% = 56.25% for 16:9 ratio */
}

/* Override fallback for browsers that *do* support aspect-ratio */
@supports (aspect-ratio: 1 / 1) {
    .video-wrapper-aspect {
        height: auto; /* Reset height when aspect-ratio is supported */
        padding-bottom: 0; /* Reset padding-bottom when aspect-ratio is supported */
    }
}

/* Styles for the iframe itself within the responsive wrapper */
.video-wrapper-aspect iframe {
    /* Absolute positioning for the fallback method, but also works well with aspect-ratio */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none; /* Remove default iframe border */
    display: block; /* Ensures no extra space below the iframe */
}

/* --- Your Existing Styles (with minor adjustments and notes) --- */

.video-container {
    position: relative;
    /* Removed fixed width/height. Let the content (video-wrapper-aspect) size it. */
    background-color: #000;
    display: none; /* Initially hide all videos */
    width: 100%; /* Ensure it takes full width of its immediate parent */
    height: auto; /* Allow height to be determined by content */
}

.video-container.active {
    display: block;
}

.video-selector-container button {
    padding: 8px 15px;
    margin-right: 5px;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #1036dd;
}

.video-selector-container button.active-video {
    background-color: red;
    font-weight: bold;
}

.video-container:hover {
    border-color: red;
}

/* Ad overlay with proper z-index - RENAMED FROM .ad-overlay */
.content-gate-overlay { /* <--- THIS IS THE FIX! */
    touch-action: manipulation;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex; /* This is now correctly applied! */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

/* Parent container adjustments */
.aspect-video {
    position: relative;
    z-index: 50;
}

/* Video buttons container */
.video-selector-container {
    position: relative;
    z-index: 100;
}

.video-selector.active-video {
    background-color: blue;
}

/* Left ads positioning */
.fixed {
    z-index: 75;
}

.countdown {
    font-size: 2em;
    margin-bottom: 10px;
}

/* Continue button states */
.continue-button {
    position: relative;
    margin: -20px auto 0;
    display: block;
    z-index: 100;
    -webkit-tap-highlight-color: transparent;
}

.continue-button.hidden {
    display: none;
}

/* Text truncation utilities */
.truncate-words {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    line-clamp: 1;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile styles */
@media (max-width: 768px) {
    .video-container {
        margin: 0 0 2rem 0;
        width: 100%;
        border-radius: 0;
    }

    .continue-button {
        position: fixed;
        bottom: 50px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 300px;
        margin: 0 !important;
        padding: 12px 24px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        box-sizing: border-box;
        z-index: 100;
        transition: all 0.3s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-continue-wrapper {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 300px;
        z-index: 1000;
    }

    .continue-wrapper {
        display: none;
    }

    .aspect-video {
        overflow: visible;
        min-height: auto;
    }

    .news-section {
        padding: 1rem 0;
    }

    .grid {
        gap: 0.5rem;
    }

    video, img {
        object-fit: cover;
    }
}

/* Desktop hover effects */
@media (min-width: 769px) {
    .mobile-continue-wrapper {
        display: none;
    }

    .video-container:hover video,
    .video-container:hover img {
        transform: scale(1.03);
        transition: transform 0.3s ease;
    }
}

/* Cookie consent */
#cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f0f0f0;
    padding: 20px;
    text-align: center;
}

#cookie-consent.hidden {
    display: none;
}