/* style/casino.css */

/* Custom CSS variables for j9bet casino */
:root {
    --page-casino-primary-color: #0A246A; /* Deep Blue */
    --page-casino-secondary-color: #FFD700; /* Gold */
    --page-casino-text-dark: #333333;
    --page-casino-text-light: #ffffff;
    --page-casino-bg-light: #f8f9fa;
    --page-casino-bg-dark: #0A246A;
    --page-casino-border-color: #e0e0e0;
}

.page-casino {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--page-casino-text-dark); /* Default text color for light backgrounds */
    background-color: var(--page-casino-bg-light); /* Default light background */
}

.page-casino__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Sections */
.page-casino__section-title {
    font-size: 36px;
    color: var(--page-casino-primary-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
}

.page-casino__text-block {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 25px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--page-casino-text-dark);
}

/* Hero Section */
.page-casino__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    background: linear-gradient(135deg, var(--page-casino-primary-color) 0%, #1a3a7e 100%);
    overflow: hidden; /* Prevents overflow from image */
}

.page-casino__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1; /* Ensure content is above any potential background effects */
}

.page-casino__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-casino__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-casino__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    color: var(--page-casino-text-light);
}

.page-casino__hero-title {
    font-size: 52px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
    color: var(--page-casino-text-light); /* Ensure high contrast */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

.page-casino__hero-description {
    font-size: 22px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #e0e0e0; /* Slightly lighter for readability */
}

.page-casino__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Ensure buttons wrap on smaller screens */
}

/* Buttons */
.page-casino__cta-button,
.page-casino__btn-primary,
.page-casino__btn-secondary,
.page-casino__btn-link {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    text-align: center;
}

.page-casino__btn-primary {
    background: var(--page-casino-secondary-color); /* Gold background */
    color: var(--page-casino-primary-color); /* Deep blue text */
    border: 2px solid var(--page-casino-secondary-color);
}

.page-casino__btn-primary:hover {
    background: #e6c200; /* Slightly darker gold */
    border-color: #e6c200;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.page-casino__btn-secondary {
    background: transparent;
    color: var(--page-casino-secondary-color); /* Gold text */
    border: 2px solid var(--page-casino-secondary-color);
}

.page-casino__btn-secondary:hover {
    background: var(--page-casino-secondary-color);
    color: var(--page-casino-primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.page-casino__btn-link {
    background: none;
    border: none;
    color: var(--page-casino-primary-color);
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    text-decoration: underline;
    margin-top: 10px;
}

.page-casino__btn-link:hover {
    color: var(--page-casino-secondary-color);
    text-decoration: none;
}

.page-casino__button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-casino__button-group--center {
    justify-content: center;
}

/* Section specific styles */
.page-casino__intro-section,
.page-casino__promotions-section,
.page-casino__faq-section {
    padding: 80px 0;
    background-color: var(--page-casino-bg-light); /* Light background */
    color: var(--page-casino-text-dark);
}

.page-casino__games-section,
.page-casino__security-section,
.page-casino__blog-section {
    padding: 80px 0;
    background-color: var(--page-casino-bg-dark); /* Dark blue background */
    color: var(--page-casino-text-light);
}

.page-casino__games-section .page-casino__section-title,
.page-casino__security-section .page-casino__section-title,
.page-casino__blog-section .page-casino__section-title {
    color: var(--page-casino-secondary-color); /* Gold title on dark background */
}

.page-casino__games-section .page-casino__text-block,
.page-casino__security-section .page-casino__text-block,
.page-casino__blog-section .page-casino__text-block {
    color: #e0e0e0; /* Lighter text on dark background */
}

/* Game Grid */
.page-casino__game-grid,
.page-casino__promo-grid,
.page-casino__blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.page-casino__game-card,
.page-casino__promo-card,
.page-casino__blog-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--page-casino-text-dark);
}

.page-casino__game-card:hover,
.page-casino__promo-card:hover,
.page-casino__blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.page-casino__game-card img,
.page-casino__promo-card img,
.page-casino__blog-card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--page-casino-border-color);
}

.page-casino__card-title {
    font-size: 22px;
    font-weight: bold;
    margin: 20px 20px 10px;
    color: var(--page-casino-primary-color);
    line-height: 1.3;
}

.page-casino__card-title a {
    color: var(--page-casino-primary-color);
    text-decoration: none;
}

.page-casino__card-title a:hover {
    color: var(--page-casino-secondary-color);
    text-decoration: underline;
}

.page-casino__game-card p,
.page-casino__promo-card p,
.page-casino__blog-card p {
    font-size: 16px;
    padding: 0 20px 20px;
    flex-grow: 1; /* Make paragraphs take available space */
}

/* Security Features */
.page-casino__security-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
    text-align: center;
}

.page-casino__feature-item {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--page-casino-text-light);
}

.page-casino__feature-item img {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
}

.page-casino__feature-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--page-casino-secondary-color); /* Gold title */
}

