/*
 * Zim's Word Game Page Styles
 * Adapts Elementor content to fit within Django site's main content area
 * Preserves original WordPress styling while ensuring proper containment
 */

/* Import page-specific Elementor styles */
@import url('word_game_elementor.css');

/* Container for the word game page - fits within main content area */
.word-game-page {
    /* Ensure content doesn't exceed main area bounds */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Override Elementor full-width sections to fit within container */
.word-game-page .elementor-section-full_width {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Ensure sections have appropriate spacing */
.word-game-page .elementor-section {
    margin-bottom: 0;
}

/* Override any absolute positioning that might break layout */
.word-game-page .elementor-section-wrap {
    position: relative;
}

/* Ensure images scale properly within container */
.word-game-page img {
    max-width: 100%;
    height: auto;
}

/* Maintain background styling from original */
.word-game-page .elementor-section[data-settings*="background_background"] {
    /* Backgrounds are preserved from Elementor CSS */
}

/* Ensure text content is readable and properly spaced */
.word-game-page .elementor-text-editor {
    font-size: 1rem;
    line-height: 1.6;
}

/* Product badges section - center align */
.word-game-page .elementor-widget-image a {
    display: inline-block;
}

/* Preserve gradient backgrounds */
.word-game-page .elementor-section[data-settings*="gradient"] {
    /* Gradients preserved from Elementor CSS */
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .word-game-page {
        padding: 0 1rem;
    }

    /* Stack columns on mobile */
    .word-game-page .elementor-col-50 {
        width: 100% !important;
    }

    .word-game-page .elementor-col-25 {
        width: 50% !important;
    }

    /* Adjust image sizes on mobile */
    .word-game-page .elementor-image img {
        max-width: 100%;
    }
}

/* Ensure proper column gaps */
.word-game-page .elementor-column-gap-default > .elementor-row > .elementor-column > .elementor-element-populated {
    padding: 10px;
}

/* Typography adjustments */
.word-game-page h1.elementor-heading-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.word-game-page h3.elementor-heading-title,
.word-game-page h3.elementor-image-box-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.word-game-page h4.elementor-heading-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Image boxes for special tiles */
.word-game-page .elementor-image-box-wrapper {
    text-align: center;
}

.word-game-page .elementor-image-box-img img {
    max-width: 128px;
    margin: 0 auto;
}

.word-game-page .elementor-image-box-content {
    margin-top: 1rem;
}

.word-game-page .elementor-image-box-description {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Button and link styling */
.word-game-page a {
    color: inherit;
    text-decoration: none;
}

.word-game-page a:hover {
    opacity: 0.8;
}

/* Ensure proper spacing between sections */
.word-game-page .elementor-top-section {
    padding-top: 50px;
    padding-bottom: 50px;
}

/* Fix any overflow issues */
.word-game-page .elementor-container {
    overflow: hidden;
}

/* Preserve inline styles for special formatting */
.word-game-page p span[style] {
    /* Inline styles preserved from HTML */
}
