/* Enhanced Professional Footer Styling - Astra Footer Builder Compatible - PREMIUM COMPACT BLACK EDITION */

/* Footer Main Container */
.site-footer {
    background: linear-gradient(135deg, #020617 0%, #000000 100%) !important; /* Deep Black/Darkest Blue */
    padding: 30px 0 15px !important; /* COMPACT PADDING */
    position: relative;
    color: #E5E7EB;
}

/* Fix for Light Background Override */
.site-primary-footer-wrap,
.site-below-footer-wrap,
.site-above-footer-wrap {
    background: transparent !important;
}

.site-footer:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1E40AF 0%, #3B82F6 50%, #1E40AF 100%); /* Blue Accent Line */
    z-index: 10;
}

/* Footer Widget Areas - Ensure Grid/Flex Layout */
/* Astra usually handles layout, but we enforce spacing */
.site-primary-footer-wrap .ast-builder-grid-row {
    gap: 20px !important; /* COMPACT GAP */
    padding: 15px 0 10px !important; /* COMPACT PADDING */
}

/* Widget Titles */
.site-footer .widget-title {
    color: #FFFFFF !important;
    font-size: 16px !important; /* COMPACT FONT */
    font-weight: 700 !important;
    margin-bottom: 12px !important; /* COMPACT MARGIN */
    padding-bottom: 8px !important; /* COMPACT PADDING */
    border-bottom: 2px solid #1E40AF !important; /* Darker Blue underline */
    display: block !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Widget Content */
.site-footer .widget, 
.site-footer .widget p {
    color: #9CA3AF !important; /* Grey text */
    line-height: 1.5 !important; /* COMPACT LINE HEIGHT */
    font-size: 14px !important; /* COMPACT FONT */
}

.site-footer .widget p {
    margin-bottom: 8px !important; /* COMPACT MARGIN */
}

/* Logo Sizing */
.footer-company-info img {
    max-width: 140px !important; /* COMPACT LOGO */
    margin-bottom: 12px !important;
}

/* Links Styling */
.site-footer .widget a {
    color: #D1D5DB !important; /* Light Grey */
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    display: block !important;
    padding: 4px 0 !important; /* COMPACT PADDING */
    position: relative !important;
    font-size: 14px !important;
}

/* Only add chevron to list items to avoid affecting logo/socials */
.site-footer .widget ul li a {
    padding-left: 15px !important;
}

.site-footer .widget ul li a:before {
    content: "▸" !important;
    position: absolute !important;
    left: 0 !important;
    color: #3B82F6 !important; /* Blue Chevron */
    font-weight: bold !important;
    transition: all 0.3s ease !important;
}

.site-footer .widget ul li a:hover {
    color: #60A5FA !important; /* Lighter Blue Hover */
    padding-left: 20px !important;
}

.site-footer .widget ul li a:hover:before {
    left: 5px !important;
    color: #60A5FA !important;
}

/* Lists */
.site-footer .widget ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.site-footer .widget ul li {
    margin-bottom: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Company Info Section Specifics */
.footer-company-info p {
    font-size: 13px !important;
    color: #D1D5DB !important;
}

/* Contact Info Styling */
.site-footer .widget strong {
    color: #FFFFFF !important;
    display: block !important;
    margin-bottom: 4px !important;
    font-size: 14px !important;
}

.site-footer .widget a[href^="mailto:"],
.site-footer .widget a[href^="tel:"] {
    color: #60A5FA !important; /* Light Blue links */
    font-weight: 600 !important;
    padding-left: 0 !important;
    display: inline-block !important;
}

/* Social Media Icons (if any exist) */
.site-footer .ast-builder-social-element a {
    background: rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
    width: 35px !important; /* Compact Icons */
    height: 35px !important;
}

.site-footer .ast-builder-social-element a:hover {
    background: #2563EB !important; /* Brand Blue Hover */
    transform: translateY(-5px);
}

/* Copyright Bar */
.site-footer-below-section {
    background: #020617 !important; /* Darker Black/Blue */
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 10px 0 !important; /* COMPACT PADDING */
}

.site-footer-below-section .ast-builder-html-element {
    color: #666 !important;
    font-size: 12px !important;
}

/* Certifications Badges */
.footer-certifications {
    display: flex !important;
    gap: 5px !important;
    flex-wrap: wrap !important;
    margin-top: 10px !important;
}

.footer-certifications span {
    background: #1E40AF !important; /* Deep Blue Badge */
    color: #FFFFFF !important;
    padding: 3px 6px !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* =========================================
   LAYOUT FIX: FORCE 4 COLUMNS
   ========================================= */

/* 1. Force the grid container to 4 columns */
.site-primary-footer-inner-wrap.ast-builder-grid-row {
    grid-template-columns: repeat(4, 1fr) !important;
    display: grid !important;
}

/* 2. Unwrap the first section so its 2 widgets become direct grid items */
.site-footer-primary-section-1 {
    display: contents !important;
}

/* 3. Re-order items to: About | Links | Products | Contact */
/* Widget 1: About (was inside Section 1) */
aside[data-section="sidebar-widgets-footer-widget-1"] {
    order: 1 !important;
}

/* Section 2: Quick Links (Native Section) */
.site-footer-primary-section-2 {
    order: 2 !important;
}

/* Widget 3: Products (was inside Section 1) */
aside[data-section="sidebar-widgets-footer-widget-3"] {
    order: 3 !important;
}

/* Section 3: Contact (Native Section) */
.site-footer-primary-section-3 {
    order: 4 !important;
}

/* Ensure mobile stacking works */
@media (max-width: 921px) {
    .site-primary-footer-inner-wrap.ast-builder-grid-row {
        grid-template-columns: 1fr !important;
    }
    .site-footer-primary-section-2,
    aside[data-section="sidebar-widgets-footer-widget-1"],
    aside[data-section="sidebar-widgets-footer-widget-3"],
    .site-footer-primary-section-3 {
        order: unset !important;
    }
}

/* =========================================
   PROFESSIONAL HEADER STYLING
   ========================================= */

/* Prevent Phone Number Wrapping & Layout Issues */
.ast-header-widget-area .widget p,
.site-header .widget p,
.ast-header-html p,
.ast-header-html {
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin-bottom: 0 !important;
}

/* Fix Icons Sizing (WhatsApp/WeChat) */
.site-header img,
.ast-header-widget-area img,
.ast-header-html img {
    max-width: 32px !important; /* Professional Icon Size */
    height: auto !important;
    margin: 0 5px !important;
    vertical-align: middle !important;
    display: inline-block !important;
}

/* Flex Container for Header Widgets Area */
.ast-header-widget-area,
.ast-builder-layout-element {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 15px !important;
}

/* Menu Layout Cleaning */
.main-header-menu .menu-item {
    padding: 0 10px !important;
}

.main-header-menu .menu-link {
    font-weight: 500 !important;
    font-size: 15px !important;
    color: #0F172A !important;
}
