/***
====================================================================
    Legend Cinemas - Enhanced Responsive & UI Fixes
    - No horizontal scroll in header
    - Equal height boxes
    - Better overall appearance
====================================================================
***/

/* =============== GLOBAL FIXES =============== */
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    scrollbar-width: none; /* Firefox */
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
}

.page-wrapper {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
}

.auto-container {
    max-width: 100%;
    /* overflow-x: hidden; */
}

/* =============== HEADER TOP - NO SCROLL FIX =============== */
.main-header {
    /* overflow-x: hidden !important;
    overflow-y: visible !important; */
    max-width: 100vw !important;
    width: 100% !important;
    position: relative;
    z-index: 1000 !important;
}

.main-header .header-top {
    overflow: hidden !important;
    white-space: normal;
    max-width: 100vw !important;
    width: 100% !important;
}

.main-header .header-top .auto-container {
    overflow: visible !important;
    max-width: 100% !important;
    position: relative;
}

.main-header .header-lower {
    overflow: visible !important;
    position: relative;
    z-index: 1001 !important;
}

.main-header .header-lower .auto-container {
    overflow: visible !important;
}

.main-header .nav-outer {
    overflow: visible !important;
}

/* FIX: Remove the skewed background that extends beyond viewport */
.main-header .header-top .social-box:before {
    display: none !important;
}

/* Alternative: Red background for social box */
.main-header .header-top .pull-right {
    background-color: var(--main-color);
    padding: 0 30px;
    margin-right: -15px;
    position: relative;
}

.main-header .header-top .pull-right:before {
    content: '';
    position: absolute;
    left: -30px;
    top: 0;
    bottom: 0;
    width: 30px;
    background-color: var(--main-color);
    transform: skewX(-30deg);
    transform-origin: bottom left;
}

.main-header .header-top .info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.main-header .header-top .info li {
    white-space: nowrap;
}

.main-header .header-top .social-box {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    position: relative;
}

/* =============== DROPDOWN MENU FIX =============== */
.main-menu .navigation > li.dropdown {
    position: relative;
    z-index: 10000 !important;
}

.main-menu .navigation > li.dropdown > ul {
    position: absolute !important;
    left: 0 !important;
    top: 100% !important;
    width: 220px !important;
    padding: 10px 0 !important;
    background: #ffffff !important;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15) !important;
    border-radius: 0 0 5px 5px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
    transition: all 0.3s ease !important;
    z-index: 99999 !important;
    min-width: 200px !important;
    -webkit-transform: translateY(10px) !important;
    -ms-transform: translateY(10px) !important;
    -o-transform: translateY(10px) !important;
    margin-top: 5px !important;
}

.main-menu .navigation > li.dropdown:hover > ul {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    -webkit-transform: translateY(0) !important;
    -ms-transform: translateY(0) !important;
    -o-transform: translateY(0) !important;
}

