:root {
    --primary-color: #2F6BFF;
    --secondary-color: #6FA3FF;
    --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
    --card-bg: #FFFFFF;
    --page-bg: #F4F7FB;
    --text-main: #1F2D3D;
    --text-black: #000000;
    --border-color: #D6E2FF;
    --glow-color: #A5C4FF;
    --dark-bg: #100224; /* From general rules for dark backgrounds */
}

.page-casino {
    background-color: var(--page-bg);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: 40px; /* Ensure some space at the bottom */
}

/* Hero Section */
.page-casino__hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 10px; /* Small top padding, body handles header offset */
}

.page-casino__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    max-height: 600px; /* Limit height on desktop */
}

.page-casino__hero-content {
    background-color: var(--dark-bg); /* Use dark background for content area */
    color: var(--card-bg); /* White text on dark background */
    padding: 40px 20px;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.page-casino__hero-content h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem); /* Responsive font size for H1 */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--secondary-color); /* Use a lighter color for H1 on dark background */
    max-width: 90%; /* Prevent overly wide H1 */
    margin-left: auto;
    margin-right: auto;
}

.page-casino__hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.8);
}

.page-casino__hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* General Buttons */
.page-casino__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 44px; /* Touch target size */
    box-sizing: border-box;
}

.page-casino__btn--primary {
    background: var(--button-gradient);
    color: var(--card-bg); /* White text */
    border: none;
    box-shadow: 0 4px 15px rgba(47, 107, 255, 0.4);
}

.page-casino__btn--primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-casino__btn--secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.page-casino__btn--secondary:hover {
    background-color: var(--secondary-color);
    color: var(--card-bg);
}

.page-casino__btn--learn-more {
    background: var(--button-gradient);
    color: var(--card-bg);
    border: none;
    box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3);
    margin-top: 20px;
}

.page-casino__btn--learn-more:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-casino__btn--view-all {
    background-color: var(--secondary-color);
    color: var(--card-bg);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 0.95rem;
}

.page-casino__btn--view-all:hover {
    background-color: var(--primary-color);
}

.page-casino__btn--small {
    background: var(--button-gradient);
    color: var(--card-bg);
    border: none;
    padding: 8px 15px;
    font-size: 0.85rem;
    border-radius: 5px;
}

.page-casino__btn--small:hover {
    opacity: 0.9;
}


/* Section Styling */
.page-casino__about-section,
.page-casino__games-section,
.page-casino__promotions-section,
.page-casino__security-section,
.page-casino__faq-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-casino__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-main);
    position: relative;
    padding-bottom: 10px;
}

.page-casino__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--button-gradient);
    border-radius: 2px;
}

.page-casino__content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.page-casino__content-wrapper p {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--text-main);
}

/* Game Grid */
.page-casino__game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns for desktop */
    gap: 20px;
    margin-top: 30px;
}

.page-casino__game-tile {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--card-bg);
    min-height: 200px; /* Minimum card height */
}

.page-casino__game-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-casino__game-tile img {
    width: 100%;
    height: 100%; /* Make image fill the tile, object-fit will handle aspect */
    object-fit: cover;
    object-position: center;
    display: block;
    min-width: 200px; /* Enforce minimum image size */
    min-height: 200px; /* Enforce minimum image size */
}

.page-casino__view-all-games {
    text-align: center;
    margin-top: 40px;
}

/* Promotions Section */
.page-casino__promotion-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns for desktop */
    gap: 30px;
    margin-top: 30px;
}

.page-casino__promotion-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-casino__promotion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-casino__promotion-card img {
    width: 100%;
    height: 225px; /* Fixed height for promo images */
    object-fit: cover;
    object-position: center;
    display: block;
    min-width: 200px; /* Enforce minimum image size */
    min-height: 200px; /* Enforce minimum image size */
}

.page-casino__card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-casino__card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-main);
}

.page-casino__card-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-casino__card-title a:hover {
    color: var(--primary-color);
}

.page-casino__card-description {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-casino__view-all-promotions {
    text-align: center;
    margin-top: 40px;
}

/* FAQ Section */
.page-casino__faq-list {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 30px;
}

.page-casino__faq-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.page-casino__faq-question {
    font-size: 1.15rem;
    font-weight: 600;
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
    position: relative;
    user-select: none;
}

.page-casino__faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.page-casino__faq-question.active::after {
    content: '-';
    transform: rotate(180deg);
}

.page-casino__faq-answer {
    padding: 0 20px 20px;
    font-size: 1rem;
    color: var(--text-main);
    display: none; /* Hidden by default, toggled by JS */
}

/* Responsive Styles */
@media (max-width: 849px) {
    .page-casino__hero-image {
        max-height: 400px;
    }

    .page-casino__hero-content {
        padding: 30px 15px;
    }

    .page-casino__hero-content h1 {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
    }

    .page-casino__hero-description {
        font-size: 1rem;
    }

    .page-casino__hero-actions {
        flex-direction: column;
        gap: 15px;
    }

    .page-casino__btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .page-casino__about-section,
    .page-casino__games-section,
    .page-casino__promotions-section,
    .page-casino__security-section,
    .page-casino__faq-section {
        padding: 40px 15px;
    }

    .page-casino__section-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 30px;
    }

    .page-casino__game-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for medium screens */
    }

    .page-casino__game-tile img,
    .page-casino__promotion-card img {
        min-width: 200px; /* Ensure images are not too small */
        min-height: 200px;
        max-width: 100%; /* Important for mobile overflow */
        height: auto;
    }

    .page-casino__promotion-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for medium screens */
        gap: 20px;
    }

    .page-casino__promotion-card img {
        height: auto; /* Allow height to adjust */
    }

    .page-casino__card-title {
        font-size: 1.15rem;
    }
    .page-casino__card-description {
        font-size: 0.9rem;
    }
    .page-casino__faq-question {
        font-size: 1.05rem;
    }
    .page-casino__faq-answer {
        font-size: 0.95rem;
    }

    /* Enforce max-width for all images in content area */
    .page-casino img {
        max-width: 100%;
        height: auto;
        display: block;
    }
}

@media (max-width: 549px) {
    .page-casino__hero-image {
        max-height: 300px;
    }

    .page-casino__hero-content h1 {
        font-size: clamp(1.4rem, 7vw, 1.8rem);
    }

    .page-casino__hero-description {
        font-size: 0.9rem;
    }

    .page-casino__hero-actions {
        gap: 10px;
    }

    .page-casino__game-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for small screens */
    }

    .page-casino__promotion-grid {
        grid-template-columns: 1fr; /* 1 column for smallest screens */
    }

    .page-casino__promotion-card img {
        height: auto;
    }

    .page-casino__btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Ensure content area images are never smaller than 200px by CSS rules */
.page-casino img {
    min-width: 200px;
    min-height: 200px;
}
.page-casino__game-tile img,
.page-casino__promotion-card img {
    min-width: 200px;
    min-height: 200px;
}
/* Override for responsiveness on mobile, but keep min-size */
@media (max-width: 768px) {
    .page-casino img {
        max-width: 100%;
        height: auto;
        min-width: unset; /* Allow to shrink below 200px if container is smaller */
        min-height: unset;
    }
    .page-casino__game-tile img,
    .page-casino__promotion-card img {
        max-width: 100%;
        height: auto;
        min-width: unset;
        min-height: unset;
    }
}