/*
 * Д-р Фани Михайлова - Custom Styles
 * Based on UX/UI Audit - 2024/2025 Design Trends
 * Pantone 2024: Peach Fuzz (#FFBE98)
 * Typography: PT Serif + PT Sans (optimal Cyrillic pairing)
 */

/* =========================================
   CSS VARIABLES (Design Tokens)
   ========================================= */
:root {
    /* Colors - WCAG AA Compliant */
    --color-primary: #FFBE98;
    /* Peach Fuzz - decorative only! */
    --color-primary-dark: #C08060;
    /* Darker peach for better contrast */
    --color-secondary: #2C3E50;
    /* Dark navy - main headings */
    --color-accent: #C05A40;
    /* Darker terracotta - better contrast */
    --color-accent-hover: #A04830;
    /* Even darker for hover */
    --color-background: #FEFCFA;
    /* Warmer white */
    --color-surface: #F5EDE8;
    /* Light surface */
    --color-text: #2D2D2D;
    /* Near-black for body text */
    --color-text-light: #555555;
    /* Dark gray - readable */
    --color-text-muted: #717171;
    /* Muted but still readable */
    --color-white: #FFFFFF;

    /* Typography - PT Fonts (designed for Cyrillic) */
    --font-heading: 'PT Serif', Georgia, serif;
    --font-body: 'PT Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(44, 62, 80, 0.08);
    --shadow-md: 0 4px 20px rgba(44, 62, 80, 0.12);
    --shadow-lg: 0 8px 40px rgba(44, 62, 80, 0.16);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 50%;
}

/* =========================================
   GLOBAL STYLES - Optimized for FullHD
   ========================================= */
body {
    font-family: var(--font-body);
    font-size: 16px;
    /* Reduced from 18px */
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
}

/* Better text rendering & consistent scaling */
html {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

/* Inline logo icon (replaces emojis) */
.inline-logo,
img.inline-logo {
    width: 24px !important;
    height: 24px !important;
    vertical-align: middle;
    margin-right: 6px;
    display: inline-block;
}

/* Smaller logo for inline text */
h3 .inline-logo,
h3 img.inline-logo {
    width: 20px !important;
    height: 20px !important;
}

/* Compact container */
.site-content,
.entry-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Remove extra space from Astra */
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post {
    padding: 1rem !important;
}

/* Typography - Optimized Hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    line-height: 1.22;
    margin-bottom: 0.45rem;
}

h1 {
    /* Slightly smaller for calmer, more professional hierarchy */
    font-size: clamp(1.5rem, 2.8vw, 1.9rem);
    font-weight: 700;
}

h2 {
    /* Section headings: reduce visual "shouting" across pages */
    font-size: clamp(1.1rem, 2.1vw, 1.3rem);
    font-weight: 600;
}

h3 {
    font-size: clamp(0.98rem, 1.7vw, 1.12rem);
    font-weight: 600;
}

/* Global typography rhythm inside content */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 1.05rem;
}

/* Improve long-form readability without affecting inner blocks/cards */
.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > blockquote {
    max-width: 72ch;
}

.entry-content > p {
    line-height: 1.62;
}

/* Desktop-only: book-like justified long-form paragraphs (with hyphenation) */
@media (min-width: 1025px) {
    .entry-content > p {
        text-align: justify;
        text-justify: inter-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }
}

.entry-content > ul,
.entry-content > ol {
    line-height: 1.62;
}

.entry-content > ul,
.entry-content > ol {
    padding-left: 1.15rem;
    margin-bottom: 0.95rem;
}

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

.entry-content > ul > li:last-child,
.entry-content > ol > li:last-child {
    margin-bottom: 0;
}

.entry-content li {
    overflow-wrap: anywhere;
}

.entry-content h1:first-child,
.entry-content h2:first-child,
.entry-content h3:first-child,
.entry-content h4:first-child {
    margin-top: 0;
}

.entry-content h2 {
    letter-spacing: -0.01em;
}

.entry-content h1 + p,
.entry-content h2 + p,
.entry-content h3 + p {
    margin-top: 0.28rem;
}

/* Global: tighten & standardize heading-to-content gaps */
.entry-content :is(h1, h2, h3, h4, h5, h6) {
    margin-bottom: 0.35rem;
}

.entry-content :is(h1, h2, h3, h4, h5, h6) + :is(
        p,
        ul,
        ol,
        blockquote,
        figure,
        .wp-block-image,
        .wp-block-columns,
        .wp-block-buttons,
        .wp-block-group
    ) {
    margin-top: 0.25rem !important;
}

/* WPForms: make vertical spacing more compact */
.wpforms-form .wpforms-field {
    margin-bottom: 0.85rem !important;
}

.wpforms-form .wpforms-field-label,
.wpforms-form legend.wpforms-field-label {
    margin-bottom: 0.3rem !important;
}

.page-id-7 .wpforms-form textarea {
    min-height: 140px;
}

/* Hide Name field sublabels ("First"/"Last") — we use placeholders instead */
#wpforms-35-field_1-container .wpforms-field-sublabel {
    display: none !important;
}

/* Subtitle with accent border - About page */
.wp-block-quote,
blockquote {
    font-size: 1rem !important;
    font-style: normal;
    border-left: 3px solid var(--color-accent);
    padding-left: 1rem;
    margin: 0.75rem 0;
    color: var(--color-text-light);
}

/* About page: personal mission quote (from Dr. Mihaylova) */
.page-id-5 blockquote.about-mission-quote {
    font-size: 1.08rem !important;
    line-height: 1.55;
    color: var(--color-secondary) !important;
    border-left-width: 4px;
    background: rgba(255, 190, 152, 0.10);
    border-radius: 14px;
    padding: 0.95rem 1.05rem;
}

.page-id-5 blockquote.about-mission-quote p {
    margin: 0;
    color: inherit;
}

p {
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

/* Make in-text links clearly recognizable (without affecting buttons/nav) */
.entry-content p a:not(.wp-block-button__link):not(.cta-btn),
.entry-content li a:not(.wp-block-button__link):not(.cta-btn) {
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.16em;
    text-decoration-color: rgba(192, 90, 64, 0.55);
}

.entry-content p a:not(.wp-block-button__link):not(.cta-btn):hover,
.entry-content li a:not(.wp-block-button__link):not(.cta-btn):hover {
    text-decoration-color: rgba(192, 90, 64, 0.9);
}

/* Links */
a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-hover);
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.site-header,
.ast-primary-header-bar {
    background: var(--color-white) !important;
    border-bottom: 1px solid rgba(44, 62, 80, 0.08) !important;
    box-shadow: var(--shadow-sm);
}

.site-title {
    font-family: var(--font-heading) !important;
    font-weight: 600 !important;
    color: var(--color-secondary) !important;
}

/* Navigation Links */
.main-navigation a,
.ast-header-break-point .main-navigation a {
    font-family: var(--font-body) !important;
    font-weight: 500 !important;
    color: var(--color-text) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast) !important;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--color-accent) !important;
    background: var(--color-surface) !important;
}

/* Fix: nav links should not stretch to full header height */
.ast-primary-header-bar .main-header-menu > .menu-item > .menu-link {
    height: auto !important;
    line-height: 1.4 !important;
    padding: 0.5rem 1rem !important;
    margin: auto 0;
}

.ast-desktop .ast-primary-header-bar .main-header-menu > .menu-item {
    line-height: normal !important;
    display: flex;
    align-items: center;
}

