/* ==============================================
   PRICING SECTION WITH VIDEO LAYOUT
   Based on Hero Section Design Pattern
   ============================================== */

/* Pricing Section - Modern CSS Grid Layout */
.pricing-section {
    /* CSS Container for responsive design */
    container-type: inline-size;
    container-name: pricing;
    
    /* CSS Custom Properties for dynamic sizing */
    --pricing-video-width: 30%;
    --pricing-content-width: 70%;
    --pricing-padding: var(--space-4);
    --pricing-gap: var(--space-6);
    
    position: relative;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    isolation: isolate; /* Create stacking context */
    padding: 0; /* Override any global padding */
    background: linear-gradient(135deg, #1f2937 0%, #271f11 100%);
}

/* Performance optimizations */
.pricing-section * {
    will-change: transform;
    backface-visibility: hidden;
}

/* Mobile: Full-screen video background layout */
@container pricing (max-width: 767px) {
    #pricing-video-container {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
    }
    
    #pricing-video-container .pricing-mobile-video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: -1;
        opacity: 0.3; /* Dim the video for better text readability */
        
        /* Modern video optimizations */
        image-rendering: crisp-edges;
        transform: translateZ(0); /* Force GPU acceleration */
    }

    /* Mobile content wrapper */
    .pricing-mobile {
        padding: 2rem 1rem;
        position: relative;
        min-height: 100vh;
        justify-content: center;
        z-index: 10;
        background-image: url('../assets/pricingBG.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    /* Add overlay for mobile text readability */
    .pricing-mobile::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1;
    }

    /* Ensure mobile content is above overlay */
    .pricing-mobile > * {
        position: relative;
        z-index: 10;
    }

    /* Mobile table styling */
    .pricing-mobile table {
        font-size: 1rem; /* Larger text for mobile */
        position: relative;
        z-index: 10;
        border: 2px solid #FF6135;
        box-shadow: 0 4px 20px rgba(255, 97, 53, 0.3);
        min-width: 95%; /* Larger table width */
    }

    .pricing-mobile thead th {
        background: linear-gradient(135deg, #FF6135 0%, #FF8A65 100%);
        color: #ffffff;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        border-bottom: 2px solid #FF6135;
    }

    .pricing-mobile tbody tr:hover {
        background: rgba(255, 97, 53, 0.2);
    }

    .pricing-mobile tbody td {
        border: 1px solid rgba(255, 97, 53, 0.3);
    }

    .pricing-mobile th,
    .pricing-mobile td {
        padding: 1rem 0.75rem; /* Larger padding */
        font-size: 1rem; /* Explicit larger font size */
    }

    .pricing-mobile h2 {
        position: relative;
        z-index: 10;
        color: #FF6135 !important;
        font-size: 4rem !important;
        font-weight: 900 !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
        margin-bottom: 2rem !important;
    }

    .pricing-mobile p {
        position: relative;
        z-index: 10;
    }
}

/* Desktop: Split layout (768px and above) */
@media (min-width: 768px) {
    .pricing-section {
        overflow: hidden;
    }

    /* Desktop video container positioning */
    #pricing-video-container {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
    }

    .pricing-desktop-layout {
        width: 100%;
        height: 100vh;
        display: flex;
    }

    /* Right side: Video container - optimized for SwitchLogo video */
    .pricing-video-container {
        width: 70%;
        height: 100%;
        position: relative;
        overflow: hidden;
        background: #000;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .pricing-video-container .pricing-desktop-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    /* Left side: Pricing content - takes less space */
    .pricing-content-container {
        width: 30%;
        height: 100%;
        position: relative;
        background-image: url('../assets/pricingBG.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
    }

    /* Add overlay for better text readability */
    .pricing-content-container::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(55, 65, 81, 0.8) 0%, rgba(31, 41, 55, 0.8) 100%);
        z-index: 1;
    }

    .pricing-content {
        width: 100%;
        max-width: 800px;
        text-align: center;
        position: relative;
        z-index: 10;
    }

    /* Desktop table styling */
    .pricing-content table {
        max-width: 900px; /* Larger table width */
        margin: 0 auto;
        position: relative;
        z-index: 10;
        width: 100%; /* Full width within container */
    }

    .pricing-content th,
    .pricing-content td {
        padding: 1.25rem; /* Larger padding */
        font-size: 1.125rem; /* Larger font size */
    }

    /* Desktop title styling */
    .pricing-content h2 {
        margin-bottom: 2rem;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        position: relative;
        z-index: 10;
        color: #FF6135 !important;
        font-size: 4rem !important;
        font-weight: 900 !important;
    }

    .pricing-content p {
        position: relative;
        z-index: 10;
    }
}

/* Enhanced table styling for both mobile and desktop */
.pricing-section table {
    backdrop-filter: blur(15px);
    border: 2px solid #FF6135;
    box-shadow: 0 8px 32px rgba(255, 97, 53, 0.3);
}

.pricing-section thead th {
    background: linear-gradient(135deg, #FF6135 0%, #FF8A65 100%);
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #FF6135;
}

.pricing-section tbody tr {
    transition: background-color 0.3s ease;
}

.pricing-section tbody tr:hover {
    background: rgba(255, 97, 53, 0.2);
}

.pricing-section tbody td {
    background: rgba(17, 24, 39, 0.9);
    color: #f9fafb;
    border: 1px solid rgba(255, 97, 53, 0.3);
}

.pricing-section tbody tr:nth-child(even) td {
    background: rgba(31, 41, 55, 0.9);
}

/* Animation effects */
@media (min-width: 768px) {
    .pricing-content {
        animation: slideInFromRight 1s ease-out;
    }

    .pricing-video-container {
        animation: slideInFromLeft 1s ease-out;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive breakpoints */
@media (min-width: 1024px) {
    .pricing-content-container {
        padding: 3rem;
        background-attachment: fixed; /* Parallax effect for larger screens */
    }
    
    .pricing-content h2 {
        font-size: 3.5rem;
    }
    
    .pricing-content table {
        font-size: 1.25rem; /* Even larger font for big screens */
    }
    
    .pricing-content th,
    .pricing-content td {
        padding: 1.5rem; /* Even larger padding for big screens */
    }
}

@media (min-width: 1280px) {
    .pricing-video-container {
        width: 35%;
    }
    
    .pricing-content-container {
        width: 65%;
        padding: 4rem;
    }
}

/* Accessibility improvements */
.pricing-section table {
    border-collapse: separate;
    border-spacing: 0;
}

.pricing-section th {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Focus states for keyboard navigation */
.pricing-section table:focus-within {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pricing-section table {
        border: 2px solid #ffffff;
    }
    
    .pricing-section th,
    .pricing-section td {
        border: 1px solid #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .pricing-content,
    .pricing-video-container {
        animation: none;
    }
    
    .pricing-section tbody tr {
        transition: none;
    }
}
