/* Tailwind Custom Styles */

/*******************************
 * TABLE OF CONTENTS
 * 1. Base Styles
 * 2. Typography & Colors
 * 3. Layout Components
 * 4. Hero Section
 * 5. Cards & Containers
 * 6. Navigation
 * 7. Sections & Backgrounds
 * 8. Effects & Transitions
 * 9. Responsive Design
 *******************************/

/* --------------------
   1. Base Styles 
   -------------------- */
body {
    font-family: 'Rajdhani', sans-serif;
    background: #ffffff;
    color: #333333;
    min-height: 100vh;
    position: relative;
}

/* Main section base styles */
main section {
    position: relative;
    overflow: hidden;
}

.light-section {
    padding: 5rem 0;
}

/* --------------------
   2. Typography & Colors 
   -------------------- */
.qrg-dark {
    color: #281A33;
}

.qrg-accent-light {
    color: #F59929;
}

.qrg-accent-dark {
    color: #FD0D1B;
}

.qrg-gradient-text {
    background: linear-gradient(to right, #FD0D1B, #F59929);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.qrg-gradient-bg {
    background: linear-gradient(to right, #FD0D1B, #F59929);
}

.section-heading {
    font-weight: 700;
    position: relative;
    margin-bottom: 2rem;
}

.section-heading:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, #FD0D1B, #F59929);
}

/* --------------------
   3. Layout Components
   -------------------- */
/* Logo Styles */
.logo-container img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-desaturated {
    filter: saturate(0) blur(.3) brightness(0.95);
    transform: scale(1);
    opacity: 0.30;
}

/* Footer Styles */
.footer-logo img {
    max-width: 150px;
    height: auto;
}

/* --------------------
   4. Hero Section 
   -------------------- */
/* Full Page Header with Hero Section */
.full-page-header {
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: #ffffff;
    transition: height 0.5s ease;
}

/* Shorter header that shows "Our Games" section heading */
.full-page-header.shorter-header {
    height: calc(100vh - 120px);
    min-height: 600px; /* Added minimum height to ensure the header is never too short */
}

.hero-section {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    background: transparent;
    overflow: hidden;
    padding-top: 6rem; /* Increased padding to ensure content doesn't overlap with nav */
    min-height: 500px; /* Minimum height to ensure CTA buttons never overlap with nav */
    background-color: #ffffff;
    /* Background image moved to pseudo-element for opacity control */
}

/* Apply background image with opacity control */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/qrg/qrg-logo-big.png');
    background-position: 90% center; /* Position the image on the right side */
    background-repeat: no-repeat;
    background-size: 40% auto; /* Size the image to take about 40% width */
    filter: saturate(0.9) blur(0.3px) brightness(0.95);
    opacity: 0.2; /* Set opacity to 30% */
    z-index: 0;
    pointer-events: none;
}

.hero-section .container, .full-page-header .container {
    position: relative;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Centered gradient focused on the CTA section */
    background: radial-gradient(ellipse 60% 70% at 25% calc(50% + 2rem), 
        transparent 0%, 
        rgba(40, 26, 51, 0.01) 30%, 
        rgba(40, 26, 51, 0.2) 45%,
        rgba(40, 26, 51, 0.4) 65%, 
        rgba(40, 26, 51, 0.65) 80%,
        rgba(40, 26, 51, 0.95) 150%
        );
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: normal;
    transform-origin: 30% 50%;
}

/* --------------------
   5. Cards & Containers 
   -------------------- */
