/* Responsive background images with adaptive sizing */
.BG, .BG_TOUR, .BG_NEWS, .BG_MEDIA, .BG_MERCH, .BG_ABOUT {
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center center;
}

/* Mobile-first background positioning (320px - 767px) */
.BG {
    background-image: url("pictures/BG_PICTURES/BG1.jpg");
    background-size: cover;
    background-position: center center;
}

.BG_TOUR {
    background-image: url("pictures/BG_PICTURES/BG_TOUR.jpg");
    background-size: cover;
    background-position: center center;
}

.BG_NEWS {
    background-image: url("pictures/BG_PICTURES/BG_NEWS.jpeg");
    background-size: cover;
    background-position: center center;
}

.BG_MEDIA {
    background-image: url("pictures/BG_PICTURES/BG_MEDIA.jpg");
    background-size: cover;
    background-position: center 2%;
}

.BG_MERCH {
    background-image: url("pictures/BG_PICTURES/BG_MERCH.jpg");
    background-size: cover;
    background-position: center center;
}

.BG_ABOUT {
    background-image: url("pictures/BG_PICTURES/BG_ABOUT.jpg");
    background-size: cover;
    background-position: center center;
}

/* Tablet optimizations (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .BG, .BG_TOUR, .BG_NEWS, .BG_MERCH, .BG_ABOUT {
        background-attachment: fixed;
        background-size: cover;
        background-position: center center;
        image-rendering: auto;
    }
    
    .BG_MEDIA {
        background-attachment: fixed;
        background-size: cover;
        background-position: center 2%;
    }
}

/* Desktop optimizations (1024px - 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .BG, .BG_TOUR, .BG_NEWS, .BG_MERCH, .BG_ABOUT {
        background-attachment: fixed;
        background-size: cover;
        background-position: center center;
        image-rendering: auto;
    }
    
    .BG_MEDIA {
        background-attachment: fixed;
        background-size: cover;
        background-position: center 30%;
    }
}

/* Large desktop optimizations (1440px - 1919px) */
@media (min-width: 1440px) and (max-width: 1919px) {
    .BG, .BG_TOUR, .BG_NEWS, .BG_MERCH, .BG_ABOUT {
        background-attachment: fixed;
        background-size: cover;
        background-position: center center;
        image-rendering: auto;
    }
    
    .BG_MEDIA {
        background-attachment: fixed;
        background-size: cover;
        background-position: center 30%;
    }
}

/* 4K and ultrawide optimizations (1920px+) */
@media (min-width: 1920px) {
    .BG, .BG_TOUR, .BG_NEWS, .BG_MERCH, .BG_ABOUT {
        background-attachment: fixed;
        background-size: cover;
        background-position: center center;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .BG_MEDIA {
        background-attachment: fixed;
        background-size: cover;
        background-position: center 2%;
    }
}

/* Landscape mobile devices */
@media (max-height: 500px) and (orientation: landscape) {
    .BG, .BG_TOUR, .BG_NEWS, .BG_MERCH, .BG_ABOUT {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
        min-height: 100vh;
    }
    
    .BG_MEDIA {
        background-size: cover;
        background-position: center 2%;
        min-height: 100vh;
    }
}

/* High DPI displays (Retina, etc.) - Enhanced quality */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .BG, .BG_TOUR, .BG_NEWS, .BG_MERCH, .BG_ABOUT {
        background-size: cover;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        background-blend-mode: normal;
    }
    
    .BG_MEDIA {
        background-size: cover;
        background-position: center 15%;
    }
}

/* Super high DPI displays (3x Retina) */
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) {
    .BG, .BG_TOUR, .BG_NEWS, .BG_MERCH, .BG_ABOUT {
        background-size: cover;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: pixelated;
        background-blend-mode: multiply;
    }
    
    .BG_MEDIA {
        background-size: cover;
        background-position: center 15%;
    }
}

/* Adaptive overlay for better text readability across all screens */
.BG::before, .BG_TOUR::before, .BG_NEWS::before, 
.BG_MEDIA::before, .BG_MERCH::before, .BG_ABOUT::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.5) 100%
    );
    z-index: 1;
    transition: opacity 0.3s ease;
}

/* Ensure content appears above overlay */
.BG > *, .BG_TOUR > *, .BG_NEWS > *, 
.BG_MEDIA > *, .BG_MERCH > *, .BG_ABOUT > * {
    position: relative;
    z-index: 2;
}

/* Mobile background optimizations - use cover for all */
@media (max-width: 767px) {
    .BG, .BG_TOUR, .BG_NEWS, .BG_MEDIA, .BG_MERCH, .BG_ABOUT {
        background-size: cover !important;
        background-position: center center;
        background-attachment: scroll;
        image-rendering: -webkit-optimize-contrast;
    }
}



/* Enhanced mobile overlay for better readability */
@media (max-width: 767px) {
    .BG::before, .BG_TOUR::before, .BG_NEWS::before, 
    .BG_MEDIA::before, .BG_MERCH::before, .BG_ABOUT::before {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 0.4) 40%,
            rgba(0, 0, 0, 0.6) 100%
        );
    }
    
    /* Lighter overlay for media page on mobile */
    .BG_MEDIA::before {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.15) 0%,
            rgba(0, 0, 0, 0.3) 40%,
            rgba(0, 0, 0, 0.45) 100%
        );
    }
}

