/* ==========================================================================
   Insulated Full Width Site Footer Configuration
   ========================================================================== */
.site-footer {
    --color-primary: #9D00FF;        
    --color-primary-dark: #341539;   
    --color-primary-faded: #52215A;  
    --color-success: #04A12B;        
    --color-success-hover: #00CC33;  
    
    --footer-heading-color: #f3edf5; 
    --footer-text-color: #d7d4d8; 
    --footer-link-color: #d2cfd6; 
    --footer-line-color: rgba(255, 255, 255, 0.15);

    --font-base: 'Montserrat', sans-serif;
    
    font-family: var(--font-base);
    background-color: var(--color-primary-dark) !important;
    color: var(--footer-text-color) !important;
    line-height: 1.6;
    display: block;
    clear: both;
    position: relative !important;
    z-index: 99;
    padding-bottom: 0;
    
    /* Absolute Edge-to-Edge Full Screen Breakout Alignment Rules */
    width: 100vw !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

/* Prevent unwanted edge horizontal body scrolls */
html, body {
    overflow-x: hidden;
}

.site-footer * {
    box-sizing: border-box;
}

/* FIX: Cleaned layout wrapper to prevent vertical spacing injection leaks */
.site-footer .site-footer-container {
    max-width: 1280px;
    margin: 0 auto !important;
    padding: 0 1rem !important;
    width: 100%;
}

/* --- Features Section Lines & Dynamic Spacing --- */
.site-footer .footer-features {
    padding-top: 2.5rem; /* Balanced top breathing room above features */
}

.site-footer .features-border-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 0 !important;
    padding-bottom: 2.5rem !important; /* FIX: Added explicit clearance above the border line */
    border-bottom: 1px solid var(--footer-line-color);
}

.site-footer .feature-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1 1 200px;
}

/* Re-engineered Feature Circle Icons: Purple Base + White Graphics */
.site-footer .feature-icon {
    background-color: var(--color-primary) !important;
    color: #FFFFFF !important; 
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.site-footer .feature-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.site-footer .feature-item h4 {
    margin: 0 0 0.25rem 0 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--footer-heading-color) !important;
}

.site-footer .feature-item p {
    margin: 0 !important;
    font-size: 0.85rem !important;
    color: var(--footer-text-color) !important;
}

/* --- Main Structure Grid Styling --- */
.site-footer .footer-main {
    padding: 4.5rem 0;
}

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1.8fr 1fr 1fr 1fr;
    gap: 2.5rem 2rem;
}

.site-footer .footer-col h4 {
    font-size: 1.1rem !important;
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
    font-weight: 600 !important;
    color: var(--footer-heading-color) !important;
    text-transform: none !important;
}

.site-footer .footer-col ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.site-footer .footer-col ul li {
    margin-bottom: 0.8rem !important;
    list-style: none !important;
}

.site-footer .footer-col ul li a,
.site-footer .footer-col a {
    color: var(--footer-link-color) !important;
    text-decoration: none !important;
    transition: color 0.25s ease-in-out;
    font-size: 0.95rem !important;
    display: inline-block;
    background: none !important;
}

.site-footer .footer-col ul li a:hover,
.site-footer .footer-col a:hover {
    color: var(--color-success-hover) !important; 
}

/* The Vertical Accent Border line configuration */
.site-footer .brand-col {
    border-right: 1px solid var(--footer-line-color);
    padding-right: 3rem;
}

.site-footer .brand-col .footer-logo {
    max-width: 180px;
    margin-bottom: 1.5rem;
    display: block;
}

.site-footer .footer-site-title {
    color: var(--footer-heading-color) !important;
    margin-top: 0 !important;
    font-weight: 700;
}

.site-footer .question-text {
    font-size: 0.9rem !important;
    color: var(--footer-text-color) !important;
    margin-bottom: 0.3rem !important;
}

.site-footer .footer-phone {
    font-size: 1.9rem !important;
    margin: 0 0 1.5rem 0 !important;
    font-weight: 700 !important;
    color: var(--footer-heading-color) !important;
    letter-spacing: -0.5px;
}

.site-footer .footer-socials {
    display: flex;
    gap: 0.75rem;
}

.site-footer .footer-socials a {
    width: 36px !important;
    height: 36px !important;
    background: rgba(255,255,255,0.08) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    color: var(--footer-heading-color) !important;
    font-size: 0.85rem !important;
    transition: all 0.25s ease;
    text-decoration: none !important;
}

.site-footer .footer-socials a:hover {
    background: var(--color-primary) !important;
    color: #FFFFFF !important;
    transform: translateY(-2px);
}

