/**
 * Gutenberg Block Styles for Gambling Light Theme
 * Ensures consistent appearance for all WordPress blocks
 */

/* Hero/Cover Blocks */
.wp-block-cover {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.wp-block-cover__inner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.wp-block-cover h1,
.wp-block-cover h2 {
    color: #ffffff !important;
    margin-bottom: 1rem;
}

.wp-block-cover p {
    color: #ffffff !important;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

/* Group Blocks */
.wp-block-group {
    padding: 2rem 1rem;
    margin-bottom: 2rem;
}

.wp-block-group.has-background {
    padding: 2rem;
    border-radius: 0.5rem;
}

/* Columns */
.wp-block-columns {
    margin-bottom: 2rem;
    gap: 2rem;
}

.wp-block-column {
    flex-basis: calc(33.33% - 1.33rem);
}

@media (max-width: 768px) {
    .wp-block-columns {
        flex-direction: column;
    }
    
    .wp-block-column {
        flex-basis: 100%;
        margin-bottom: 1.5rem;
    }
}

/* Headings */
.wp-block-heading,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #1f2937;
}

.entry-content h1 { font-size: 2.5rem; }
.entry-content h2 { font-size: 2rem; }
.entry-content h3 { font-size: 1.5rem; }
.entry-content h4 { font-size: 1.25rem; }
.entry-content h5 { font-size: 1.125rem; }
.entry-content h6 { font-size: 1rem; }

/* Paragraphs */
.wp-block-paragraph,
.entry-content p {
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

/* Buttons */
.wp-block-buttons {
    margin: 2rem 0;
}

.wp-block-button__link {
    background-color: var(--color-primary, #B22222);
    color: #ffffff;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.wp-block-button__link:hover {
    background-color: var(--color-primary-dark, #8B0000);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Separator */
.wp-block-separator {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

.wp-block-separator.is-style-wide {
    width: 100%;
}

/* Lists */
.entry-content ul,
.entry-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.entry-content ul li,
.entry-content ol li {
    margin-bottom: 0.5rem;
}

/* Feature Cards in Groups */
.wp-block-group .wp-block-column {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.wp-block-group .wp-block-column:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Text Alignment */
.has-text-align-center {
    text-align: center;
}

.has-text-align-left {
    text-align: left;
}

.has-text-align-right {
    text-align: right;
}

/* Background Colors */
.has-light-gray-background-color {
    background-color: #f9fafb !important;
}

.has-white-background-color {
    background-color: #ffffff !important;
}

/* Font Sizes */
.has-small-font-size {
    font-size: 0.875rem;
}

.has-medium-font-size {
    font-size: 1.125rem;
}

.has-large-font-size {
    font-size: 1.5rem;
}

.has-x-large-font-size {
    font-size: 2rem;
    font-weight: 600;
}

/* FAQ Specific Styles */
.wp-block-group h3 {
    color: #1f2937;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.wp-block-group p {
    color: #4b5563;
    line-height: 1.6;
}

/* Offers/CTA Blocks with Custom Backgrounds */
.wp-block-cover[style*="background-color:#B22222"],
.wp-block-cover[style*="background-color:#b22222"] {
    background: linear-gradient(135deg, #B22222 0%, #8B0000 100%) !important;
}

/* Container Width */
.entry-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Responsive Images */
.wp-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

/* Cards and Offer Blocks */
.has-background {
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

/* Strong emphasis */
.entry-content strong {
    font-weight: 600;
    color: #111827;
}

/* Links */
.entry-content a {
    color: var(--color-primary, #B22222);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.entry-content a:hover {
    color: var(--color-primary-dark, #8B0000);
}

/* Utility Classes */
.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.alignwide {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Details Block Fallback (for older WP versions) */
details {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background: #ffffff;
}

details summary {
    font-weight: 600;
    cursor: pointer;
    color: #1f2937;
    padding: 0.5rem 0;
}

details[open] summary {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .entry-content h1 { font-size: 1.875rem; }
    .entry-content h2 { font-size: 1.5rem; }
    .entry-content h3 { font-size: 1.25rem; }
    
    .wp-block-button__link {
        padding: 0.625rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .wp-block-cover {
        min-height: 300px;
    }
    
    .wp-block-group {
        padding: 1.5rem 1rem;
    }
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Fix inconsistent spacing */
.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

/* Ensure consistent line heights */
.entry-content * {
    line-height: inherit;
}

/* Fix nested group spacing */
.wp-block-group .wp-block-group {
    padding: 1rem;
    margin-bottom: 1rem;
}