/* =========================================
   HERO SECTION - Optimized for viewport
   ========================================= */

/* Homepage hero: keep image, ensure text readable */
.page-id-4 .wp-block-cover__inner-container .hero-text-card {
    display: block;
    max-width: 760px;
    margin: 0.75rem auto 0;
    padding: 1.15rem 1.35rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 190, 152, 0.35);
    box-shadow: 0 18px 45px rgba(44, 62, 80, 0.22);
    backdrop-filter: blur(9px);
}

.page-id-4 .wp-block-cover__inner-container .hero-text-card p,
.page-id-4 .wp-block-cover__inner-container .hero-text-card h1 {
    text-shadow: 0 2px 16px rgba(44, 62, 80, 0.22);
}

.page-id-4 .wp-block-cover__inner-container .hero-text-card .wp-block-buttons {
    margin-top: 0.5rem;
}

.page-id-4 .wp-block-cover__inner-container .hero-text-card .wp-block-spacer {
    height: 14px !important;
}

/* CRITICAL: Override WordPress Cover block inline styles */
.wp-block-cover,
.wp-block-cover.alignfull,
.wp-block-cover[style*="min-height"] {
    min-height: 55vh !important;
    max-height: 550px !important;
}

/* Hide duplicate page title - Astra shows this automatically */
.entry-header,
.ast-archive-description,
h1.entry-title {
    display: none !important;
}

/* Remove extra spacing before hero */
.entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Reduce spacers */
.wp-block-spacer {
    /* Provide a sane default height, but DO NOT override inline heights */
    height: 30px !important;
}

.hero-section {
    position: relative;
    min-height: 55vh !important;
    max-height: 550px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-md) var(--space-md);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 190, 152, 0.4) 0%,
            rgba(44, 62, 80, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero-logo {
    width: 100px;
    height: 100px;
    margin-bottom: var(--space-sm);
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.2));
}

.hero-title {
    color: var(--color-white) !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: var(--space-xs);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

.hero-tagline {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-md);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn,
.wp-block-button__link,
button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none !important;
}

.btn-primary,
.wp-block-button__link {
    background: var(--color-accent) !important;
    color: var(--color-white) !important;
    box-shadow: 0 4px 15px rgba(224, 122, 95, 0.4);
}

.btn-primary:hover,
.wp-block-button__link:hover {
    background: var(--color-accent-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 122, 95, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-secondary:hover {
    background: var(--color-white);
    color: var(--color-secondary);
}

/* =========================================
   CARDS
   ========================================= */
.service-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid rgba(44, 62, 80, 0.05);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-card img {
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    transition: transform var(--transition-normal);
}

.service-card:hover img {
    transform: scale(1.03);
}

.service-card h3 {
    color: var(--color-secondary);
    margin-bottom: var(--space-xs);
}

.service-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Homepage service cards: prevent ugly mid-word breaks */
.page-id-4 .wp-block-columns .wp-block-column h3.wp-block-heading {
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
    text-wrap: balance;
}

@media (min-width: 1025px) {
    .page-id-4 .wp-block-columns .wp-block-column h3.wp-block-heading {
        /* Slightly smaller so single-word titles fit cleanly */
        font-size: 1.05rem !important;
        letter-spacing: -0.01em;
    }
}

/* Homepage: latest posts list — date inline after title (", January 26, 2026") */
.page-id-4 .wp-block-latest-posts__list.has-dates > li {
    margin-bottom: 0.7rem;
}

.page-id-4 .wp-block-latest-posts__list.has-dates > li:last-child {
    margin-bottom: 0;
}

.page-id-4 .wp-block-latest-posts__post-title {
    display: inline;
}

.page-id-4 .wp-block-latest-posts__list.has-dates .wp-block-latest-posts__post-title::after {
    content: ", ";
    color: var(--color-text-muted, #717171);
    font-weight: 400;
}

.page-id-4 .wp-block-latest-posts__post-date {
    display: inline;
    font-size: 0.9rem;
    color: var(--color-text-muted, #717171);
    white-space: nowrap;
}

/* =========================================
   SECTIONS - Reduced padding
   ========================================= */
section,
.wp-block-group {
    padding: var(--space-lg) var(--space-md);
}

.section-alt {
    background: var(--color-surface);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-md);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    margin: var(--space-xs) auto 0;
    border-radius: 2px;
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-lg);
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--color-primary);
    border-radius: var(--radius-lg);
    z-index: -1;
}

/* =========================================
   TESTIMONIALS
   ========================================= */
.testimonial {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.testimonial::before {
    content: '"';
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--color-primary);
    opacity: 0.3;
    position: absolute;
    top: 0;
    left: var(--space-sm);
    line-height: 1;
}

.testimonial-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
}

.testimonial-author {
    font-weight: 600;
    color: var(--color-text-light);
}

/* =========================================
   CONTACT SECTION
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.contact-info h3 {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-secondary);
}

.contact-info p {
    margin-left: 2rem;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    background: var(--color-secondary) !important;
    color: var(--color-white);
    padding: var(--space-md) var(--space-md);
}

.site-footer a {
    color: var(--color-primary);
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   RESPONSIVE - Desktop First Optimizations
   ========================================= */

/* Large screens - cap widths */
@media (min-width: 1400px) {
    .entry-content>* {
        max-width: 1200px;
    }

    .hero-section {
        max-height: 700px;
    }
}

