/* ============================================================================
   Global Buttons - uses CSS variables from Customizer
   
   GLOBAL BUTTON STYLING:
   - All buttons across the site will use customizer button settings
   - Customizer settings include: colors, typography, padding, hover states, icons
   - Applies to: .btn, .button, .site-button, .wp-block-button__link classes
   
   EXCLUSIONS:
   - Newsletter section: Has custom gradient background styling
   - Testimonials section: Uses specialized navigation button styling
   - These sections reset global styles to allow their custom styling
   
   DEBUG: CSS Variables should be available from :root in customizer.php
   Expected variables: --btn-bg-color, --btn-text-color, --btn-hover-bg, etc.
   ========================================================================== */

/* Global button styles - applies to all buttons except newsletter and testimonials sections */
/* Higher specificity to override any conflicting styles */
.btn,
.button,
.site-button,
.wp-block-button__link,
a.btn,
button.btn,
input.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: var(--btn-padding-y, 12px) var(--btn-padding-x, 24px) !important;
    border-radius: 40px !important;
    background: var(--btn-bg-color, #184267) !important;
    color: var(--btn-text-color, #ffffff) !important;
    font-family: var(--btn-font-family, var(--body-font-family, "dm-sans", sans-serif)) !important;
    font-size: var(--btn-text-size, 16px) !important;
    font-weight: var(--btn-font-weight, 600) !important;
    text-transform: var(--btn-text-transform, uppercase) !important;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s;
}
.headerbtn{ background:var(--custom-color-1, #184267); }

/* Exclude newsletter and testimonials sections from global button styling */
/* .newsletter-section .btn,
.newsletter-section .button,
.newsletter-section .site-button,
.newsletter-section .wp-block-button__link, */
.testimonials-section .btn,
.testimonials-section .button,
.testimonials-section .site-button,
.testimonials-section .wp-block-button__link {
    /* Reset to allow section-specific styling */
    padding: unset;
    border-radius: unset;
    background: unset;
    color: unset !important;
    font-family: unset;
    font-size: unset;
    font-weight: unset;
    text-transform: unset;
    border: unset;
}

/* Global button hover states - exclude newsletter and testimonials sections */
.btn:hover,
.button:hover,
.site-button:hover,
.wp-block-button__link:hover,
a.btn:hover,
button.btn:hover,
input.btn:hover {
    background: var(--btn-hover-bg, #005AA5) !important;
    color: var(--btn-hover-text, #ffffff) !important;
}

/* Reset hover states for excluded sections */
.newsletter-section .btn:hover,
.newsletter-section .button:hover,
.newsletter-section .site-button:hover,
.newsletter-section .wp-block-button__link:hover,
.testimonials-section .btn:hover,
.testimonials-section .button:hover,
.testimonials-section .site-button:hover,
.testimonials-section .wp-block-button__link:hover {
    background: unset;
    color: unset !important;
}

/* Icon Control - Global styles */
.btn__icon {
    display: var(--btn-show-icon, flex);
    align-items: center;
}

.btn__icon--left {
    order: -1;
    margin-right: 0.5rem;
}

.btn__icon--right {
    order: 1;
    margin-left: 0.5rem;
}

/* Reset icon styles for excluded sections */
.newsletter-section .btn__icon,
.testimonials-section .btn__icon {
    display: unset;
    align-items: unset;
}

.newsletter-section .btn__icon--left,
.newsletter-section .btn__icon--right,
.testimonials-section .btn__icon--left,
.testimonials-section .btn__icon--right {
    order: unset;
    margin-right: unset;
    margin-left: unset;
}

/* Variants - Global styles */
.btn--outline {
    background: transparent;
    color: var(--btn-bg-color, #184267) !important;
    border-color: var(--btn-bg-color, #184267);
}

.btn--outline:hover {
    background: var(--btn-bg-color, #184267);
    color: var(--btn-text-color, #ffffff) !important;
}

.btn--link {
    background: transparent;
    color: var(--btn-bg-color, #184267) !important;
    padding: 0;
    border: none;
    border-radius: 0;
    font-family: var(--body-font-family, "dm-sans", sans-serif);
    font-size: var(--body-font-size, 16px);
    text-transform: none;
}

.btn--link:hover {
    color: var(--btn-hover-bg, #005AA5) !important;
}

/* Reset variant styles for excluded sections */
.newsletter-section .btn--outline,
.testimonials-section .btn--outline {
    background: unset;
    color: unset !important;
    border-color: unset;
}

.newsletter-section .btn--outline:hover,
.testimonials-section .btn--outline:hover {
    background: unset;
    color: unset !important;
}

.newsletter-section .btn--link,
.testimonials-section .btn--link {
    background: unset;
    color: unset !important;
    padding: unset;
    border: unset;
    border-radius: unset;
    font-family: unset;
    font-size: unset;
    text-transform: unset;
}

.newsletter-section .btn--link:hover,
.testimonials-section .btn--link:hover {
    color: unset !important;
}



/* Header CTA specific alignment wrapper */
.header-cta {
    margin-left: 1rem;
}

/* TEMPORARY FIX: Direct integration with get_theme_mod() calls for immediate testing */
/* This will be replaced with proper CSS variables once they're working */

@media only screen and (max-width: 600px) {
    .site-button {
        width: 100%;
    }
}