.quantum-card {
    background: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.quantum-card:hover {
    border-color: #e9ecef;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.04);
    background: #ffffff;
}

.quantum-border {
    border: 1px solid #e9ecef;
}

.quantum-gradient {
    background: #ffffff;
}

/* Card Image Container */
.card-image-container {
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

/* Adding padding to the Quantum Chess logo image */
.card-image-container img.product-image {
    padding: 4rem;
    background-color: #ffffff;
}

.card-image-container:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
}

.product-image {
    transition: opacity 0.3s ease;
}

.quantum-card:hover .product-image {
    opacity: 0.95;
}

/* --------------------
   6. Navigation 
   -------------------- */
/* Light Theme Custom Classes */
.light-nav {
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    border-bottom: 1px solid #e9ecef;
    background-color: rgba(255, 255, 255, 0.98);
}

/* Mobile Menu */
.mobile-nav {
    position: relative;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%; /* Adjusted width */
    max-width: 300px; /* Added max-width */
    height: 100%; /* Changed to 100% for full height */
    overflow-y: auto; /* Added for scrollable content if needed */
    background-color: rgba(40, 26, 51, 0.95);
    z-index: 100;
    opacity: 0;
    transform: translateX(-100%); /* Slide in from left */
    transition: opacity 0.3s ease, transform 0.3s ease; /* Added transform to transition */
}

.mobile-menu-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align items to the start */
    align-items: flex-start; /* Align items to the left */
    min-height: auto; /* Adjusted min-height */
    padding: 4rem 1.5rem 2rem; /* Adjusted padding */
}

/* Styling for individual menu links */
.mobile-menu-container a {
    padding-top: 0.5rem; /* Reduced top padding */
    padding-bottom: 0.5rem; /* Reduced bottom padding */
}

#menu-toggle:checked ~ .mobile-menu {
    opacity: 1;
    transform: translateX(0); /* Slide in to view */
    /* height: 100vh; removed, height is now 100% */
    /* transition: opacity 0.3s ease; removed, combined with transform transition */
}

/* Overlay for closing menu when clicking outside */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99; /* Below menu, above content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s ease 0.3s;
}

#menu-toggle:checked ~ .mobile-menu-overlay {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

/* --------------------
   7. Sections & Backgrounds 
   -------------------- */

/* Clean section styles without gradients */
section.bg-gray-50 {
    background: #f9fafb !important;
    position: relative;
    overflow: hidden;
}

/* Games section with simple white background */
#games {
    background: #ffffff !important;
    padding-top: 3rem; /* Add padding to ensure there's space above the "Our Games" heading */
}

section.bg-white, nav.bg-white, footer.bg-white {
    background: #ffffff !important;
    position: relative;
    overflow: hidden;
}

/* --------------------
   8. Effects & Transitions 
   -------------------- */
.btn-glow {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(249, 107, 41, 0.4), 0 0 20px rgba(154, 69, 210, 0.45);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(249, 107, 41, 0.65), 0 0 30px rgba(154, 69, 210, 0.7);
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.08) contrast(1.05);
}

.btn-glow:active {
    transform: translateY(0);
}

/* --------------------
   9. Responsive Design 
   -------------------- */
@media (max-width: 768px) {
    .logo-container img {
        max-height: 40px;
    }
    
    .full-page-header {
        height: auto;
        min-height: 100vh;
    }
    
    .full-page-header.shorter-header {
        min-height: calc(100vh - 80px); /* Reduced height to show "Our Games" at bottom of screen */
        min-height: 500px; /* Reduced minimum height on mobile */
    }
    
    .hero-section {
        min-height: 450px; /* Reduced minimum height for mobile to let "Our Games" show */
        padding: 7rem 0 1rem; /* Reduced bottom padding */
        background-color: #ffffff;
    }
    
    .hero-section::after {
        /* Remove background image on mobile */
        background-image: none;
    }
    
    .hero-section::before {
        /* Change to linear gradient for mobile */
        background: linear-gradient(to top, 
            rgba(40, 26, 51, 0.01) 0%, 
            rgba(40, 26, 51, 0.2) 20%,
            rgba(40, 26, 51, 0.5) 60%, 
            rgba(40, 26, 51, 0.7) 100%
        );
        mix-blend-mode: normal;
    }
    
    .btn-glow {
        box-shadow: 0 0 20px rgba(249, 107, 41, 0.4), 0 0 20px rgba(154, 69, 210, 0.45);
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    }
    
    /* Quantum Chess Card Full Width Styles */
    .games-section .w-full.mx-auto {
        padding: 0;
    }

    .games-section .quantum-card,
    #tools .quantum-card {
        border-radius: 0.5rem;
        width: 100%;
    }
    
    .games-section .quantum-card .p-6,
    #tools .quantum-card .p-6 {
        padding: 1rem;
    }
    
    /* Chess card has media first on mobile, Forge has media last */
    .games-section .flex.flex-col.md\:flex-row.p-6 {
        padding: 1rem;
    }
    
    #tools .flex.flex-col.md\:flex-row.p-6 {
        padding: 1rem;
        flex-direction: column-reverse;
    }
    
    /* Make the video thumbnail nicely sized on mobile */
    .video-thumbnail-container {
        max-width: 280px;
        margin: 0 auto 1.5rem;
    }
    
    /* Add spacing between the content and media on mobile */
    .md\:w-1\/3.flex.flex-col {
        margin-bottom: 1.5rem;
    }
    
    /* Remove borders on mobile */
    .chess-media, .forge-media {
        border: none !important;
    }
}

