/* style/casino-popular-games.css */

/* Variables for consistent styling based on provided palette */
:root {
    --ph365-primary: #F2C14E;
    --ph365-secondary: #FFD36B;
    --ph365-bg-card: #111111;
    --ph365-bg-main: #0A0A0A;
    --ph365-text-main: #FFF6D6;
    --ph365-border: #3A2A12;
    --ph365-glow: #FFD36B;
    --ph365-button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    --text-dark: #333333; /* For light backgrounds */
    --text-light: #ffffff; /* For dark backgrounds */
}

/* Base styles for the page content */
.page-casino-popular-games {
    background-color: var(--ph365-bg-main); /* Deep dark background */
    color: var(--ph365-text-main); /* Light text for contrast */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-bottom: 40px; /* General padding for content below sections */
}

/* General container for content alignment */
.page-casino-popular-games__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Section padding */
.page-casino-popular-games__section {
    padding: 60px 0;
}

/* Specific padding for the first section to account for fixed header */
.page-casino-popular-games__hero-section {
    padding-top: var(--header-offset, 120px); /* Desktop: 120px, Mobile: adjusted by shared.css */
    position: relative;
    overflow: hidden; /* To contain absolute positioned elements if any */
    background: var(--ph365-bg-main); /* Ensure dark background for the hero */
}

/* Hero Section Styles */
.page-casino-popular-games__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.page-casino-popular-games__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4); /* Darken image for text readability */
}

.page-casino-popular-games__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 80px 20px; /* Adjust padding to keep content centered */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px; /* Ensure some height even without image */
}

.page-casino-popular-games__main-title {
    font-size: clamp(2.5rem, 5vw, 4rem); /* Responsive font size for H1 */
    color: var(--ph365-text-main);
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 211, 107, 0.5);
}

.page-casino-popular-games__hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--ph365-text-main);
    margin-bottom: 40px;
    max-width: 700px;
}

.page-casino-popular-games__hero-cta-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    justify-content: center;
}

/* General Button Styles */
.page-casino-popular-games__btn-primary,
.page-casino-popular-games__btn-secondary,
.page-casino-popular-games__game-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent; /* Default transparent border */
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
    max-width: 100%; /* Ensure buttons don't exceed container width */
}

.page-casino-popular-games__btn-primary {
    background: var(--ph365-button-gradient);
    color: var(--text-light); /* White text on dark button */
    box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

.page-casino-popular-games__btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(242, 193, 78, 0.6);
}

.page-casino-popular-games__btn-secondary {
    background: transparent;
    color: var(--ph365-primary);
    border-color: var(--ph365-primary);
}

.page-casino-popular-games__btn-secondary:hover {
    background: var(--ph365-primary);
    color: var(--text-light);
    box-shadow: 0 4px 10px rgba(242, 193, 78, 0.3);
}

/* Section Titles and Descriptions */
.page-casino-popular-games__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--ph365-text-main);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-casino-popular-games__section-description {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    color: var(--ph365-text-main);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* Why ph365 Section */
.page-casino-popular-games__why-ph365-section {
    background-color: var(--ph365-bg-main);
}

.page-casino-popular-games__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-casino-popular-games__feature-item {
    background-color: var(--ph365-bg-card);
    border: 1px solid var(--ph365-border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-casino-popular-games__feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-casino-popular-games__feature-icon {
    width: 200px; /* Adjusted to meet minimum size requirement */
    height: 200px; /* Adjusted to meet minimum size requirement */
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 5px var(--ph365-glow));
}

.page-casino-popular-games__feature-title {
    font-size: 1.4rem;
    color: var(--ph365-primary);
    margin-bottom: 10px;
}

.page-casino-popular-games__feature-text {
    font-size: 1rem;
    color: var(--ph365-text-main);
}

/* Game Categories Section */
.page-casino-popular-games__game-categories-section {
    background-color: var(--ph365-bg-card);
    border-top: 1px solid var(--ph365-border);
    border-bottom: 1px solid var(--ph365-border);
}

.page-casino-popular-games__categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 40px;
    justify-items: center;
}

.page-casino-popular-games__category-card {
    background-color: var(--ph365-bg-main);
    border: 1px solid var(--ph365-border);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--ph365-text-main);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 180px; /* Constrain card width */
    box-sizing: border-box;
}

.page-casino-popular-games__category-card:hover {
    background-color: rgba(242, 193, 78, 0.1);
    border-color: var(--ph365-primary);
    transform: translateY(-3px);
}

.page-casino-popular-games__category-icon {
    width: 30px; /* Exception: 30x30px allowed for category icons */
    height: 30px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 3px var(--ph365-glow));
}

.page-casino-popular-games__category-name {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

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

/* Featured Games Section */
.page-casino-popular-games__featured-games-section {
    background-color: var(--ph365-bg-main);
}

.page-casino-popular-games__games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-casino-popular-games__game-card {
    background-color: var(--ph365-bg-card);
    border: 1px solid var(--ph365-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-casino-popular-games__game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-casino-popular-games__game-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency, will be object-fit: cover */
    object-fit: cover;
    border-bottom: 1px solid var(--ph365-border);
}

.page-casino-popular-games__game-title {
    font-size: 1.3rem;
    color: var(--ph365-primary);
    padding: 15px 20px 5px;
}

.page-casino-popular-games__game-description {
    font-size: 0.95rem;
    color: var(--ph365-text-main);
    padding: 0 20px 15px;
    flex-grow: 1; /* Push button to bottom */
}

.page-casino-popular-games__game-play-btn {
    margin: 0 20px 20px;
    width: calc(100% - 40px);
    background: var(--ph365-button-gradient);
    color: var(--text-light);
    box-shadow: 0 4px 10px rgba(242, 193, 78, 0.4);
}

.page-casino-popular-games__game-play-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 15px rgba(242, 193, 78, 0.6);
}

/* Promotions Section */
.page-casino-popular-games__promotions-section {
    background-color: var(--ph365-bg-card);
    border-top: 1px solid var(--ph365-border);
}

.page-casino-popular-games__promotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-casino-popular-games__promo-card {
    background-color: var(--ph365-bg-main);
    border: 1px solid var(--ph365-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-casino-popular-games__promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-casino-popular-games__promo-image {
    width: 100%;
    height: 250px; /* Fixed height for promo images */
    object-fit: cover;
    border-bottom: 1px solid var(--ph365-border);
}

.page-casino-popular-games__promo-title {
    font-size: 1.3rem;
    color: var(--ph365-primary);
    padding: 15px 20px 5px;
}

.page-casino-popular-games__promo-text {
    font-size: 0.95rem;
    color: var(--ph365-text-main);
    padding: 0 20px 15px;
    flex-grow: 1;
}

.page-casino-popular-games__promo-card .page-casino-popular-games__btn-primary,
.page-casino-popular-games__promo-card .page-casino-popular-games__btn-secondary {
    margin: 0 20px 20px;
    width: calc(100% - 40px);
}

/* CTA Section */
.page-casino-popular-games__cta-section {
    background-color: var(--ph365-bg-main);
    text-align: center;
}

.page-casino-popular-games__dark-section {
    background-color: var(--ph365-bg-card); /* Slightly lighter dark for differentiation */
    border-top: 1px solid var(--ph365-border);
    border-bottom: 1px solid var(--ph365-border);
}

.page-casino-popular-games__cta-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-casino-popular-games__cta-step-item {
    background-color: var(--ph365-bg-main);
    border: 1px solid var(--ph365-border);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}