.page-casino__feature-item p {
    font-size: 16px;
    line-height: 1.6;
    color: #e0e0e0;
}

/* FAQ Section */
.page-casino__faq-image-wrapper {
    text-align: center;
    margin-bottom: 40px;
}
.page-casino__faq-image-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.page-casino__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-casino__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.page-casino__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #ffffff;
    border: 1px solid var(--page-casino-border-color);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-casino__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-casino__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--page-casino-primary-color);
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-casino__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: var(--page-casino-primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.page-casino__faq-item.active .page-casino__faq-toggle {
    color: var(--page-casino-secondary-color);
    transform: rotate(45deg); /* Rotate for minus sign effect */
}

.page-casino__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 25px;
    opacity: 0;
    background: #fefefe;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.page-casino__faq-item.active .page-casino__faq-answer {
    max-height: 2000px !important; /* Ensure it expands fully */
    padding: 20px 25px !important;
    opacity: 1;
    border: 1px solid var(--page-casino-border-color);
    border-top: none;
}

.page-casino__faq-answer p {
    margin: 0;
    font-size: 16px;
    color: var(--page-casino-text-dark);
}

/* Blog Section - similar to game cards but with a link button */
.page-casino__blog-card {
    background: #ffffff; /* Light background for blog cards on dark section */
    color: var(--page-casino-text-dark);
}

.page-casino__blog-card .page-casino__card-title a {
    color: var(--page-casino-primary-color);
}
.page-casino__blog-card .page-casino__card-title a:hover {
    color: var(--page-casino-secondary-color);
}
.page-casino__blog-card p {
    color: var(--page-casino-text-dark);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-casino__hero-title {
        font-size: 44px;
    }
    .page-casino__hero-description {
        font-size: 20px;
    }
    .page-casino__section-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .page-casino__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-casino__hero-title {
        font-size: 36px;
    }
    .page-casino__hero-description {
        font-size: 18px;
    }
    .page-casino__hero-image img {
        border-radius: 8px;
    }

    .page-casino__hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-casino__cta-button,
    .page-casino__btn-primary,
    .page-casino__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 25px;
        font-size: 16px;
    }

    .page-casino__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .page-casino__text-block {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .page-casino__intro-section,
    .page-casino__games-section,
    .page-casino__promotions-section,
    .page-casino__security-section,
    .page-casino__faq-section,
    .page-casino__blog-section {
        padding: 50px 0;
    }

    .page-casino__game-grid,
    .page-casino__promo-grid,
    .page-casino__blog-grid,
    .page-casino__security-features {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 30px;
    }

    .page-casino__game-card img,
    .page-casino__promo-card img,
    .page-casino__blog-card img {
        
    }

    .page-casino__card-title {
        font-size: 20px;
        margin: 15px 15px 8px;
    }
    .page-casino__game-card p,
    .page-casino__promo-card p,
    .page-casino__blog-card p {
        padding: 0 15px 15px;
        font-size: 15px;
    }

    .page-casino__feature-title {
        font-size: 20px;
    }
    .page-casino__feature-item p {
        font-size: 15px;
    }

    .page-casino__faq-question {
        padding: 15px 20px;
    }
    .page-casino__faq-question h3 {
        font-size: 16px;
    }
    .page-casino__faq-toggle {
        font-size: 24px;
        width: 26px;
        height: 26px;
    }
    .page-casino__faq-answer {
        padding: 0 20px;
    }
    .page-casino__faq-item.active .page-casino__faq-answer {
        padding: 15px 20px !important;
    }
    .page-casino__faq-answer p {
        font-size: 15px;
    }
    
    /* Ensure all images are responsive in mobile */
    .page-casino img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-casino__container,
    .page-casino__game-card,
    .page-casino__promo-card,
    .page-casino__blog-card,
    .page-casino__feature-item,
    .page-casino__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-casino__button-group {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
    }
    .page-casino__button-group .page-casino__btn-primary,
    .page-casino__button-group .page-casino__btn-secondary {
        width: 100%;
        max-width: 100%;
    }
}

/* Color contrast fixes for specific sections/elements if needed */
.page-casino__dark-bg .page-casino__game-card,
.page-casino__dark-bg .page-casino__promo-card,
.page-casino__dark-bg .page-casino__blog-card {
    background: #ffffff; /* Always use light background for cards on dark sections */
    color: var(--page-casino-text-dark);
}
.page-casino__dark-bg .page-casino__card-title a {
    color: var(--page-casino-primary-color);
}
.page-casino__dark-bg .page-casino__card-title a:hover {
    color: var(--page-casino-secondary-color);
}
.page-casino__dark-bg .page-casino__game-card p,
.page-casino__dark-bg .page-casino__promo-card p,
.page-casino__dark-bg .page-casino__blog-card p {
    color: var(--page-casino-text-dark);
}

.page-casino__dark-bg .page-casino__btn-link {
    color: var(--page-casino-primary-color);
}
.page-casino__dark-bg .page-casino__btn-link:hover {
    color: var(--page-casino-secondary-color);
}