.main-menu .navigation > li.dropdown > ul > li {
    position: relative !important;
    width: 100% !important;
    display: block !important;
    list-style: none !important;
    text-align: left !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.main-menu .navigation > li.dropdown > ul > li:last-child {
    border-bottom: none !important;
}

.main-menu .navigation > li.dropdown > ul > li > a {
    display: block !important;
    padding: 12px 18px !important;
    color: #333 !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
}

.main-menu .navigation > li.dropdown > ul > li > a:hover {
    background: #f5f5f5 !important;
    color: var(--main-color) !important;
    padding-left: 25px !important;
}

/* =============== SERVICE BLOCKS - EQUAL HEIGHT =============== */
.services-section .upper-section .row {
    display: flex;
    flex-wrap: wrap;
}

.services-section .upper-section .service-block {
    display: flex;
    flex-direction: column;
}

.services-section .upper-section .service-block .inner-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    padding: 30px 25px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.services-section .upper-section .service-block .inner-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.services-section .upper-section .service-block .inner-box h4 {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.services-section .upper-section .service-block .inner-box .text {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 15px 10px;
    margin-bottom: 15px;
}

.services-section .upper-section .service-block .inner-box .text p {
    margin: 0;
    line-height: 1.6;
}

.services-section .upper-section .service-block .inner-box .services {
    margin-top: auto;
}

/* =============== FACILITY BLOCKS - EQUAL HEIGHT =============== */
.facility-section .blocks-column .row {
    display: flex;
    flex-wrap: wrap;
}

.facility-section .facility-block {
    display: flex;
}

.facility-section .facility-block .inner-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    padding: 35px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.facility-section .facility-block .inner-box:hover {
    transform: translateY(-5px);
}

.facility-section .facility-block .inner-box h5 {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.facility-section .facility-block .inner-box .text {
    flex: 1;
    display: flex;
    align-items: flex-start;
}

.facility-section .facility-block .inner-box .text p {
    margin: 0;
    line-height: 1.6;
}

/* =============== TESTIMONIAL BLOCKS - EQUAL HEIGHT =============== */
.testimonial-carousel.owl-carousel {
    display: flex;
}

.testimonial-carousel .owl-stage {
    display: flex !important;
}

.testimonial-carousel .owl-item {
    display: flex !important;
    height: auto !important;
}

.testimonial-carousel .testimonial-block {
    display: flex;
    width: 100%;
    height: 100%;
}

.testimonial-block .inner-box {
    display: flex;
    flex-direction: column;
    min-height: 380px;
    height: 100%;
    width: 100%;
}

.testimonial-block .upper-box {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 25px;
    min-height: 200px;
}

.testimonial-block .upper-box .text {
    width: 100%;
}

.testimonial-block .upper-box .text p {
    margin: 0;
    line-height: 1.7;
    font-size: 15px;
}

.testimonial-block .lower-box {
    flex-shrink: 0;
}

/* =============== FOOTER - LEFT ALIGNED =============== */
.main-footer {
    text-align: left;
}

.main-footer .widgets-section {
    text-align: left;
}

.main-footer .logo {
    text-align: left;
    display: block;
    margin-bottom: 30px;
}

.main-footer .logo a {
    display: inline-block;
}

.main-footer .contact-info-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 40px;
    text-align: left;
    padding: 0;
}

.main-footer .contact-info-list li {
    flex: 0 0 auto;
    min-width: 200px;
    max-width: 320px;
    text-align: left;
    line-height: 1.8;
}

.main-footer .contact-info-list li a {
    display: inline-block;
}

.main-footer .footer-widget {
    text-align: left;
    margin-top: 25px;
}

.main-footer .footer-widget p {
    margin-bottom: 10px;
}

.main-footer .social-box {
    justify-content: flex-start;
    text-align: left;
    margin-top: 20px;
}

.main-footer .social-box li:first-child {
    margin-left: 0;
}

/* =============== RESPONSIVE BREAKPOINTS =============== */

/* Extra Large Screens */
@media only screen and (min-width: 1400px) {
    .services-section .upper-section .service-block .inner-box {
        min-height: 340px;
    }
}

/* Large Screens */
@media only screen and (max-width: 1200px) {
    .main-header .header-top .info li {
        font-size: 13px;
        margin-right: 15px;
    }
    
    .main-header .header-top .info li a {
        padding-left: 20px;
    }
    
    .main-header .header-top .social-box:before {
        left: -30px !important;
    }
    
    .services-section .upper-section .service-block .inner-box {
        min-height: 300px;
        padding: 25px 20px;
    }
    
    .facility-section .facility-block .inner-box {
        min-height: 300px;
    }
}

/* Medium Screens - Tablets */
@media only screen and (max-width: 1023px) {
    .main-header .header-top .pull-left,
    .main-header .header-top .pull-right {
        float: none;
        width: 100%;
        max-width: 100%;
        text-align: center;
        overflow: hidden;
        margin-right: 0;
        padding: 0;
        background: transparent;
    }
    
    .main-header .header-top .pull-right:before {
        display: none;
    }
    
    .main-header .header-top .info {
        justify-content: center;
        padding: 10px 0 5px;
    }
    
    .main-header .header-top .social-box {
        justify-content: center;
        padding: 5px 0 10px;
        background-color: var(--main-color);
    }
    
    .main-header .header-top .social-box::before {
        display: none !important;
    }
    
    .services-section .upper-section .service-block {
        margin-bottom: 30px;
    }
    
    .services-section .upper-section .service-block .inner-box {
        min-height: 280px;
    }
    
    .facility-section .facility-block .inner-box {
        min-height: 280px;
    }
}

/* Small Tablets & Large Phones */
@media only screen and (max-width: 767px) {
    /* Header fixes for mobile */
    .main-header,
    .main-header .header-top,
    .main-header .header-lower {
        overflow: hidden !important;
        max-width: 100vw !important;
    }
    
    .main-header .header-top .pull-right {
        background: var(--main-color);
        margin-right: 0;
        padding: 0;
    }
    
    .main-header .header-top .pull-right:before {
        display: none;
    }
    
    .main-header .header-top .social-box:before {
        display: none !important;
    }
    
    .main-header .header-top .info {
        flex-direction: column;
        gap: 5px;
        padding: 8px 0;
    }
    
    .main-header .header-top .info li {
        margin-right: 0;
        font-size: 12px;
    }
    
    .main-header .header-top .info li a {
        padding-left: 22px;
    }
    
    .main-header .header-top .social-box li {
        margin-left: 15px;
    }
    
    .services-section .upper-section .service-block .inner-box {
        min-height: auto;
        padding: 25px 20px;
    }
    
    .facility-section .facility-block .inner-box {
        min-height: auto;
        padding: 30px 15px;
    }
    
    /* Full width for service blocks on mobile */
    .services-section .upper-section .service-block {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Footer responsive */
    .main-footer .contact-info-list {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-footer .contact-info-list li {
        text-align: left;
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .main-footer .footer-widget {
        text-align: left;
    }
    
    .main-footer .social-box {
        justify-content: flex-start;
    }
    
    .main-footer .logo {
        text-align: left;
    }
    
    /* Sec title responsive */
    .sec-title .pull-left,
    .sec-title .pull-right {
        float: none;
        width: 100%;
        text-align: center;
    }
    
    .sec-title .pull-right .text {
        text-align: center;
    }
    
    .sec-title .pull-right .text br {
        display: none;
    }
    
    /* Internet section responsive */
    .internet-section .content-column {
        padding: 30px 20px;
    }
    
    .internet-section .content-column h2 {
        font-size: 28px;
    }
}

/* Small Phones */
@media only screen and (max-width: 480px) {
    .main-header .header-top .info li {
        font-size: 11px;
    }
    
    .main-header .header-top .info li a {
        padding-left: 20px;
    }
    
    .main-header .header-top .social-box li {
        margin-left: 12px;
    }
    
    .main-header .header-top .social-box li a {
        font-size: 14px;
    }
    
    .services-section .upper-section .service-block .inner-box {
        padding: 20px 15px;
    }
    
    .services-section .upper-section .service-block .inner-box h4 {
        font-size: 18px;
        min-height: auto;
    }
    
    .services-section .upper-section .service-block .inner-box .text {
        font-size: 14px;
        padding: 10px 5px;
    }
    
    .facility-section .facility-block .inner-box {
        padding: 25px 15px;
    }
    
    .facility-section .facility-block .inner-box h5 {
        font-size: 16px;
        min-height: auto;
    }
    
    .facility-section .facility-block .inner-box .text {
        font-size: 13px;
    }
    
    /* Video responsive */
    #myVideo {
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }
    
    /* Button improvements */
    .theme-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Content column text */
    .content-column .text p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .content-column .bold-text p {
        font-size: 15px;
    }
}

/* Extra Small Phones */
@media only screen and (max-width: 360px) {
    .main-header .header-top .info li {
        font-size: 10px;
    }
    
    .main-header .header-top .info li .icon {
        font-size: 12px;
    }
    
    .main-header .header-top .info li a {
        padding-left: 18px;
    }
    
    .main-header .header-top .social-box li {
        margin-left: 10px;
    }
    
    .main-header .header-top .social-box li a {
        font-size: 13px;
    }
    
    .services-section .upper-section .service-block .inner-box h4 {
        font-size: 16px;
    }
    
    .services-section .upper-section .service-block .inner-box .text {
        font-size: 13px;
    }
    
    .facility-section .facility-block .inner-box h5 {
        font-size: 15px;
    }
    
    .facility-section .facility-block .inner-box .icon-box {
        width: 60px;
        height: 60px;
        line-height: 58px;
        font-size: 28px;
    }
}

/* =============== VISUAL IMPROVEMENTS =============== */

/* Smooth transitions for all interactive elements */
a, button, .btn, .theme-btn {
    transition: all 0.3s ease;
}

/* Better link hover states */
a:hover {
    text-decoration: none;
}

/* Card hover effects */
.service-block .inner-box,
.facility-block .inner-box,
.testimonial-block .inner-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Improve image loading */
img {
    max-width: 100%;
    height: auto;
}

/* Better section spacing */
section {
    position: relative;
}

/* Navigation improvements */
.main-menu .navigation > li > a {
    transition: color 0.3s ease;
}

/* Mobile menu improvements */
.mobile-menu {
    max-width: 100vw;
}

.mobile-menu .menu-box {
    max-width: 90vw;
    overflow-x: hidden;
}

/* =============== INTERNET SECTION FIXES =============== */
.internet-section {
    overflow: hidden;
}

.internet-section .content-column {
    position: relative;
    z-index: 2;
}

/* =============== ABOUT SECTION IMPROVEMENTS =============== */
.services-section .lower-section .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.services-section .image-column .inner-column {
    position: relative;
}

.services-section .image-column .image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* =============== VIDEO SECTION =============== */
.main-slider {
    position: relative;
    overflow: hidden;
}

.main-slider video {
    width: 100%;
    height: auto;
    display: block;
}

/* =============== ADDITIONAL OVERFLOW FIXES =============== */
/* Ensure no element extends beyond viewport */
section,
.row,
.container,
.auto-container,
[class*="col-"] {
    max-width: 100%;
}

/* Fix for any absolute positioned elements that might overflow */
.pattern-layer,
.pattern-layer-one,
.pattern-layer-two,
.color-layer,
.image-layer {
    max-width: 100vw;
    overflow: hidden;
}

/* Page title section */
.page-title {
    overflow: hidden;
}

/* Sticky header fix */
.sticky-header {
    overflow: hidden;
    max-width: 100vw;
}

/* =============== PRINT STYLES =============== */
@media print {
    .main-header,
    .main-footer,
    .mobile-menu {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
}
