/*
Theme Name: Antigravity Child
Theme URI: https://devriesstroopwafels.nl
Author: Antigravity
Description: A child theme of Twenty Twenty-Five for De Vries Stroopwafels.
Template: twentytwentyfive
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
*/

/* --- GLOBAL RESET & TYPOGRAPHY --- */
/* Global typography, colors and layout defaults are managed in theme.json */

.card {
    overflow: hidden !important;
}

/* --- CARD GRID SYSTEM --- */
/* Forces columns to equal height */
.wp-block-columns.is-style-card-grid {
    align-items: stretch !important;
    gap: var(--wp--preset--spacing--lg) !important;
}

.wp-block-column.is-style-card-item,
.card {
    display: flex !important;
    flex-direction: column !important;
    background: var(--wp--preset--color--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    height: 100%;
}

/* Internal card spacing */
.wp-block-column.is-style-card-item .wp-block-group {
    padding: var(--wp--preset--spacing--lg) !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Push button to bottom */
.wp-block-column.is-style-card-item .wp-block-buttons {
    margin-top: auto !important;
    padding-top: var(--wp--preset--spacing--sm);
}

/* Global Contrast Rules: Automatic High-Contrast Text for Colored Backgrounds */
.has-primary-background-color,
.has-primary-background-color h1,
.has-primary-background-color h2,
.has-primary-background-color h3,
.has-primary-background-color h4,
.has-primary-background-color h5,
.has-primary-background-color h6,
.has-primary-background-color p,
.has-primary-background-color li,
.has-primary-background-color a:not(.wp-block-button__link) {
    color: var(--wp--preset--color--white) !important;
}

.has-secondary-background-color,
.has-secondary-background-color h1,
.has-secondary-background-color h2,
.has-secondary-background-color h3,
.has-secondary-background-color h4,
.has-secondary-background-color h5,
.has-secondary-background-color h6,
.has-secondary-background-color p,
.has-secondary-background-color li,
.has-secondary-background-color a:not(.wp-block-button__link) {
    color: var(--wp--preset--color--white) !important;
}

/* Ensure headings on tertiary (cream) or white backgrounds use the Primary color if not specified otherwise */
:where(.has-tertiary-background-color, .has-white-background-color, body) h1,
:where(.has-tertiary-background-color, .has-white-background-color, body) h2,
:where(.has-tertiary-background-color, .has-white-background-color, body) h3,
:where(.has-tertiary-background-color, .has-white-background-color, body) h4 {
    color: var(--wp--preset--color--primary);
}

/* --- VISUAL POLISH & ANIMATIONS --- */

/* Smooth Transitions */
a,
button,
.wp-block-button__link,
.wp-block-column.is-style-card-item,
.card {
    transition: all 0.3s ease;
}

/* Card Hover Effects - The "Slick" Feel */
.wp-block-column.is-style-card-item:hover,
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(122, 46, 42, 0.15) !important;
    /* Maroon hint shadow */
}

/* Button Interactions */
.wp-block-button__link:hover {
    transform: scale(1.05);
    /* Subtle pop */
    filter: brightness(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Typography Polish */
h1,
h2,
h3 {
    letter-spacing: -0.5px;
    /* Tighter, more modern heading tracking */
}

p {
    opacity: 0.9;
    /* Slightly softer text for readability */
}

/* Header Navigation Polish */
.wp-block-navigation-item__content:hover {
    color: var(--secondary-color) !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Custom "Pill" Badge for Top Bar */
.wp-block-group.has-primary-background-color p {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* --- FIX FOR RECOVER BLOCK ERRORS aka "The layout-flex fix" --- */
.is-layout-flex {
    display: flex;
    flex-wrap: wrap;
}

/* Mobile Polish */
@media (max-width: 782px) {
    .wp-block-columns.is-style-card-grid {
        gap: 1.5rem !important;
    }
}


@media (max-width: 786px) {
    .wp-block-buttons{
        margin-left: auto !important;
        margin-right: auto !important; 
    }
}
