/* ===================================================================
   Footer Main Section - Master UI Design System
   Scoped to: #footer-main-section
   Typography: Playfair Display (Headings), Source Sans Pro (Links), IBM Plex Mono (Data)
   =================================================================== */

/* Import Typography */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Source+Sans+Pro:wght@300;400;600&family=IBM+Plex+Mono:wght@300;400;500&display=swap');

/* ===================================================================
   CSS Custom Properties
   =================================================================== */

#footer-main-section {
    /* Colors - Dark Blue theme base */
    --fm-bg-base: #004685;
    --fm-text-primary: #ffffff;
    --fm-text-secondary: #e0e0e0;
    --fm-accent: #29afe3;
    --fm-border: rgba(255, 255, 255, 0.15);

    /* Typography */
    --fm-font-heading: 'Playfair Display', serif;
    --fm-font-body: 'Source Sans Pro', sans-serif;
    --fm-font-mono: 'IBM Plex Mono', monospace;
}

[data-theme="dark"] #footer-main-section {
    --fm-bg-base: #0d1117;
    --fm-text-secondary: #b0b0b0;
    --fm-border: rgba(255, 255, 255, 0.1);
}

/* ===================================================================
   Section Base Styling
   =================================================================== */

#footer-main-section {
    position: relative;
    background-color: var(--fm-bg-base) !important;
    color: var(--fm-text-secondary);
    padding: 60px 0 30px;
    font-family: var(--fm-font-body);
}

/* Remove default overlay */
#footer-main-section .overlay-main {
    display: none;
}

#footer-main-section .container {
    position: relative;
    z-index: 1;
}

/* ===================================================================
   Widgets & Typography
   =================================================================== */

#footer-main-section h4.widget-title {
    font-family: var(--fm-font-heading);
    color: var(--fm-text-primary) !important;
    background: transparent !important;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Clean up widget backgrounds */
#footer-main-section .widget,
#footer-main-section .widget-section {
    background: transparent !important;
    margin-bottom: 20px;
}

/* ===================================================================
   Nav Row (Top)
   =================================================================== */

#footer-main-section .footer-link {
    border-bottom: 1px solid var(--fm-border);
    padding-bottom: 30px;
    margin-bottom: 50px;
}

#footer-main-section .footer-link ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 0;
    margin: 0;
    list-style: none;
}

#footer-main-section .footer-link a {
    color: var(--fm-text-primary) !important;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}

#footer-main-section .footer-link a:hover {
    color: var(--fm-accent) !important;
}

/* ===================================================================
   Main Content Columns (Middle)
   =================================================================== */

#footer-main-section .widget-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#footer-main-section .widget-section li {
    font-family: var(--fm-font-mono);
    font-size: 0.9rem;
    color: var(--fm-text-secondary) !important;
    margin-bottom: 12px;
    line-height: 1.5;
}

#footer-main-section .widget-section li a {
    color: var(--fm-text-secondary) !important;
    transition: color 0.2s;
}

#footer-main-section .widget-section li a:hover {
    color: var(--fm-accent) !important;
}

/* ===================================================================
   Social Icons Row (Bottom)
   =================================================================== */

#footer-main-section .new-footer-social-icon {
    margin-top: 20px;
    /* Center align if in full width row, or standard behavior */
    text-align: center;
}

#footer-main-section .new-footer-social-icon ul {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 0;
    margin: 0;
    list-style: none;
}

#footer-main-section .new-footer-social-icon li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#footer-main-section .new-footer-social-icon li a i {
    color: #fff;
}

/* Hover Effects */
#footer-main-section .new-footer-social-icon li a:hover {
    background: var(--fm-accent);
    border-color: var(--fm-accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(41, 175, 227, 0.3);
}

/* Platform Specific Hovers */
#footer-main-section .new-footer-social-icon li a:has(.fa-linkedin):hover {
    background: #0077b5;
    border-color: #0077b5;
}

#footer-main-section .new-footer-social-icon li a:has(.fa-youtube-play):hover {
    background: #ff0000;
    border-color: #ff0000;
}

#footer-main-section .new-footer-social-icon li a:has(.fa-twitter):hover {
    background: #1da1f2;
    border-color: #1da1f2;
}

#footer-main-section .new-footer-social-icon li a:has(.fa-facebook):hover {
    background: #1877f2;
    border-color: #1877f2;
}

#footer-main-section .new-footer-social-icon li a:has(.fa-instagram):hover {
    background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
    border-color: #dc2743;
}

#footer-main-section .new-footer-social-icon li a:has(.fa-at):hover {
    background: #000;
    border-color: #000;
}


/* ===================================================================
   Responsive
   =================================================================== */

@media (max-width: 991px) {
    #footer-main-section {
        padding: 50px 0 20px;
    }
}

@media (max-width: 767px) {
    #footer-main-section {
        text-align: center;
    }

    #footer-main-section .footer-link ul {
        flex-direction: column;
        gap: 15px;
    }

    #footer-main-section .col-md-4 {
        margin-bottom: 40px;
    }
}


/* ===================================================================
   GLOBAL OVERRIDES (PRESERVED)
   Fix for Header Dropdown & Contact Panel Text Visibility (Light Mode)
   =================================================================== */

/* 1. Header Dropdown (Light Mode) */
html body .header-nav .nav>li .sub-menu,
html body .nav-dark.header-nav .nav>li .sub-menu {
    background-color: #004685 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

html body .header-nav .nav>li .sub-menu li a,
html body .nav-dark.header-nav .nav>li .sub-menu li a {
    color: #ffffff !important;
    background-color: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

html body .header-nav .nav>li .sub-menu li a:hover,
html body .nav-dark.header-nav .nav>li .sub-menu li a:hover {
    background-color: #29afe3 !important;
    color: #ffffff !important;
}

/* 2. Contact Slide-out Panel (Light Mode) */
html body .contact-slide-hide,
html body .contact-nav,
html body .contact-nav-form {
    background-color: #ffffff !important;
}

html body .contact-nav h4,
html body .contact-nav h5,
html body .contact-nav .section-head h4,
html body .contact-nav-form h4,
html body .contact-slide-hide h4 {
    color: #1a1a2e !important;
}

html body .contact-nav p,
html body .contact-nav .icon-content p {
    color: #333333 !important;
}

/* Text Inputs & Labels */
html body .contact-nav label,
html body .contact-nav-form label,
html body .contact-nav .input-animate label,
html body .input-animate label {
    color: #333333 !important;
    font-weight: 600 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

html body .contact-nav input,
html body .contact-nav textarea,
html body .input-animate input,
html body .input-animate textarea {
    background-color: #ffffff !important;
    color: #1a1a2e !important;
    border-bottom: 2px solid #29afe3 !important;
}

html body .contact_close {
    color: #1a1a2e !important;
}

/* 3. Dark Mode Restoration (Must override the overrides) */
html[data-theme="dark"] body .contact-nav label,
html[data-theme="dark"] body .input-animate label {
    color: #e0e0e0 !important;
}

html[data-theme="dark"] body .contact-nav input,
html[data-theme="dark"] body .contact-nav textarea {
    background-color: #252525 !important;
    color: #ffffff !important;
}