/* ============================================
   FEATURED CHARACTERS CAROUSEL
   ============================================ */

.carousel-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.characters-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 2rem 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.characters-carousel::-webkit-scrollbar {
    display: none;
}

/* Character Cards */
.character-card {
    position: relative;
    min-width: 300px;
    height: 450px;
    border-radius: 15px;
    overflow: hidden;
    scroll-snap-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.character-card:hover {
    transform: translateY(-15px) scale(1.02);
}

/* Card Backgrounds with Patterns */
.card-background {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Hero Cards - Blue/Gold theme */
.hero-card .card-background {
    background: linear-gradient(135deg, var(--primary-blue), var(--electric));
}

/* Villain Cards - Purple/Red theme */
.villain-card .card-background {
    background: linear-gradient(135deg, var(--shadow), var(--psychic));
}

/* Pattern Variations */
.pattern-dots {
    background-image: radial-gradient(circle, rgba(255, 215, 0, 0.3) 2px, transparent 2px);
    background-size: 20px 20px;
}

.pattern-lines {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 215, 0, 0.2) 10px,
        rgba(255, 215, 0, 0.2) 12px
    );
}

.pattern-hex {
    background-image: 
        linear-gradient(30deg, rgba(255, 215, 0, 0.2) 12%, transparent 12.5%, transparent 87%, rgba(255, 215, 0, 0.2) 87.5%, rgba(255, 215, 0, 0.2)),
        linear-gradient(150deg, rgba(255, 215, 0, 0.2) 12%, transparent 12.5%, transparent 87%, rgba(255, 215, 0, 0.2) 87.5%, rgba(255, 215, 0, 0.2)),
        linear-gradient(30deg, rgba(255, 215, 0, 0.2) 12%, transparent 12.5%, transparent 87%, rgba(255, 215, 0, 0.2) 87.5%, rgba(255, 215, 0, 0.2)),
        linear-gradient(150deg, rgba(255, 215, 0, 0.2) 12%, transparent 12.5%, transparent 87%, rgba(255, 215, 0, 0.2) 87.5%, rgba(255, 215, 0, 0.2));
    background-size: 80px 140px;
}

/* Card Image */
.card-image {
    position: relative;
    z-index: 2;
    height: 70%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
}