/* Tablet overlay adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .BG::before, .BG_TOUR::before, .BG_NEWS::before, 
    .BG_MEDIA::before, .BG_MERCH::before, .BG_ABOUT::before {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.25) 50%,
            rgba(0, 0, 0, 0.4) 100%
        );
    }
    
    /* Lighter overlay for media page on tablet */
    .BG_MEDIA::before {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.05) 0%,
            rgba(0, 0, 0, 0.18) 50%,
            rgba(0, 0, 0, 0.3) 100%
        );
    }
}

/* Desktop overlay - minimal for better image visibility */
@media (min-width: 1024px) {
    .BG::before, .BG_TOUR::before, .BG_NEWS::before, 
    .BG_MEDIA::before, .BG_MERCH::before, .BG_ABOUT::before {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.05) 0%,
            rgba(0, 0, 0, 0.2) 60%,
            rgba(0, 0, 0, 0.35) 100%
        );
    }
    
    /* Lighter overlay for media page to show background clearly */
    .BG_MEDIA::before {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.02) 0%,
            rgba(0, 0, 0, 0.15) 60%,
            rgba(0, 0, 0, 0.25) 100%
        );
    }
}


/* Mobile Navigation Styles */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-menu a:hover {
    color: #7B1FA2;
    transform: scale(1.1);
}

.hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Responsive Typography */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.1 !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
        margin-bottom: 1.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.125rem !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
        margin-bottom: 2rem !important;
    }
    
    .section-title {
        font-size: 1.875rem !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
    }
    
    .section-title {
        font-size: 1.5rem !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    }
}

/* Responsive Images */
.responsive-img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Responsive Grid Adjustments */
@media (max-width: 768px) {
    .track-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .tour-date-card {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1rem !important;
    }
}

/* Better button spacing on mobile */
@media (max-width: 640px) {
    .button-group {
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100% !important;
        margin-bottom: 3rem !important;
    }
    
    .button-group button,
    .button-group a {
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
    }
    
    /* Ensure hero section has proper spacing */
    .BG section, .BG_TOUR section, .BG_NEWS section,
    .BG_MEDIA section, .BG_MERCH section, .BG_ABOUT section {
        padding-bottom: 4rem !important;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Logo responsive sizing */
.logo-img {
    width: 200px;
    max-width: 100%;
    height: auto;
}

@media (max-width: 640px) {
    .logo-img {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .logo-img {
        width: 120px;
    }
}

/* Additional responsive utilities */
.container-responsive {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Fix section overlap on mobile */
@media (max-width: 767px) {
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .bg-gradient-to-b {
        margin-top: 0 !important;
    }
}

@media (min-width: 640px) {
    .container-responsive {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .container-responsive {
        padding: 0 3rem;
    }
}

/* Responsive spacing utilities */
.section-padding {
    padding: 2rem 1rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 4rem 2rem;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding: 5rem 3rem;
    }
}

/* Enhanced mobile touch targets */
@media (max-width: 768px) {
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    .mobile-menu a {
        padding: 1rem 2rem;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Responsive font scaling */
html {
    font-size: 14px;
}

@media (min-width: 640px) {
    html {
        font-size: 16px;
    }
}

@media (min-width: 1024px) {
    html {
        font-size: 18px;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    * {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .BG, .BG_TOUR, .BG_NEWS, .BG_MEDIA, .BG_MERCH, .BG_ABOUT {
        background-attachment: scroll !important;
        will-change: transform;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        background-repeat: no-repeat;
        background-size: cover;
    }
    
    /* Optimize overlay rendering for mobile */
    .BG::before, .BG_TOUR::before, .BG_NEWS::before, 
    .BG_MEDIA::before, .BG_MERCH::before, .BG_ABOUT::before {
        will-change: opacity;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

/* Background image preloading and optimization */
.BG, .BG_TOUR, .BG_NEWS, .BG_MEDIA, .BG_MERCH, .BG_ABOUT {
    background-origin: padding-box;
    background-clip: border-box;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.875rem !important;
    }
    
    .min-h-screen {
        min-height: 100vh;
        padding-top: 80px;
        padding-bottom: 40px;
    }
}

/* Large screen optimizations (4K and ultrawide) */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .hero-title {
        font-size: 6rem !important;
    }
    
    .section-title {
        font-size: 3.5rem !important;
    }
    
    html {
        font-size: 20px;
    }
}

@media (min-width: 2560px) {
    .container {
        max-width: 2000px;
    }
    
    .hero-title {
        font-size: 8rem !important;
    }
    
    html {
        font-size: 22px;
    }
}

/* Print styles for better printing experience */
@media print {
    .mobile-menu,
    .hamburger,
    nav,
    footer {
        display: none !important;
    }
    
    .BG, .BG_TOUR, .BG_NEWS, .BG_MEDIA, .BG_MERCH, .BG_ABOUT {
        background: none !important;
        color: black !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero-title {
        font-size: 24pt !important;
        color: black !important;
    }
    
    .section-title {
        font-size: 18pt !important;
        color: black !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    .container {
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

