/* ARWEBCMS - WordPress Gutenberg & Theme Compatibility Styles */

:root {
    --wp--preset--color--primary: #24407D;
    --wp--preset--color--secondary: #F7FBFC;
    --wp--preset--color--white: #ffffff;
    --wp--preset--color--black: #000000;
    --wp--preset--color--base: #202020;
    --wp--preset--color--contrast: #363333;
    
    --wp--preset--spacing--10: 1rem;
    --wp--preset--spacing--20: 1.5rem;
    --wp--preset--spacing--30: 2rem;
    --wp--preset--spacing--40: 2.5rem;
    --wp--preset--spacing--50: 3.5rem;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1e293b;
    background-color: #ffffff;
    line-height: 1.6;
}

/* Page Containers & Constraints */
.theme-patterns-wrapper, 
.wp-block-group.is-layout-constrained, 
.is-layout-constrained,
.container {
    max-width: 1340px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

@media (min-width: 1600px) {
    .theme-patterns-wrapper, 
    .wp-block-group.is-layout-constrained, 
    .is-layout-constrained,
    .container {
        max-width: 1540px;
    }
}

.wp-block-group {
    box-sizing: border-box;
}

/* Gutenberg Grid Layout for Services & Cards */
.services-section > .wp-block-group,
.wp-block-group[style*="type\":\"grid\""],
.is-layout-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 2rem !important;
    width: 100% !important;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Gutenberg Flex Columns */
.wp-block-columns {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2rem !important;
    width: 100% !important;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.wp-block-column {
    flex: 1 1 280px !important;
    min-width: 0;
}

/* Flex row items (Gutenberg Learn More + Arrow Image) */
.entry-content div[style*="type\":\"flex\""], 
.entry-content div[style*="display:flex"],
.wp-block-group:has(> img[src*="arrow"]),
.wp-block-group:has(> figure img[src*="arrow"]) {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
}

.wp-block-group img[src*="arrow"], 
figure.wp-block-image img[src*="arrow"] {
    display: inline-block !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

/* Cover & Hero Section Styles */
.wp-block-cover {
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 480px !important;
    box-sizing: border-box !important;
    border-radius: 12px;
    margin: 2rem 0;
    color: #ffffff;
}

.wp-block-cover__image-background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    z-index: 0 !important;
}

.wp-block-cover__background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
}

.wp-block-cover__inner-container {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 2rem !important;
}

/* Buttons */
.wp-block-buttons {
    display: flex !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    margin: 1.5rem 0 !important;
}

.wp-block-button__link {
    display: inline-block !important;
    background-color: var(--wp--preset--color--primary, #24407D) !important;
    color: #ffffff !important;
    padding: 0.85rem 2rem !important;
    border-radius: 30px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(36, 64, 125, 0.3) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(36, 64, 125, 0.4) !important;
}

/* Alignments & Colors */
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.alignwide {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

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

.has-text-align-center { text-align: center !important; }
.has-text-align-right { text-align: right !important; }
.has-text-align-left { text-align: left !important; }

/* Dynamic Theme Colors & Backgrounds */
.has-primary-color { color: var(--wp--preset--color--primary, #24407D) !important; }
.has-secondary-color { color: var(--wp--preset--color--secondary, #64748b) !important; }
.has-white-color, .has-white-color * { color: #ffffff !important; }
.has-black-color, .has-black-color * { color: #000000 !important; }

.has-black-background-color { background-color: #111111 !important; color: #ffffff !important; }
.has-white-text-color-background-color { background-color: #ffffff !important; }
.has-primary-background-color { background-color: var(--wp--preset--color--primary, #24407D) !important; }
.has-secondary-background-color { background-color: var(--wp--preset--color--secondary, #F7FBFC) !important; }
.has-background { box-sizing: border-box; }

/* Header & Flex Navigation Layouts */
#sticky-header .wp-block-group,
#sticky-header > div {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

#sticky-header .wp-block-navigation {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 2rem !important;
    margin: 0 !important;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.wp-post-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Anti-Spam Honeypot Trap */
.vh-trap {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}