.char-placeholder-card {
    width: 200px;
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border: 3px solid var(--primary-gold);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.char-placeholder-card span {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Card Info */
.card-info {
    position: relative;
    z-index: 3;
    padding: 1rem;
    text-align: center;
}

.card-name {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.card-subtitle {
    font-size: 1rem;
    color: var(--primary-gold);
    font-weight: 600;
}

/* Card Button */
.card-btn {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    padding: 0.8rem 2rem;
    background: var(--primary-gold);
    color: var(--black);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.character-card:hover .card-btn {
    opacity: 1;
    bottom: 1.5rem;
}

.card-btn:hover {
    background: var(--white);
    transform: translateX(-50%) scale(1.05);
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 56, 168, 0.8);
    color: var(--white);
    border: 2px solid var(--primary-gold);
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary-blue);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--primary-gold);
    width: 30px;
    border-radius: 6px;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .character-card {
        min-width: 250px;
        height: 400px;
    }
    
    .card-name {
        font-size: 1.5rem;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Tablet and Mobile */
@media (max-width: 768px) {
    .featured-section {
        padding: 0;
        min-height: auto;
    }

    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 50vh);
        height: 200vh;
        gap: 0;
    }

    .featured-slot {
        height: 50vh;
        transform: skewX(0deg);
    }

    .featured-slot:hover {
        transform: skewX(0deg) scale(1.02);
    }

    /* Adjust all images to scale consistently on mobile */
    .featured-slot .slot-image img {
        object-fit: cover;
        object-position: center;
        width: 100%;
        height: 100%;
    }

    /* Make Jean Grey smaller for tablet */
    .featured-slot .slot-image img[src*="jeangrey"] {
        width: 95%;
        height: 100%;
    }

    /* Make Polaris smaller to fit better */
    .featured-slot .slot-image img[src*="polaris"] {
        width: 47%;
    }

    /* Make Kitty Pryde smaller to fit better */
    .featured-slot .slot-image img[src*="kittrypryde"] {
        width: 35%;
        height: 100%;
    }

    /* Make Emma Frost smaller for tablet */
    .featured-slot .slot-image img[src*="emmafrost"] {
        width: 65%;
    }

    /* Make Psylocke smaller for tablet */
    .featured-slot .slot-image img[src*="psylocke"] {
        width: 60%;
    }

    /* Make Iceman smaller for tablet */
    .featured-slot .slot-image img[src*="iceman"] {
        width: 65%;
    }

    /* Make Jubilee smaller for tablet */
    .featured-slot .slot-image img[src*="jubilee"] {
        width: 75%;
    }

    /* Make Nightcrawler smaller for tablet */
    .featured-slot .slot-image img[src*="nightcrawler"] {
        width: 90%;
        height: 90%;
    }

    /* Make Colossus for tablet */
    .featured-slot .slot-image img[src*="colossus"] {
        width: 50%;
    }

    /* Make Archangel for tablet */
    .featured-slot .slot-image img[src*="archangel"] {
        width: 70%;
    }

    /* Make Bishop smaller for tablet */
    .featured-slot .slot-image img[src*="bishop"] {
        width: 55%;
    }

    /* Make Mystique smaller for tablet */
    .featured-slot .slot-image img[src*="mystique"] {
        width: 55%;
    }

    /* Make Havok smaller for tablet */
    .featured-slot .slot-image img[src*="havok"] {
        width: 55%;
    }

    /* Make Juggernaut smaller for tablet */
    .featured-slot .slot-image img[src*="juggernaut"] {
        width: 65%;
    }

    /* Make Cyclops smaller for tablet */
    .featured-slot .slot-image img[src*="cyclops"] {
        width: 65%;
    }

    /* Make Gambit smaller for tablet */
    .featured-slot .slot-image img[src*="gambit"] {
        width: 65%;
    }

    /* Reduce font size for all characters in featured section */
    .featured-slot .char-name {
        font-size: 1.4rem;
    }

    .featured-slot .char-subtitle {
        font-size: 0.6rem;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        max-width: 300px;
        height: calc(100vh - 70px);
        background: rgba(0, 56, 168, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Typography */
    .section-title {
        font-size: 2rem;
    }

    /* Grids */
    .explore-grid,
    .latest-grid,
    .stats-grid,
    .cta-games {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Small Mobile Devices */
@media (max-width: 490px) {
    /* Adjust all images to scale consistently on small mobile */
    .featured-slot .slot-image img {
        object-fit: cover;
        object-position: center;
        width: 100%;
        height: 100%;
    }

    /* Make Jean Grey bigger on small mobile */
    .featured-slot .slot-image img[src*="jeangrey"] {
        width: 110%;
        height: 110%;
    }

    /* Make Polaris smaller on small mobile */
    .featured-slot .slot-image img[src*="polaris"] {
        width: 90%;
    }

    /* Make Kitty Pryde smaller on small mobile */
    .featured-slot .slot-image img[src*="kittrypryde"] {
        width: 85%;
        height: 100%;
    }

    /* Make Nightcrawler bigger on small mobile */
    .featured-slot .slot-image img[src*="nightcrawler"] {
        width: 120%;
        height: 120%;
    }

    /* Make Archangel for small mobile */
    .featured-slot .slot-image img[src*="archangel"] {
        width: 90%;
    }

    /* Make Colossus for small mobile */
    .featured-slot .slot-image img[src*="colossus"] {
        width: 100%;
    }

    /* Make Emma Frost smaller on small mobile */
    .featured-slot .slot-image img[src*="emmafrost"] {
        width: 95%;
    }

    /* Make Psylocke smaller on small mobile */
    .featured-slot .slot-image img[src*="psylocke"] {
        width: 100%;
    }

    /* Make Bishop smaller on small mobile */
    .featured-slot .slot-image img[src*="bishop"] {
        width: 105%;
    }

    /* Make Mystique smaller on small mobile */
    .featured-slot .slot-image img[src*="mystique"] {
        width: 110%;
    }

    /* Make Havok smaller on small mobile */
    .featured-slot .slot-image img[src*="havok"] {
        width: 100%;
    }

    /* Make Juggernaut smaller on small mobile */
    .featured-slot .slot-image img[src*="juggernaut"] {
        width: 110%;
    }

    /* Make Cyclops smaller on small mobile */
    .featured-slot .slot-image img[src*="cyclops"] {
        width: 100%;
    }

    /* Make Gambit smaller on small mobile */
    .featured-slot .slot-image img[src*="gambit"] {
        width: 85%;
    }

    /* Make Iceman smaller on small mobile */
    .featured-slot .slot-image img[src*="iceman"] {
        width: 100%;
    }

    /* Make Jubilee smaller on small mobile */
    .featured-slot .slot-image img[src*="jubilee"] {
        width: 95%;
    }

    .characters-carousel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 1rem;
        overflow-x: visible;
        scroll-snap-type: none;
    }

    .character-card {
        min-width: auto;
        width: 100%;
        height: 380px;
        scroll-snap-align: none;
    }

    .carousel-btn {
        display: none;
    }

    .card-btn {
        opacity: 1;
        bottom: 1rem;
    }

    .carousel-dots {
        display: none;
    }
}

/* ============================================
   GENERAL RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        max-width: 300px;
        height: calc(100vh - 70px);
        background: rgba(0, 56, 168, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Typography */
    .section-title {
        font-size: 2rem;
    }
    
    /* Grids */
    .explore-grid,
    .latest-grid,
    .stats-grid,
    .cta-games {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Large Screens */
@media (min-width: 1920px) {
    .hero-content {
        max-width: 2560px;
    }
    
    .container {
        max-width: 1400px;
    }
    
    .container-wide {
        max-width: 1800px;
    }
}