/* Tablet landscape */
@media (max-width: 1024px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 4rem;
    }

    .wp-block-columns {
        flex-wrap: wrap;
    }

    .wp-block-column {
        flex-basis: calc(50% - 1rem) !important;
        margin-bottom: var(--space-sm);
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    :root {
        --space-md: 1.5rem;
        --space-lg: 2rem;
        --space-xl: 3rem;
    }

    .hero-section {
        min-height: 60vh;
        max-height: 500px;
        padding: var(--space-md) var(--space-sm);
    }

    .hero-logo {
        width: 70px;
        height: 70px;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .hero-tagline {
        font-size: 1.1rem;
        margin-bottom: var(--space-sm);
    }

    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 0.05em;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-image::before {
        display: none;
    }

    section,
    .wp-block-group {
        padding: var(--space-md) var(--space-sm);
    }

    .wp-block-column {
        flex-basis: 100% !important;
        padding: var(--space-sm);
    }

    /* Keep mobile/tablet typography consistent with global clamp scale */
    h1 { font-size: clamp(1.45rem, 5vw, 1.85rem); }
    h2 { font-size: clamp(1.08rem, 3.6vw, 1.25rem); }
    h3 { font-size: clamp(0.98rem, 3vw, 1.1rem); }
}

/* Mobile */
@media (max-width: 480px) {
    :root {
        --space-sm: 0.75rem;
        --space-md: 1rem;
        --space-lg: 1.5rem;
    }

    body {
        font-size: 16px;
    }

    .hero-section {
        min-height: 50vh;
        max-height: 400px;
    }

    .hero-logo {
        width: 60px;
        height: 60px;
    }

    .hero-title {
        font-size: 1.75rem !important;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .wp-block-button__link {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .wp-block-buttons {
        flex-direction: column;
        gap: 0.5rem !important;
    }
}

/* =========================================
   WORDPRESS OVERRIDES
   ========================================= */
.entry-content>* {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Equal height service cards */
.wp-block-columns {
    gap: var(--space-md) !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start !important;
}

.wp-block-column {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    display: flex !important;
    flex-direction: column;
    min-height: auto;
    /* Auto height based on content */
}

/* Image container with fixed aspect ratio - DEFAULT */
.wp-block-column .wp-block-image figure {
    margin: 0;
    height: 200px; /* Default for service cards */
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.wp-block-column .wp-block-image img {
    width: 100% !important;
    height: 200px !important; /* Default for service cards */
    object-fit: cover !important;
    object-position: center;
    border-radius: var(--radius-sm);
}

/* OVERRIDE: Allow full height for profile images (About/Home) */
.page-id-5 .wp-block-column .wp-block-image figure,
.page-id-5 .wp-block-column .wp-block-image img,
.page-id-4 #za-men .wp-block-column .wp-block-image figure,
.page-id-4 #za-men .wp-block-column .wp-block-image img {
    height: auto !important;
    min-height: 0 !important;
    object-fit: contain !important; /* or cover if we want to fill width */
    max-height: none !important;
}

/* Ensure width fills container */
.page-id-5 .wp-block-column .wp-block-image img,
.page-id-4 #za-men .wp-block-column .wp-block-image img {
    width: 100% !important;
    object-fit: cover !important; /* ensure it covers the width */
}


.wp-block-column:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.wp-block-image img {
    border-radius: var(--radius-sm);
}

/* Remove default WordPress link underlines */
.entry-content a {
    text-decoration: none;
}

/* Logo in content */
.wp-block-image.aligncenter img {
    transition: transform var(--transition-normal);
}

.wp-block-image.aligncenter:hover img {
    transform: scale(1.05);
}

/* =========================================
   CONTRAST FIXES - Override inline styles
   ========================================= */

/* Fix Peach Fuzz text on light backgrounds */
.entry-content p[style*="#FFBE98"],
.entry-content h1[style*="#FFBE98"],
.entry-content h2[style*="#FFBE98"],
.entry-content h3[style*="#FFBE98"],
.entry-content span[style*="#FFBE98"],
p.has-text-color[style*="color:#FFBE98"],
.has-text-color[style*="ffbe98"] {
    color: var(--color-secondary) !important;
}

/* Subtitle styling - use accent border instead of light text */
.entry-content .has-large-font-size {
    color: var(--color-secondary) !important;
    border-left: 4px solid var(--color-primary);
    padding-left: 1rem;
    /* WP's "large" text is often too big; keep it professional and consistent */
    font-size: clamp(1.15rem, 2.1vw, 1.45rem) !important;
    line-height: 1.28 !important;
}

/* Fix light gray text that's too light */
p[style*="color:#6B6B6B"],
.has-text-color[style*="#6B6B6B"] {
    color: var(--color-text-light) !important;
}

/* Ensure all body text is readable */
.entry-content p,
.entry-content li,
.entry-content span {
    color: var(--color-text);
}

/* Headings should always be dark */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--color-secondary) !important;
}

/* Accent underline instead of colored text for emphasis */
.entry-content strong {
    color: inherit;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 1px;
}

/* Service cards text fix */
.wp-block-column p {
    color: var(--color-text-light) !important;
}

.wp-block-column h3 {
    color: var(--color-secondary) !important;
}

/* Blog post titles and excerpts */
.ast-article-post .entry-title a,
.entry-title a {
    color: var(--color-secondary) !important;
}

.ast-article-post .entry-title a:hover,
.entry-title a:hover {
    color: var(--color-accent) !important;
}

/* Blog post meta */
.entry-meta,
.entry-meta a {
    color: var(--color-text-muted) !important;
}

/* Decorative quote marks can stay Peach Fuzz (they're decorative) */
.testimonial::before,
blockquote::before {
    color: var(--color-primary) !important;
    opacity: 0.4;
}

/* Navigation current item - use underline instead of color */
.main-navigation .current-menu-item a {
    border-bottom: 3px solid var(--color-primary) !important;
    color: var(--color-secondary) !important;
}

/* =========================================
   UX IMPROVEMENTS - January 2026
   ========================================= */

/* =========================================
   MOBILE HAMBURGER MENU FIX
   ========================================= */
@media (max-width: 921px) {

    /* Show hamburger button */
    .ast-mobile-menu-buttons {
        display: flex !important;
    }

    .ast-button-wrap .menu-toggle,
    .ast-mobile-menu-trigger-minimal {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: var(--color-accent, #C05A40) !important;
        color: white !important;
        border: none !important;
        padding: 10px 15px !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        min-width: 44px;
        min-height: 44px;
    }

    .ast-button-wrap .menu-toggle:hover,
    .ast-mobile-menu-trigger-minimal:hover {
        background: var(--color-accent-hover, #A04830) !important;
    }

    /* Hide desktop menu on mobile */
    .main-header-menu,
    .ast-desktop-header-content .main-header-menu {
        display: none !important;
    }

    /* Mobile menu styling when open */
    .ast-mobile-popup-content .main-header-menu,
    .ast-mobile-header-content .main-header-menu,
    .toggled .main-header-menu {
        display: block !important;
        background: white !important;
        padding: 1rem !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        z-index: 9999;
    }

    .ast-mobile-popup-content .menu-item a,
    .ast-mobile-header-content .menu-item a,
    .toggled .menu-item a {
        display: block !important;
        padding: 14px 20px !important;
        border-bottom: 1px solid #eee !important;
        color: #2D2D2D !important;
        font-size: 1.1rem !important;
        text-align: left;
    }

    .ast-mobile-popup-content .menu-item a:hover,
    .ast-mobile-header-content .menu-item a:hover,
    .toggled .menu-item a:hover {
        background: #F5EDE8 !important;
        color: #C05A40 !important;
    }

    /* Hamburger icon styling */
    .ast-mobile-svg {
        fill: white !important;
        width: 22px !important;
        height: 22px !important;
    }

    /* Header adjustments for mobile */
    .ast-primary-header-bar {
        padding: 10px 15px !important;
    }

    .site-branding {
        max-width: 70%;
    }

    .site-title {
        font-size: 1.2rem !important;
    }
}

/* =========================================
   IMPROVED TEXT CONTRAST (WCAG Compliance)
   ========================================= */

/* Ensure minimum 4.5:1 contrast ratio */
:root {
    --color-text-improved: #1A1A1A;
    /* Darker for better contrast */
    --color-text-light-improved: #4A4A4A;
    /* Darker gray */
    --color-text-muted-improved: #666666;
    /* More readable muted */
}

body,
.entry-content p,
.entry-content li {
    color: var(--color-text-improved, #1A1A1A) !important;
}

.entry-content .has-text-color,
p.has-medium-font-size,
.wp-block-column p {
    color: var(--color-text-light-improved, #4A4A4A) !important;
}

/* Ensure links are distinguishable */
.entry-content a:not(.wp-block-button__link):not(.cta-btn):not(.article-card-btn) {
    color: #B85A3D !important;
    text-decoration: underline;
    text-decoration-color: rgba(184, 90, 61, 0.3);
    text-underline-offset: 3px;
}

.entry-content a:not(.wp-block-button__link):not(.cta-btn):not(.article-card-btn):hover {
    color: #8B4432 !important;
    text-decoration-color: #8B4432;
}

/* Services accordion CTA button */
.service-content .cta-btn,
.cta-btn {
    display: inline-block;
    background: #C05A40 !important;
    color: #FFFFFF !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.service-content .cta-btn:hover,
.cta-btn:hover {
    background: #A04830 !important;
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(160, 72, 48, 0.3);
}

/* =========================================
   ENHANCED FOOTER
   ========================================= */
.site-footer {
    background: linear-gradient(135deg, #2C3E50 0%, #1A252F 100%) !important;
    color: white !important;
    padding: 3rem 2rem 1.5rem !important;
}

.site-footer .site-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer a {
    color: #FFBE98 !important;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: white !important;
}

/* Footer columns styling */
.footer-widget-area {
    text-align: left;
}

.footer-widget-area h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #FFBE98;
    display: inline-block;
}

.footer-widget-area ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget-area li {
    margin-bottom: 0.5rem;
}

.footer-copyright {
    text-align: center;
    padding-top: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* =========================================
   SOCIAL MEDIA ICONS
   ========================================= */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 190, 152, 0.2);
    border-radius: 50%;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #FFBE98;
    transform: translateY(-3px);
}

/* =========================================
   CONTACT FORM STYLING
   ========================================= */
.contact-form {
    background: #F5EDE8;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2C3E50;
    font-size: 0.95rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0d5cc;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #C05A40;
    box-shadow: 0 0 0 3px rgba(192, 90, 64, 0.15);
}

.contact-form button[type="submit"] {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #C05A40 0%, #A04830 100%);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #A04830 0%, #8B3D28 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(160, 72, 48, 0.4);
}

/* =========================================
   GOOGLE MAPS EMBED
   ========================================= */
.google-map-embed {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.google-map-embed iframe {
    border: none;
    display: block;
}

/* =========================================
   TESTIMONIALS STYLING
   ========================================= */
.wp-block-column[style*="border-left: 4px solid"] {
    transition: all 0.3s ease;
}

.wp-block-column[style*="border-left: 4px solid"]:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Quote styling for testimonials */
.testimonial-quote {
    position: relative;
    padding-left: 2rem;
}

.testimonial-quote::before {
    content: "„";
    position: absolute;
    left: 0;
    top: -10px;
    font-size: 3rem;
    color: #FFBE98;
    font-family: Georgia, serif;
    line-height: 1;
}

/* =========================================
   WHY CHOOSE ME SECTION
   ========================================= */
.wp-block-heading[style*="background-color:#F5EDE8"] {
    border-radius: 12px;
    margin: 2rem 0;
}

/* Stats numbers */
.wp-block-column p strong[style*="font-size: 2rem"] {
    display: block;
    color: #C05A40;
    font-size: 2.5rem !important;
    line-height: 1.2;
}

/* About page (page_id=5): responsive "Why choose me" section */
.page-id-5 .about-highlights {
    padding: clamp(18px, 3vw, 30px) !important;
    margin: 1.5rem 0 !important;
}

.page-id-5 .about-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
}

.page-id-5 .about-stat-card {
    padding: 1.25rem !important;
}

.page-id-5 .about-stat-label {
    word-break: break-word;
    line-height: 1.25;
    text-wrap: balance;
}

@media (max-width: 900px) {
    .page-id-5 .about-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 520px) {
    .page-id-5 .about-stats-grid {
        grid-template-columns: 1fr !important;
    }
    .page-id-5 .about-stat-card {
        padding: 1.05rem !important;
    }
    .page-id-5 .about-stat-value {
        font-size: 2.15rem !important;
        line-height: 1.15;
    }
    .page-id-5 .about-features-list {
        text-align: left !important;
        line-height: 1.7 !important;
    }
}

/* =========================================
   BLOG IMPROVEMENTS
   ========================================= */

/* Category badges */
.cat-links a {
    display: inline-block;
    background: #F5EDE8;
    color: #2C3E50 !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 5px;
    transition: all 0.2s ease;
}

.cat-links a:hover {
    background: #FFBE98;
    color: #2C3E50 !important;
}

/* Featured image styling for posts */
.post-thumbnail img,
.wp-post-image {
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.post-thumbnail:hover img {
    transform: scale(1.02);
}

/* Article cards in archive */
.ast-article-post {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.ast-article-post:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

/* =========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================= */

/* Focus states for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(192, 90, 64, 0.5);
    outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
    outline: none;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #2C3E50;
    color: white;
    padding: 10px 20px;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================
   PRINT STYLES
   ========================================= */
@media print {

    .site-header,
    .site-footer,
    .main-navigation,
    .google-map-embed,
    .social-links,
    .wp-block-button {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: black;
        background: white;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}


/* =========================================
   ASTRA MOBILE MENU FIX - Force hamburger
   ========================================= */

/* Force mobile styles at 921px breakpoint */
@media (max-width: 921px) {

    /* Hide desktop navigation */
    .ast-desktop-header-content,
    .site-header-primary-section-left .ast-builder-menu-1,
    .ast-builder-menu-1 .main-header-menu {
        display: none !important;
    }

    /* Show mobile menu trigger */
    .ast-mobile-header-wrap {
        display: block !important;
    }

    .ast-mobile-menu-buttons {
        display: flex !important;
        align-items: center;
    }

    /* Style the hamburger button */
    .menu-toggle,
    .ast-mobile-menu-trigger-minimal,
    .ast-button-wrap .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: #C05A40 !important;
        color: #FFFFFF !important;
        border: none !important;
        border-radius: 8px !important;
        padding: 10px 14px !important;
        cursor: pointer !important;
        min-width: 44px;
        min-height: 44px;
        box-shadow: 0 2px 8px rgba(192, 90, 64, 0.3);
        transition: all 0.2s ease;
    }

    .menu-toggle:hover,
    .ast-mobile-menu-trigger-minimal:hover {
        background: #A04830 !important;
        transform: translateY(-1px);
    }

    /* Hamburger icon color */
    .ast-mobile-svg,
    .menu-toggle svg,
    .ast-mobile-menu-trigger-minimal svg {
        fill: #FFFFFF !important;
        width: 20px !important;
        height: 20px !important;
    }

    /* Mobile menu when opened */
    .ast-mobile-popup-drawer.active,
    .ast-mobile-header-content.ast-mobile-menu-active {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99999;
    }

    .ast-mobile-popup-inner {
        background: #FFFFFF;
        max-width: 300px;
        height: 100%;
        padding: 20px;
        overflow-y: auto;
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.2);
    }

    /* Mobile menu items */
    .ast-mobile-popup-content .menu-item,
    .ast-mobile-header-content .menu-item {
        border-bottom: 1px solid #F0E8E0;
    }

    .ast-mobile-popup-content .menu-item>a,
    .ast-mobile-header-content .menu-item>a {
        display: block !important;
        padding: 16px 0 !important;
        color: #2C3E50 !important;
        font-size: 1.1rem !important;
        font-weight: 500 !important;
        text-decoration: none !important;
    }

    .ast-mobile-popup-content .menu-item>a:hover,
    .ast-mobile-header-content .menu-item>a:hover {
        color: #C05A40 !important;
        padding-left: 10px !important;
    }

    /* Close button */
    .menu-toggle-close {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        background: #F5F5F5;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    /* Header adjustments */
    .ast-primary-header-bar {
        padding: 10px 15px !important;
    }

    .site-branding {
        max-width: 60%;
    }

    .site-title {
        font-size: 1.1rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Even smaller screens */
@media (max-width: 544px) {
    .site-title {
        font-size: 0.95rem !important;
    }

    .menu-toggle,
    .ast-mobile-menu-trigger-minimal {
        padding: 8px 12px !important;
        min-width: 40px;
        min-height: 40px;
    }
}


/* =========================================
   STATISTICS CARDS - Compact Height
   ========================================= */

/* Target the "Why choose me" section columns specifically */
.has-background .wp-block-columns .wp-block-column,
h2[style*="background-color:#F5EDE8"]+.wp-block-columns .wp-block-column,
.wp-block-columns:has(p strong[style*="font-size: 2rem"]) .wp-block-column {
    min-height: auto !important;
    padding: 1.5rem 1rem !important;
    text-align: center;
}

/* Statistics number styling - more compact */
.wp-block-column p.has-text-align-center {
    margin: 0 !important;
    padding: 0.5rem 0 !important;
}

/* General fix for About page columns without images */
.wp-block-columns:not(:has(.wp-block-image)) .wp-block-column {
    min-height: auto !important;
    padding: 1.25rem !important;
}

/* Specific fix for the statistics section on About page */
.entry-content .wp-block-columns[style*="padding-top:20px"] .wp-block-column,
.entry-content .wp-block-columns[style*="padding-bottom:20px"] .wp-block-column {
    min-height: unset !important;
    height: auto !important;
    padding: 1rem !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* For columns that only contain centered text (like stats) */
.wp-block-column:has(> p.has-text-align-center:only-child) {
    min-height: auto !important;
    padding: 1rem !important;
    background: var(--color-white) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

/* Stats number size */
.wp-block-column p strong {
    font-size: 2.2rem !important;
    color: #C05A40 !important;
    display: block;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

/* Stats label */
.wp-block-column p.has-text-align-center br+text,
.wp-block-column p.has-text-align-center {
    font-size: 0.95rem;
    color: #555 !important;
    line-height: 1.4;
}

/* Testimonials - also compact */
.wp-block-column[style*="border-left: 4px solid"] {
    min-height: auto !important;
    padding: 1.25rem !important;
}


/* =========================================
   STATISTICS CARDS - Compact Height
   ========================================= */

/* Target the "Why choose me" section columns specifically */
.has-background .wp-block-columns .wp-block-column,
h2[style*="background-color:#F5EDE8"]+.wp-block-columns .wp-block-column,
.wp-block-columns:has(p strong[style*="font-size: 2rem"]) .wp-block-column {
    min-height: auto !important;
    padding: 1.5rem 1rem !important;
    text-align: center;
}

/* Statistics number styling - more compact */
.wp-block-column p.has-text-align-center {
    margin: 0 !important;
    padding: 0.5rem 0 !important;
}

/* General fix for About page columns without images */
.wp-block-columns:not(:has(.wp-block-image)) .wp-block-column {
    min-height: auto !important;
    padding: 1.25rem !important;
}

/* Specific fix for the statistics section on About page */
.entry-content .wp-block-columns[style*="padding-top:20px"] .wp-block-column,
.entry-content .wp-block-columns[style*="padding-bottom:20px"] .wp-block-column {
    min-height: unset !important;
    height: auto !important;
    padding: 1rem !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* For columns that only contain centered text (like stats) */
.wp-block-column:has(> p.has-text-align-center:only-child) {
    min-height: auto !important;
    padding: 1rem !important;
    background: var(--color-white) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

/* Stats number size */
.wp-block-column p strong {
    font-size: 2.2rem !important;
    color: #C05A40 !important;
    display: block;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

/* Stats label */
.wp-block-column p.has-text-align-center br+text,
.wp-block-column p.has-text-align-center {
    font-size: 0.95rem;
    color: #555 !important;
    line-height: 1.4;
}

/* Testimonials - also compact */
.wp-block-column[style*="border-left: 4px solid"] {
    min-height: auto !important;
    padding: 1.25rem !important;
}


/* =========================================
   STATISTICS CARDS - Compact Height
   ========================================= */

/* Target the "Why choose me" section columns specifically */
.has-background .wp-block-columns .wp-block-column,
h2[style*="background-color:#F5EDE8"]+.wp-block-columns .wp-block-column,
.wp-block-columns:has(p strong[style*="font-size: 2rem"]) .wp-block-column {
    min-height: auto !important;
    padding: 1.5rem 1rem !important;
    text-align: center;
}

/* Statistics number styling - more compact */
.wp-block-column p.has-text-align-center {
    margin: 0 !important;
    padding: 0.5rem 0 !important;
}

/* General fix for About page columns without images */
.wp-block-columns:not(:has(.wp-block-image)) .wp-block-column {
    min-height: auto !important;
    padding: 1.25rem !important;
}

/* Specific fix for the statistics section on About page */
.entry-content .wp-block-columns[style*="padding-top:20px"] .wp-block-column,
.entry-content .wp-block-columns[style*="padding-bottom:20px"] .wp-block-column {
    min-height: unset !important;
    height: auto !important;
    padding: 1rem !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* For columns that only contain centered text (like stats) */
.wp-block-column:has(> p.has-text-align-center:only-child) {
    min-height: auto !important;
    padding: 1rem !important;
    background: var(--color-white) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

/* Stats number size */
.wp-block-column p strong {
    font-size: 2.2rem !important;
    color: #C05A40 !important;
    display: block;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

/* Stats label */
.wp-block-column p.has-text-align-center br+text,
.wp-block-column p.has-text-align-center {
    font-size: 0.95rem;
    color: #555 !important;
    line-height: 1.4;
}

/* Testimonials - also compact */
.wp-block-column[style*="border-left: 4px solid"] {
    min-height: auto !important;
    padding: 1.25rem !important;
}

/* =========================================
   CRITICAL FIX: Force proper card heights
   This overrides all previous min-height rules
   ========================================= */
.wp-block-column {
    min-height: 0 !important;
    height: auto !important;
}

.wp-block-columns {
    align-items: stretch !important;
}

/* =========================================
   ARTICLE EXCERPTS - Ellipsis for truncated text
   ========================================= */

/* Force ellipsis on excerpt paragraphs - override Astra's flow-root */
.ast-excerpt-container p {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 4.8em !important;
    line-height: 1.6 !important;
}

/* Align all titles to same height (2 lines max) */
.entry-title.ast-blog-single-element {
    min-height: 3em;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ensure "Read more" link is visible */
.ast-read-more-container {
    display: block !important;
    margin-top: 0.75rem;
}

.ast-read-more-container a {
    color: var(--color-accent, #C05A40) !important;
    font-weight: 600;
    text-decoration: none;
}

.ast-read-more-container a:hover {
    text-decoration: underline;
}

/* =========================================
   CONTACT PAGE - Location cards typography
   ========================================= */
.contact-locations .wp-block-column {
    padding: 1.5rem !important;
}

.contact-locations h3 {
    font-size: 1.25rem !important;
    color: var(--color-secondary, #2C3E50) !important;
    margin-bottom: 1rem !important;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary, #FFBE98);
}

.location-name {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--color-accent, #C05A40) !important;
    margin-bottom: 0.25rem !important;
}

.location-address {
    font-size: 0.95rem !important;
    color: var(--color-text, #2D2D2D) !important;
    margin-bottom: 0.75rem !important;
}

.location-contact {
    font-size: 0.9rem !important;
    color: var(--color-text-light, #555) !important;
}

.location-note {
    font-size: 0.85rem !important;
    color: var(--color-text-muted, #717171) !important;
    font-style: italic;
}

/* =========================================
   CONTACTS PAGE - Best layout + map switcher
   ========================================= */
.contacts-top {
    gap: 1.25rem !important;
    align-items: stretch;
}

.office-picker {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.office-card {
    text-align: left;
    border: 1px solid rgba(44, 62, 80, 0.12);
    border-radius: 14px;
    background: #fff;
    padding: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.office-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(44, 62, 80, 0.12);
    border-color: rgba(192, 90, 64, 0.35);
}

.office-card.is-active {
    border-color: rgba(192, 90, 64, 0.8);
    box-shadow: 0 14px 34px rgba(192, 90, 64, 0.18);
}

.office-card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-secondary);
    margin-bottom: 0.2rem;
    font-weight: 700;
}

.office-card-meta {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.office-card-address {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.4;
}

.office-card-actions {
    margin-top: 0.75rem;
}

.office-pill {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(192, 90, 64, 0.10);
    color: var(--color-accent);
}

.contacts-quick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}

.contacts-quick-item {
    background: rgba(255, 190, 152, 0.16);
    border: 1px solid rgba(44, 62, 80, 0.10);
    border-radius: 14px;
    padding: 0.9rem 1rem;
}

.contacts-quick-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.contacts-quick-value {
    font-weight: 700;
    color: var(--color-secondary) !important;
    text-decoration: none !important;
}

.office-map {
    background: #fff;
    border: 1px solid rgba(44, 62, 80, 0.12);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(44, 62, 80, 0.10);
}

.office-map-header {
    display: none !important;
}

.office-map-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-secondary);
    line-height: 1.2;
}

.office-map-address {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
}

.office-map-link {
    white-space: nowrap;
    font-weight: 700;
    color: var(--color-accent) !important;
    text-decoration: none !important;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(44, 62, 80, 0.10);
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    box-shadow: 0 8px 18px rgba(44, 62, 80, 0.12);
    backdrop-filter: blur(6px);
}

.office-map-frame {
    aspect-ratio: 16 / 10;
    position: relative;
}

.office-map-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* WPForms styling (Contact form) */
.wpforms-container,
.wpforms-container-full {
    background: #fff;
    border: 1px solid rgba(44, 62, 80, 0.12);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 10px 28px rgba(44, 62, 80, 0.10);
}

/* Contact form helper text above the form */
.contact-form-hint {
    background: rgba(255, 190, 152, 0.14);
    border: 1px solid rgba(44, 62, 80, 0.10);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    margin: 0.75rem 0 1rem;
}

.contact-form-hint ul {
    color: var(--color-text, #2D2D2D);
}

.wpforms-form label {
    font-weight: 700 !important;
    color: var(--color-secondary) !important;
}

.wpforms-form input[type="text"],
.wpforms-form input[type="email"],
.wpforms-form input[type="tel"],
.wpforms-form textarea,
.wpforms-form select {
    border: 2px solid rgba(44, 62, 80, 0.14) !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    font-size: 1rem !important;
}

/* Fix: WPForms select value looks vertically clipped */
.wpforms-form select {
    height: 48px !important;
    padding: 0 44px 0 14px !important; /* room for native arrow */
    line-height: 48px !important;
    background-position: right 14px center !important;
    background-size: 14px 14px !important;
}

.wpforms-form select option {
    line-height: 1.25;
}

.wpforms-form input:focus,
.wpforms-form textarea:focus,
.wpforms-form select:focus {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 3px rgba(192, 90, 64, 0.15) !important;
}

.wpforms-submit-container button[type="submit"] {
    background: var(--color-accent) !important;
    color: #fff !important;
    border-radius: 12px !important;
    padding: 0.85rem 1.25rem !important;
    font-weight: 800 !important;
    border: none !important;
}

.wpforms-submit-container button[type="submit"]:hover {
    background: var(--color-accent-hover) !important;
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .contacts-quick { grid-template-columns: 1fr; }
    .office-map-frame { aspect-ratio: 16 / 12; }
}

/* =========================================
   CONTACTS PAGE - Space optimization
   ========================================= */
.page-id-7 .entry-content h1,
.page-id-7 .entry-content h2 {
    margin-top: 1.25rem !important;
    margin-bottom: 0.75rem !important;
}

/* Contacts H1: slightly smaller for better hierarchy */
.page-id-7 h1.page-title {
    font-size: clamp(1.45rem, 2.4vw, 1.85rem) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.01em;
}

.page-id-7 .entry-content h1 + p {
    margin-top: 0.25rem !important;
    margin-bottom: 1rem !important;
}

/* Reduce forced spacer height on contacts page */
.page-id-7 .wp-block-spacer {
    height: 18px !important;
}

/* Tighten cards a bit */
.page-id-7 .office-card {
    padding: 0.85rem;
}

.page-id-7 .contacts-quick {
    margin: 0.75rem 0 1rem;
}

.page-id-7 .contacts-quick-item {
    padding: 0.75rem 0.9rem;
}

/* Make it obvious there is a form below */
.page-id-7 .contacts-actions {
    margin: 0.25rem 0 0.45rem !important;
    gap: 0.6rem !important;
}

.page-id-7 .contacts-actions .wp-block-button__link {
    font-weight: 800 !important;
    white-space: nowrap;
}

/* Reduce the gap between the contact buttons row and "Кабинети" */
.page-id-7 .contacts-actions + h2.wp-block-heading {
    margin-top: 0.45rem !important;
}

@media (max-width: 700px) {
    .page-id-7 .contacts-actions .wp-block-button__link {
        white-space: normal;
    }
}

/* Keep map + left column widths stable (avoid reflow per selection) */
.page-id-7 .contacts-top {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem !important;
    align-items: start;
}

.page-id-7 .contacts-top > .wp-block-column {
    min-width: 0;
}

@media (max-width: 900px) {
    .page-id-7 .contacts-top {
        grid-template-columns: 1fr;
    }
}

/* Tabs: "folder" style + single details card below */
.page-id-7 .office-picker.office-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    margin: 0.35rem 0 0;
    padding: 0.35rem 0.35rem 0;
    border-bottom: 1px solid rgba(44, 62, 80, 0.12);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.page-id-7 .office-picker.office-tabs .office-card {
    padding: 0.55rem 0.95rem;
    border-radius: 14px 14px 0 0;
    background: rgba(255, 190, 152, 0.12);
    border: 1px solid rgba(44, 62, 80, 0.14);
    border-bottom-color: rgba(44, 62, 80, 0.12);
    box-shadow: none;
    transform: none !important;
    min-width: 0;
    position: relative;
    top: 1px; /* sit on top of the 'folder' border */
}

.page-id-7 .office-picker.office-tabs .office-card:hover {
    box-shadow: 0 10px 26px rgba(44, 62, 80, 0.10);
    border-color: rgba(192, 90, 64, 0.35);
}

.page-id-7 .office-picker.office-tabs .office-card.is-active {
    background: #fff;
    border-color: rgba(192, 90, 64, 0.70);
    border-bottom-color: #fff; /* connect to folder body */
    z-index: 2;
}

.page-id-7 .office-tab-label {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--color-secondary);
    font-size: 0.98rem;
    white-space: nowrap;
}

.page-id-7 .office-details {
    background: #fff;
    border: 1px solid rgba(44, 62, 80, 0.12);
    border-top: 0;
    border-radius: 0 16px 16px 16px;
    padding: 0.85rem 0.95rem;
    box-shadow: 0 10px 28px rgba(44, 62, 80, 0.10);
    margin: -1px 0 0.75rem;
    min-height: var(--office-details-min-height, 132px);
}

.page-id-7 .office-details-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
    color: var(--color-secondary);
}

.page-id-7 .office-details-meta {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
}

.page-id-7 .office-details-address {
    color: var(--color-text);
    font-size: 0.98rem;
    line-height: 1.45;
}

/* FullHD: reduce vertical footprint + keep all office cards visible */
@media (min-width: 1200px) {
    .page-id-7 .office-picker {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.85rem;
    }
    .page-id-7 .office-card {
        padding: 0.8rem 0.9rem;
    }
    .page-id-7 .office-card-meta {
        font-size: 0.84rem;
    }
    .page-id-7 .office-card-address {
        font-size: 0.9rem;
        line-height: 1.35;
    }
    /* Make map shorter so the form appears sooner */
    .page-id-7 .office-map-frame {
        aspect-ratio: 16 / 7;
        min-height: 260px;
    }
}

/* Make map show more with slightly taller ratio */
.page-id-7 .office-map-frame {
    aspect-ratio: 16 / 9;
    /* Prevent map shrinking when a shorter tab (e.g. Sofia) is selected */
    min-height: 280px;
}

/* Contacts page: keep "Работно време" visible together with map */
.page-id-7 .contacts-left .office-details + .wp-block-heading {
    margin-top: 0.55rem !important;
}

/* Contacts page: reduce gap between "Кабинети" heading and the tabs/map block */
.page-id-7 .entry-content h2.wp-block-heading:has(+ .contacts-top) {
    margin-bottom: 0 !important;
}

.page-id-7 .contacts-top {
    margin-top: 0 !important;
}

/* Fallback (no :has) + stronger control:
   reduce ONLY the gap between "Кабинети" and the block below it */
.page-id-7 .entry-content h2.wp-block-heading + .contacts-top {
    margin-top: -0.85rem !important;
}

.page-id-7 .contacts-left .wp-block-heading {
    margin-bottom: 0.45rem !important;
}

.page-id-7 .contacts-left .wp-block-heading + p {
    margin-top: 0.2rem !important;
    line-height: 1.45;
}

/* Contacts page: consistent spacing between headings and the element below */
.page-id-7 .entry-content .wp-block-heading {
    margin-bottom: 0.18rem !important;
}

.page-id-7 .entry-content .wp-block-heading + * {
    margin-top: 0 !important;
}

/* Make hint more compact */
.page-id-7 .contact-form-hint {
    padding: 0.85rem 1rem;
    margin: 0.5rem 0 0.75rem;
}

/* Reduce WPForms container padding a bit */
.page-id-7 .wpforms-container,
.page-id-7 .wpforms-container-full {
    padding: 1rem;
}

/* =========================================
   COMPACT FOOTER - Updated
   ========================================= */
.site-footer {
    background: linear-gradient(135deg, #2C3E50 0%, #1A252F 100%) !important;
    padding: 1rem 2rem !important;
}

.site-footer .ast-small-footer-wrap {
    padding: 0 !important;
}

.site-footer .site-info {
    text-align: center !important;
}

.site-footer .site-info p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
}

/* Footer quick contacts bar */
.site-footer .footer-quickbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.site-footer .footer-quickbar-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 220px;
}

.site-footer .footer-quickbar-line {
    color: rgba(255, 255, 255, 0.92) !important;
    text-decoration: none !important;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.site-footer .footer-quickbar-line:hover {
    color: #FFBE98 !important;
}

.site-footer .footer-quickbar-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-footer .footer-quickbar-right {
    display: flex;
    justify-content: flex-end;
}

.site-footer .footer-quickbar-copyright {
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 0.85rem;
    line-height: 1.2;
    text-align: right;
}

.site-footer .footer-quickbar-latin {
    font-style: italic;
    color: rgba(255, 255, 255, 0.88);
}

.site-footer .footer-quickbar-cta {
    display: inline-block;
    background: #C05A40 !important;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 800;
    padding: 0.7rem 1.1rem;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.site-footer .footer-quickbar-cta:hover {
    background: #A04830 !important;
    transform: translateY(-1px);
}

@media (max-width: 700px) {
    .site-footer .footer-quickbar {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .site-footer .footer-quickbar-left {
        align-items: center;
        min-width: 0;
    }
    .site-footer .footer-quickbar-right {
        justify-content: center;
    }
    .site-footer .footer-quickbar-copyright {
        text-align: center;
    }
    .site-footer .footer-quickbar-cta {
        width: 100%;
        text-align: center;
    }
}

.site-footer a {
    color: #FFBE98 !important;
    text-decoration: none !important;
}

.site-footer a:hover {
    color: #fff !important;
}

/* =========================================
   RESPONSIVE POLISH (Global, safe)
   ========================================= */
img,
video {
    max-width: 100%;
    height: auto;
}

iframe {
    max-width: 100%;
}

/* Reduce fixed image heights on smaller screens */
@media (max-width: 768px) {
    .wp-block-column .wp-block-image figure,
    .wp-block-column .wp-block-image img {
        height: 180px !important;
    }
}

@media (max-width: 480px) {
    /* Less vertical whitespace */
    .wp-block-spacer {
        height: 20px !important;
    }

    .wp-block-column .wp-block-image figure,
    .wp-block-column .wp-block-image img {
        height: 160px !important;
    }
}

/* Disable hover “lift” effects on touch devices */
@media (hover: none) {
    .wp-block-column:hover,
    .service-card:hover,
    .office-card:hover {
        transform: none !important;
    }
}

/* =========================================
   ONE-PAGE LANDING (Desktop) - Homepage only
   ========================================= */
.page-id-4 .onepage-section {
    scroll-margin-top: 110px;
}

/* Homepage: tighten gap between sticky onepage-nav and first section */
.page-id-4 .onepage-nav + .wp-block-spacer {
    height: 14px !important;
}

.page-id-4 h2#uslugi.onepage-section {
    margin-top: 0.45rem !important;
}

/* Homepage "За мен" section: match About-page long-form typography */
.page-id-4 #za-men p,
.page-id-4 #za-men ul.wp-block-list {
    max-width: 92ch;
    margin-left: auto;
    margin-right: auto;
}

.page-id-4 #za-men p {
    text-align: left !important; /* override has-text-align-center */
    line-height: 1.62;
}

.page-id-4 #za-men ul.wp-block-list {
    padding-left: 1.15rem;
    line-height: 1.62;
}

.page-id-4 #za-men ul.wp-block-list > li {
    margin-bottom: 0.28rem;
}

.page-id-4 #za-men ul.wp-block-list > li:last-child {
    margin-bottom: 0;
}

/* Homepage: reduce gap between "Виж повече" (About) and Articles section */
.page-id-4 #za-men {
    padding-bottom: 1.1rem !important; /* was 2.2rem inline */
}

.page-id-4 #za-men + .wp-block-spacer {
    height: 14px !important; /* was 30px */
}

.page-id-4 #statii {
    padding-top: 1.1rem !important; /* was 2.2rem inline */
}

@media (min-width: 1025px) {
    .page-id-4 #za-men p {
        text-align: justify !important;
        text-justify: inter-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }
}

.page-id-4 .onepage-nav {
    display: none;
}

@media (min-width: 1025px) {
    .page-id-4 .onepage-nav {
        display: flex;
        position: sticky;
        top: 52px;
        z-index: 999;
        gap: 0.75rem;
        align-items: center;
        justify-content: center;
        /* Make the pill match content width (not overly wide) */
        width: fit-content;
        max-width: min(980px, calc(100% - 2rem));
        /* Equal inner padding on all sides */
        padding: 0.55rem 1.65rem;
        /* Pull nav slightly up so it's fully visible at 100% zoom */
        margin: -34px auto 0.6rem;
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid rgba(44, 62, 80, 0.12);
        border-radius: 999px;
        backdrop-filter: blur(8px);
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
    }

    .page-id-4 .onepage-nav a {
        text-decoration: none !important;
        font-weight: 700;
        font-size: 0.92rem;
        color: #2C3E50 !important;
        padding: 0.45rem 0.7rem;
        border-radius: 999px;
        line-height: 1;
        white-space: nowrap;
    }

    .page-id-4 .onepage-nav a.is-active {
        background: rgba(255, 190, 152, 0.55);
        color: #2C3E50 !important;
    }

    .page-id-4 .onepage-nav a.onepage-nav-cta {
        margin-left: 0.25rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: center;
        height: 36px;
        padding: 0 0.95rem;
        background: #C05A40 !important;
        color: #fff !important;
        font-weight: 800;
        letter-spacing: 0.01em;
        text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.25);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
    }
    .page-id-4 .onepage-nav .onepage-nav-cta:hover {
        background: #A04830;
    }
}

.page-id-4 .scroll-cue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.85rem auto 0;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(44, 62, 80, 0.16);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    text-decoration: none !important;
}

/* Hero scroll cue: move the whole circle to the right */
.page-id-4 .hero-text-card {
    position: relative;
    /* Reserve space so the cue doesn't overlap content */
    padding-bottom: 2.6rem;
}

.page-id-4 .hero-text-card .scroll-cue {
    position: absolute;
    right: 18px;
    bottom: 14px;
    margin: 0;
}

@media (max-width: 480px) {
    .page-id-4 .hero-text-card {
        padding-bottom: 2.35rem;
    }
    .page-id-4 .hero-text-card .scroll-cue {
        right: 12px;
        bottom: 10px;
        width: 40px;
        height: 40px;
    }
}

.page-id-4 .scroll-cue::before {
    content: "↓";
    font-size: 1.1rem;
    color: #2C3E50;
    line-height: 1;
}

/* Remove the theme's default EN skip-link (we keep the BG one) */
.skip-link.screen-reader-text {
    display: none !important;
}

.page-id-4 .scroll-cue:hover {
    transform: translateY(1px);
}

/* =========================================
   COMPACT FOOTER - Updated
   ========================================= */
.site-footer {
    background: linear-gradient(135deg, #2C3E50 0%, #1A252F 100%) !important;
    padding: 1.5rem 2rem !important;
}

.site-footer .ast-small-footer-wrap {
    padding: 0 !important;
}

.site-footer .site-info,
.site-footer .ast-footer-copyright {
    text-align: center !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem !important;
    padding: 0 !important;
}

.site-footer a {
    color: #FFBE98 !important;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff !important;
}

/* Hide any large images/logos in footer */
.site-footer .wp-block-image,
.site-footer figure.aligncenter {
    display: none !important;
}

/* Horizontal Article Card Styling */
.article-card-horizontal {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.article-card-horizontal:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(192, 90, 64, 0.15); /* Brand color tint */
}

.article-card-image {
    position: relative;
    width: 100%;
    height: 250px; /* Mobile height */
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center !important; /* Fix for portrait crops */
    display: block;
    transition: transform 0.5s ease;
}

.article-card-horizontal:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

/* Typography Enhancements */
.article-card-content h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-family: 'PT Serif', serif;
    font-size: 1.5rem;
    line-height: 1.2;
    color: #333;
}

.article-card-content p {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.article-card-btn {
    align-self: flex-start;
    padding: 0.6rem 1.2rem;
    background-color: #C05A40;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s ease;
    display: inline-block;
}

.article-card-btn:hover {
    background-color: #a04028;
    color: white;
}

/* Desktop Layout */
@media (min-width: 992px) {
    .article-card-horizontal {
        flex-direction: row;
        min-height: 320px; /* Ensure substantial height */
    }

    .article-card-image {
        flex: 0 0 40%; /* Image takes 40% width */
        height: auto; /* Let flex handle height */
        min-height: 100%;
    }

    .article-card-image img {
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
    }

    .article-card-content {
        padding: 2.5rem 3rem; /* Generous padding */
        flex: 0 0 60%;
    }
    
    /* Alternating Layout for visual interest */
    .article-card-horizontal.alt {
        flex-direction: row-reverse;
    }
}

/* FIX: Button Visibility and Contrast */
/* Override the generic link color rule that was forcing buttons to be dark red */
.entry-content a.article-card-btn,
a.article-card-btn {
    color: #ffffff !important;
    background-color: #C05A40 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    opacity: 1 !important;
    display: inline-block;
    border: none;
    box-shadow: 0 4px 10px rgba(192, 90, 64, 0.2);
}

.entry-content a.article-card-btn:hover,
a.article-card-btn:hover {
    color: #ffffff !important;
    background-color: #a04028 !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(192, 90, 64, 0.3);
}

/* Also ensure other CTAs are protected */
.entry-content a.cta-btn {
    color: #ffffff !important;
}

/* =========================================
   COMPACT ARTICLE LIST (page_id=12)
   ========================================= */
.articles-compact-list {
    background: #FDF8F5;
    border: 1px solid rgba(44, 62, 80, 0.08);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-top: 1.5rem;
}

.compact-list-title {
    font-family: 'PT Serif', serif !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #2C3E50 !important;
    margin: 0 0 1rem 0 !important;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(44, 62, 80, 0.1);
}

.compact-article-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.compact-article-links li {
    margin-bottom: 0 !important;
    border-bottom: 1px solid rgba(44, 62, 80, 0.06);
}

.compact-article-links li:last-child {
    border-bottom: none;
}

.compact-article-links a {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0.5rem;
    text-decoration: none !important;
    transition: background 0.2s ease, padding-left 0.2s ease;
    border-radius: 8px;
}

.compact-article-links a:hover {
    background: rgba(255, 190, 152, 0.15);
    padding-left: 1rem;
}

.compact-article-title {
    font-weight: 600 !important;
    color: #2C3E50 !important;
    font-size: 0.95rem;
    flex: 1;
    line-height: 1.35;
}

.compact-article-links a:hover .compact-article-title {
    color: #C05A40 !important;
}

.compact-article-source {
    font-size: 0.8rem;
    color: #999 !important;
    white-space: nowrap;
    font-weight: 400 !important;
    flex-shrink: 0;
    padding: 0.2rem 0.6rem;
    background: rgba(44, 62, 80, 0.05);
    border-radius: 999px;
}

@media (max-width: 600px) {
    .compact-article-links a {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    .articles-compact-list {
        padding: 1rem 1.25rem;
    }
}

/* FIX: Button Visibility and Contrast - SUPER SPECIFIC */
html body .entry-content a.article-card-btn,
html body .article-card-content a.article-card-btn,
a.article-card-btn {
    color: #ffffff !important;
    background-color: #C05A40 !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    display: inline-block !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(192, 90, 64, 0.2) !important;
    padding: 0.6rem 1.2rem !important;
}

html body .entry-content a.article-card-btn:hover,
html body .article-card-content a.article-card-btn:hover,
a.article-card-btn:hover {
    color: #ffffff !important;
    background-color: #a04028 !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(192, 90, 64, 0.3) !important;
}

/* Ensure no other link styles override this */
.article-card-content a:not(.article-card-btn) {
    text-decoration: none !important;
}