.site-footer .address-text, 
.site-footer .hours-text p {
    color: var(--footer-text-color) !important;
    font-size: 0.95rem !important;
    margin: 0 0 0.8rem 0 !important;
}

.site-footer .footer-email {
    font-weight: 600 !important;
    color: var(--footer-heading-color) !important;
    border-bottom: 1px dashed rgba(255,255,255,0.3);
    padding-bottom: 2px;
}

/* --- Bottom Metadata Bar & Spacing Fixes --- */
.site-footer .footer-bottom {
    font-size: 0.9rem !important;
}

.site-footer .border-top-container {
    border-top: 1px solid var(--footer-line-color);
    padding: 2.5rem 0 1.5rem 0 !important; /* FIX: Reduced bottom padding space safely */
}

.site-footer .bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.site-footer .bottom-flex p {
    margin: 0 !important;
    color: var(--footer-text-color) !important;
}

.site-footer .payment-icons {
    display: flex;
    gap: 1.5rem;
    font-weight: 600;
    color: var(--footer-heading-color);
    flex-wrap: wrap;
}

.site-footer .payment-icons span {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.05);
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.08);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1200px) {
    .site-footer .footer-grid {
        grid-template-columns: 1.5fr 1.3fr 1fr 1fr 1fr;
        gap: 2rem 1.5rem;
    }
    .site-footer .brand-col {
        padding-right: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .site-footer .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .site-footer .brand-col {
        grid-column: span 3;
        border-right: none;
        border-bottom: 1px solid var(--footer-line-color);
        padding-right: 0;
        padding-bottom: 2rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 767px) {
    .site-footer .features-border-bottom {
        flex-direction: column;
        gap: 1.75rem;
    }
    .site-footer .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 1.5rem;
    }
    .site-footer .brand-col {
        grid-column: span 2;
    }


    .site-footer .footer-features {
        row-gap: 6px;
    }
    .site-footer-container .features-border-bottom{

        row-gap:12px !important;
    }
    .site-footer .contact-col {
        grid-column: span 2;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--footer-line-color);
    }
    .site-footer .bottom-flex {
        flex-direction: column;
        text-align: center;
    }
    .site-footer .payment-icons {
        justify-content: center;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .site-footer .footer-grid {
        grid-template-columns: 1fr;
    }
    .site-footer .brand-col,
    .site-footer .contact-col {
        grid-column: span 1;
    }
}

/* ==========================================================================
   PERMANENT MOBILE FOOTER GAP & SIDE-BY-SIDE FIX
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Reset the outer section wrapper */
    body .site-footer .footer-features {
        height: auto !important;
        min-height: 0 !important;
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }

    /* 2. FORCE the container to be a block element. 
       This completely breaks the theme's forced 1136px height calculation! */
    body div.site-footer-container.features-border-bottom {
        display: block !important; 
        height: auto !important;
        min-height: 0 !important;
    }

    /* 3. Make each item an independent horizontal row */
    body div.site-footer-container.features-border-bottom .feature-item {
        display: flex !important;
        flex-direction: row !important;      /* Puts text on the right of the icon */
        align-items: center !important;      /* Vertically aligns icon and text together */
        text-align: left !important;
        height: auto !important;
        margin-bottom: 24px !important;      /* This is your new, clean, controlled gap */
        padding: 0 !important;
        width: 100% !important;
    }

    /* Remove bottom margin from the very last feature item */
    body div.site-footer-container.features-border-bottom .feature-item:last-child {
        margin-bottom: 0 !important;
    }

    /* 4. Ensure immediate, clean spacing directly to the right of the icon circle */
    body div.site-footer-container.features-border-bottom .feature-item > div[class*="icon"],
    body div.site-footer-container.features-border-bottom .feature-item .feature-icon {
        flex-shrink: 0 !important;
        margin: 0 16px 0 0 !important; 
    }

    /* 5. Ensure the text blocks inside stay stacked (Title over subtitle) */
    body div.site-footer-container.features-border-bottom .feature-item .feature-content,
    body div.site-footer-container.features-border-bottom .feature-item div:not([class*="icon"]) {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important;
        text-align: left !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Strip out any hidden padding/margins added to headings/paragraphs */
    body div.site-footer-container.features-border-bottom .feature-item h3,
    body div.site-footer-container.features-border-bottom .feature-item h4,
    body div.site-footer-container.features-border-bottom .feature-item strong {
        margin: 0 0 4px 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }

    body div.site-footer-container.features-border-bottom .feature-item p {
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }
}