/* Video Thumbnail Styles */
.video-thumbnail-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.video-link {
    display: block;
    transition: all 0.3s ease;
}

.video-link:hover img {
    transform: scale(1.05);
}

.aspect-w-16.aspect-h-9 {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.aspect-w-16.aspect-h-9 img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-link:hover .rounded-full {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 20px rgba(253, 13, 27, 0.5);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .video-thumbnail-container {
        margin-top: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .games-section .flex.flex-col.md\\:flex-row.p-6 {
        padding: 1rem;
    }
}

/* Adjust card layout for desktop */
@media (min-width: 769px) {
    .quantum-card .md\:w-1\/3.flex.flex-col {
        padding-left: 1rem;
    }
    
    .quantum-card .video-thumbnail-container {
        max-width: 100%;
    }
    
    /* Add a subtle divider between text and media */
    .quantum-card .md\:w-2\/3.p-6 {
        border-right: 1px solid rgba(229, 231, 235, 0.5);
    }
    
    /* Specific styles for Quantum Chess (left) and Quantum Forge (right) layouts */
    /* For Quantum Chess (media on left) */
    .chess-media {
        padding-right: 1.5rem;
        border-right: 1px solid rgba(229, 231, 235, 0.5);
    }
    
    /* For Quantum Forge (media on right) */
    .forge-media {
        padding-left: 1.5rem;
        border-left: 1px solid rgba(229, 231, 235, 0.5);
    }
}

/* Product cards centered with 80% width */
.w-4\/5.mx-auto {
    max-width: 80%;
}

@media (max-width: 768px) {
    .w-4\/5.mx-auto {
        max-width: 100%;
    }
}

/* Social Media Icons */
.social-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: #f3f4f6; /* bg-gray-100 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280; /* text-gray-500 */
    transition: all 0.2s ease-in-out;
}

/* Twitter */
.social-icon.twitter:hover {
    background-color: rgba(0, 0, 0, 0.1); /* Black with opacity */
    color: #000000; /* Black */
}

/* YouTube */
.social-icon.youtube:hover {
    background-color: rgba(255, 0, 0, 0.1); /* Red with opacity */
    color: #FF0000; /* Red */
}

/* GitHub */
.social-icon.github:hover {
    background-color: rgba(0, 0, 0, 0.1); /* Black with opacity */
    color: #000000; /* Black */
}

/* Discord */
.social-icon.discord:hover {
    background-color: rgba(88, 101, 242, 0.1); /* Discord Blurple with opacity */
    color: #5865F2; /* Discord Blurple */
}

/* LinkedIn */
.social-icon.linkedin:hover {
    background-color: rgba(10, 102, 194, 0.1); /* Standard LinkedIn blue */
    color: #0A66C2;
}

/* Custom styles for prose elements for consistency and readability */
.prose h2 {
    margin-top: 3rem; /* Increased top margin for better section separation */
    margin-bottom: 1.25rem; /* Increased bottom margin */
    /* Default prose styling for font-size, weight, color will still apply */
}