/* Custom styles for video project */

/* Video background styles */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
}

.video-foreground {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.video-foreground iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 aspect ratio */
    transform: translate(-50%, -50%);
    border: none;
}

/* Ensure video covers entire background */
@media (max-aspect-ratio: 16/9) {
    .video-foreground iframe {
        height: 100vh;
        width: 177.78vh; /* 16:9 aspect ratio */
    }
}

@media (min-aspect-ratio: 16/9) {
    .video-foreground iframe {
        width: 100vw;
        height: 56.25vw; /* 16:9 aspect ratio */
    }
}

/* Overlay styles */
#point {
    background: rgba(0, 0, 0, 0.3) url(/wp-content/themes/copokaNovelLite/images/pattern.png);
    display: block;
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

/* Video top content */
#vidtop-content {
    position: relative;
    z-index: 10;
    padding-top: 50px;
}

/* Ensure header content is above video */
header {
    position: relative;
    z-index: 10;
}

/* Body adjustments for fixed background */
body {
    position: relative;
    z-index: 5;
}

.vid-info {
    text-align: center;
    padding: 20px;
}

.vid-info p {
    margin: 5px 0;
}

.vid-info a {
    color: #fff;
    text-decoration: none;
}

.vid-info a:hover {
    text-decoration: underline;
}

/* Intro section styles */
#intro {
    background-image: url("/wp-content/uploads/2011/02/chistface1.jpg");
    height: 32vh;
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 50;
}

/* Mask overlay for intro background */
#intro .mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Height for devices larger than 576px */
@media (min-width: 992px) {
    #intro {
        margin-top: 0;
    }
}

/* Fixed navbar positioning */
.navbar.fixed-top {
    z-index: 1030;
}

/* Secondary navbar styles */
.navbar.navbar-light {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Ensure proper spacing between sections */
.section {
    position: relative;
    z-index: 10;
}

/* Main content container */
main {
    position: relative;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Spacing utilities */
.py-spacer {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.my-spacer {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

/* Text truncation for news cards */
.truncate-text {
    padding: 1rem;
    height: 6rem;
    overflow: hidden;
    position: relative;
}

.truncate-text:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1.6rem;
    background: linear-gradient(180deg, transparent, #fff 50%);
}

/* Responsive iframe container */
.iframe-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
}

/* Footer improvements */
footer {
    position: relative;
}

/* Copyright section */
.copyright-section {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Dropdown submenu styles for multi-level navigation */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    border-radius: 0 6px 6px 6px;
}

.dropdown-submenu:hover .dropdown-menu {
    display: block;
}

.dropdown-submenu > .dropdown-toggle:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #cccccc;
    margin-top: 5px;
    margin-right: -10px;
}

.dropdown-submenu:hover > .dropdown-toggle:after {
    border-left-color: #ffffff;
}

.dropdown-submenu.pull-left {
    float: none;
}

.dropdown-submenu.pull-left > .dropdown-menu {
    left: -100%;
    margin-left: 10px;
    border-radius: 6px 0 6px 6px;
}

/* Ensure dropdown menus appear on hover for desktop */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .dropdown-submenu:hover .dropdown-menu {
        display: block;
    }
}

/* Mobile dropdown adjustments */
@media (max-width: 991.98px) {
    .dropdown-submenu .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: transparent;
        border: 0;
        box-shadow: none;
        padding-left: 1rem;
    }
    
    .dropdown-submenu > .dropdown-toggle:after {
        display: none;
    }
}