/**
 * BizTheme Modern Footer - Complete Redesign
 * Modern, clean design with consistent typography and smooth animations
 */

/* Reset and Base Styles */
.biz-modern-footer * {
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Modern Footer Base */
.biz-modern-footer {
    background: var(--footer-bg-color, #F8F9FA);
    color: var(--footer-text-color, #555555);
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    animation: footerFadeIn 0.8s ease-out;
    font-weight: 400;
    line-height: 1.6;
    /* Full width */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

@keyframes footerFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtle top border gradient */
.biz-modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--school-secondary, #FFA500) 20%, 
        var(--school-primary, #FF4500) 50%, 
        var(--school-secondary, #FFA500) 80%, 
        transparent 100%);
    opacity: 0.4;
}

/* Container with proper spacing - full width with side margins */
.footer-container {
    width: 100%;
    max-width: none;
    padding: 0 2rem;
    margin: 0 auto;
}

/* Footer Top Section */
.footer-top {
    padding: 4.5rem 0 3rem;
    position: relative;
}

.footer-content-wrapper {
    width: 100%;
}

/* Modern Grid Layout - Logo Square + 4 Content Columns in One Row */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr 1.3fr 1fr;
    gap: 2rem;
    align-items: start;
    width: 100%;
    min-height: 300px; /* Prevent collapse */
}

/* Dedicated Logo Square - First Column - Perfect centering */
.footer-logo-square {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    padding: 2rem 1.5rem;
    box-shadow: none;
    border: none;
    min-height: 250px;
    position: relative;
    overflow: hidden;
}

.footer-logo-square .footer-logo-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoFloat 3s ease-in-out infinite;
}

.footer-logo-square .footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.footer-logo-square .footer-logo-img,
.footer-logo-square .custom-logo {
    max-height: 180px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.footer-logo-square:hover .footer-logo-img,
.footer-logo-square:hover .custom-logo {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(255, 69, 0, 0.2));
}

.footer-logo-square .footer-site-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, var(--school-primary, #FF4500), var(--school-secondary, #FFA500));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1.2;
}

/* Content Columns - Remove backgrounds and boxes */
.footer-info-col,
.footer-links-col,
.footer-contact-col,
.footer-legal-col {
    background: transparent;
    border-radius: 0;
    padding: 2rem 1.5rem;
    box-shadow: none;
    border: none;
    min-height: 200px;
    transition: all 0.3s ease;
}

.footer-info-col:hover,
.footer-links-col:hover,
.footer-contact-col:hover,
.footer-legal-col:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
}

/* Ensure all columns are visible and properly spaced */
.footer-column {
    width: 100%;
    min-height: 1px; /* Ensure column exists */
}

/* Make sure legal section is always visible on desktop */
.footer-legal-col {
    display: block;
}

/* Hide legal section when disabled in customizer */
body:not(.show-legal-section) .footer-legal-col {
    display: none !important;
}

/* Adjust grid when legal section is hidden */
@media (min-width: 1401px) {
    body:not(.show-legal-section) .footer-grid {
        grid-template-columns: 1fr 1fr 1.2fr 1.3fr !important;
    }
}

/* Company Section with Animation */
.footer-company {
    animation: slideInLeft 0.7s ease-out 0.1s both;
    max-width: none;
}

.footer-logo-wrapper {
    margin-bottom: 1rem;
    animation: logoFadeIn 0.8s ease-out 0.3s both;
}

.footer-logo-img,
.footer-logo .custom-logo {
    max-height: 50px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(1) contrast(1.1);
}

/* Remove description and CTA from logo column */
.footer-company .footer-description,
.footer-company .footer-cta {
    display: none;
}

/* Info Column Styling */
.footer-info-col {
    animation: slideInUp 0.7s ease-out 0.2s both;
}

.footer-info-col .footer-description {
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.footer-info-col .footer-description p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(85, 85, 85, 0.85);
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.footer-info-col .footer-cta-button {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Modern CTA Button */
.footer-cta {
    animation: slideInLeft 0.7s ease-out 0.5s both;
}

.footer-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--school-secondary, #FFA500), var(--school-primary, #FF4500));
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 20px rgba(255, 165, 0, 0.25);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.footer-cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.footer-cta-button:hover {
    background: linear-gradient(135deg, var(--school-primary, #FF4500), #FF6B00);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 69, 0, 0.4);
    color: white;
}

.footer-cta-button:hover::before {
    left: 100%;
}

.footer-cta-button .arrow-icon {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.footer-cta-button:hover .arrow-icon {
    transform: translateX(4px) rotate(5deg);
}

/* Footer Columns with Staggered Animation */
.footer-links-col {
    animation: slideInUp 0.7s ease-out 0.2s both;
}

.footer-contact-col {
    animation: slideInUp 0.7s ease-out 0.3s both;
}

.footer-legal-col {
    animation: slideInUp 0.7s ease-out 0.4s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modern Footer Headings */
.footer-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--school-primary, #FF4500);
    margin: 0 0 2rem 0;
    position: relative;
    padding-bottom: 0.75rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--school-primary, #FF4500), var(--school-secondary, #FFA500));
    border-radius: 2px;
    transition: width 0.3s ease;
}

.footer-column:hover .footer-heading::after {
    width: 60px;
}

/* Modern Footer Links */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 1rem;
    transform: translateX(0);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    animation: linkFadeIn 0.5s ease-out forwards;
}

.footer-menu li:nth-child(1) { animation-delay: 0.6s; }
.footer-menu li:nth-child(2) { animation-delay: 0.7s; }
.footer-menu li:nth-child(3) { animation-delay: 0.8s; }
.footer-menu li:nth-child(4) { animation-delay: 0.9s; }

@keyframes linkFadeIn {
    to {
        opacity: 1;
    }
}

.footer-menu li:hover {
    transform: translateX(8px);
}

.footer-menu a {
    color: var(--footer-text-color, #555555);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    display: inline-block;
    padding: 0.25rem 0;
}

.footer-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--school-secondary, #FFA500), var(--school-primary, #FF4500));
    transition: width 0.3s ease;
}

.footer-menu a:hover {
    color: var(--school-primary, #FF4500);
    transform: translateY(-1px);
}

.footer-menu a:hover::after {
    width: 100%;
}

/* Contact Section */
.footer-contact-wrapper {
    animation: slideInUp 0.7s ease-out 0.5s both;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-item {
    display: flex;
    align-items: center; /* Perfect center alignment */
    gap: 0.75rem;
    padding: 0;
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
    min-height: 40px; /* Ensure consistent height for perfect alignment */
}

.contact-item:hover {
    background: rgba(255, 165, 0, 0.05);
    transform: translateX(5px);
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.1), rgba(255, 69, 0, 0.1));
    border-radius: 8px;
    color: var(--school-secondary, #FFA500);
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 165, 0, 0.2);
}

.contact-icon svg {
    width: 16px;
    height: 16px;
}

.contact-item:hover .contact-icon {
    background: linear-gradient(135deg, var(--school-secondary, #FFA500), var(--school-primary, #FF4500));
    color: white;
    box-shadow: 0 2px 10px rgba(255, 165, 0, 0.3);
}

.contact-link {
    color: var(--footer-text-color, #555555);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    line-height: 1; /* Set to 1 for perfect vertical centering */
    word-break: break-word;
    overflow-wrap: break-word;
    display: flex;
    align-items: center; /* Perfect vertical center */
    height: 32px; /* Match icon height exactly */
}

.contact-address {
    display: flex;
    flex-direction: column;
    gap: 0.1rem; /* Reduced gap for tighter vertical centering */
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--footer-text-color, #555555);
    line-height: 1.2; /* Tighter line height for better vertical centering */
    justify-content: center; /* Perfect vertical center */
    height: 32px; /* Match icon height exactly */
}

.contact-address span {
    display: block;
    line-height: 1.1; /* Very tight for perfect centering */
}

/* Footer Bottom - Full Width */
.footer-bottom {
    border-top: 1px solid rgba(85, 85, 85, 0.12);
    padding: 2.5rem 0;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    width: 100%;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-copyright,
.footer-disclaimer {
    transition: all 0.3s ease;
}

.footer-copyright p,
.footer-disclaimer p {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: rgba(85, 85, 85, 0.8);
    transition: color 0.3s ease;
    /* Preserve content formatting */
    line-height: inherit;
}

.footer-copyright:hover p,
.footer-disclaimer:hover p {
    color: var(--school-primary, #FF4500);
}

/* Ensure content before footer maintains proper formatting */
.biz-modern-footer {
    /* Preserve content formatting above footer */
    clear: both;
}

/* Responsive Design with Immediate Vertical Switch - Fixed */
@media (max-width: 1400px) {
    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5rem;
        max-width: 900px;
        margin: 0 auto;
        grid-template-columns: none !important;
        min-height: auto !important;
    }
    
    /* Show all columns in vertical layout from the start */
    .footer-legal-col,
    .footer-links-col {
        display: block !important;
    }
    
    .footer-logo-square {
        order: -1;
        padding: 2rem 1.5rem;
        min-height: 180px;
        text-align: center;
        margin: 0 auto;
        max-width: 500px;
        width: 100%;
        flex-shrink: 0;
    }
    
    .footer-info-col,
    .footer-links-col,
    .footer-contact-col,
    .footer-legal-col {
        padding: 1.5rem 1.25rem;
        min-height: auto;
        text-align: center; /* Changed from left to center for mobile */
        max-width: 700px;
        margin: 0 auto;
        width: 100%;
        flex-shrink: 0;
    }
    
    /* Center all content in mobile view */
    .footer-info-col .footer-description,
    .footer-links-col .footer-links-wrapper,
    .footer-contact-col .footer-contact-wrapper,
    .footer-legal-col .footer-links-wrapper {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Center footer menus */
    .footer-menu {
        text-align: center;
    }
    
    /* Center contact info while maintaining icon alignment */
    .contact-info {
        align-items: center;
        text-align: center;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .contact-item {
        justify-content: flex-start; /* Keep icons aligned to start within centered container */
        width: 100%;
        max-width: 300px;
        min-height: 42px !important; /* Slightly larger for mobile */
        margin: 0 auto 0.75rem auto !important;
        gap: 1rem !important;
        padding: 0.25rem 0 !important;
        align-items: center !important; /* Perfect center alignment */
    }
    
    .contact-icon {
        width: 36px !important;
        height: 36px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 8px !important;
    }
    
    .contact-icon svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    .contact-link {
        display: flex !important;
        align-items: center !important;
        text-align: left !important;
        flex: 1 !important;
        height: 36px !important; /* Match icon height */
        line-height: 1 !important; /* Perfect centering */
    }
    
    .contact-address {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important; /* Perfect vertical center */
        text-align: left !important;
        flex: 1 !important;
        gap: 0.05rem !important; /* Very tight gap */
        height: 36px !important; /* Match icon height */
        line-height: 1.1 !important;
    }
    
    .contact-address span {
        line-height: 1.1 !important; /* Tight line height for perfect centering */
    }
    
    .footer-logo-square .footer-logo-img,
    .footer-logo-square .custom-logo {
        max-height: 160px !important;
    }
    
    .footer-heading {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
        text-align: center; /* Changed from left to center */
        width: 100%;
    }
    
    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%); /* Center the underline */
    }
    
    .footer-bottom-content {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 1rem;
        padding: 0 1.5rem;
        max-width: 700px;
        margin: 0 auto;
    }
    
    .footer-copyright,
    .footer-disclaimer {
        width: 100%;
        text-align: center;
    }
    
    .footer-copyright p,
    .footer-disclaimer p {
        text-align: center;
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Override any existing alignment */
    .footer-info-col,
    .footer-links-col,
    .footer-contact-col,
    .footer-legal-col {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    /* Force center all content wrappers */
    .footer-description,
    .footer-links-wrapper,
    .footer-contact-wrapper {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    /* Center headings */
    .footer-heading {
        text-align: center !important;
        margin: 0 auto 1.25rem auto !important;
        width: 100% !important;
    }
    
    .footer-heading::after {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    /* Center menus */
    .footer-menu {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .footer-menu li {
        text-align: center !important;
        width: 100% !important;
        list-style: none !important;
    }
    
    .footer-menu a {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
    }
    
    /* Perfect contact alignment */
    .contact-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
    }
    
    .contact-item {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto 0.75rem auto !important;
        gap: 1rem !important;
        min-height: 42px !important; /* Slightly larger for mobile */
        padding: 0.25rem 0 !important;
    }
    
    .contact-icon {
        width: 36px !important;
        height: 36px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 8px !important;
    }
    
    .contact-icon svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    .contact-link {
        display: flex !important;
        align-items: center !important;
        text-align: left !important;
        flex: 1 !important;
        height: 36px !important; /* Match icon height */
        line-height: 1 !important; /* Perfect centering */
    }
    
    .contact-address {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important; /* Perfect vertical center */
        text-align: left !important;
        flex: 1 !important;
        gap: 0.05rem !important; /* Very tight gap */
        height: 36px !important; /* Match icon height */
        line-height: 1.1 !important;
    }
    
    .contact-address span {
        line-height: 1.1 !important; /* Tight line height for perfect centering */
    }
}

/* Remove the intermediate breakpoints that were causing grid issues */
@media (max-width: 1250px) {
    /* This breakpoint is now handled by the 1400px rule above */
}

/* Switch to vertical layout immediately when grid becomes too tight */
@media (max-width: 1100px) {
    /* This is now redundant as we switch at 1400px */
}

/* Explicit grid rules to prevent confusion */
@media (min-width: 1401px) {
    .footer-grid {
        display: grid !important;
        flex-direction: initial !important;
        grid-template-columns: 1fr 1fr 1.2fr 1.3fr 1fr !important;
    }
    
    .footer-legal-col {
        display: block !important;
    }
}

@media (max-width: 1400px) {
    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
    }
    
    .footer-grid > * {
        width: 100% !important;
        max-width: 700px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Tablet - Maintain vertical layout with better spacing */
@media (max-width: 768px) {
    .footer-container {
        padding: 0 1.5rem;
    }
    
    .footer-grid {
        gap: 2rem;
        max-width: 600px;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .footer-logo-square {
        padding: 1.75rem 1.25rem;
        min-height: 160px;
        max-width: 400px;
    }
    
    .footer-info-col,
    .footer-links-col,
    .footer-contact-col,
    .footer-legal-col {
        padding: 1.25rem 1rem;
        max-width: 500px;
        text-align: center; /* Ensure centering on tablet */
    }
    
    /* Improve contact alignment on tablet */
    .contact-item {
        gap: 1rem !important;
        max-width: 280px;
        margin: 0 auto !important;
        min-height: 40px !important; /* Consistent height */
        align-items: center !important; /* Perfect center alignment */
    }
    
    .contact-icon {
        width: 34px !important;
        height: 34px !important;
    }
    
    .contact-icon svg {
        width: 17px;
        height: 17px;
    }
    
    .contact-link {
        height: 34px !important; /* Match icon height */
        line-height: 1 !important;
        align-items: center !important;
    }
    
    .contact-address {
        height: 34px !important; /* Match icon height */
        justify-content: center !important;
        line-height: 1.1 !important;
        gap: 0.05rem !important;
    }
    
    .contact-address span {
        line-height: 1.1 !important;
    }
    
    .footer-logo-square .footer-logo-img,
    .footer-logo-square .custom-logo {
        max-height: 120px !important;
    }
    
    .footer-heading {
        font-size: 1rem;
        margin-bottom: 1rem;
        text-align: center; /* Ensure centering */
    }
    
    .footer-bottom-content {
        padding: 0 1.25rem;
        max-width: 500px;
    }
}

/* Mobile - Compact vertical layout */
@media (max-width: 480px) {
    .footer-container {
        padding: 0 1rem;
    }
    
    .footer-top {
        padding: 3rem 0 2rem;
    }
    
    .footer-grid {
        gap: 1.25rem;
        max-width: 100%;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .footer-logo-square {
        padding: 1.5rem 1rem;
        min-height: 140px;
        max-width: 100%;
    }
    
    .footer-info-col,
    .footer-links-col,
    .footer-contact-col,
    .footer-legal-col {
        padding: 1rem 0.75rem;
        max-width: 100%;
        text-align: center; /* Ensure centering on mobile */
    }
    
    /* Perfect mobile contact alignment */
    .contact-info {
        max-width: 280px !important;
        margin: 0 auto !important;
    }
    
    .contact-item {
        gap: 0.875rem !important;
        padding: 0.5rem 0 !important;
        max-width: 260px !important;
        margin: 0 auto !important;
        min-height: 38px !important; /* Consistent height on mobile */
        align-items: center !important; /* Perfect alignment */
    }
    
    .contact-icon {
        width: 30px !important;
        height: 30px !important;
        flex-shrink: 0 !important;
    }
    
    .contact-icon svg {
        width: 15px !important;
        height: 15px !important;
    }
    
    .contact-link {
        font-size: 0.85rem !important;
        line-height: 1 !important; /* Perfect centering */
        height: 30px !important; /* Match icon height exactly */
        align-items: center !important;
    }
    
    .contact-address {
        font-size: 0.85rem !important;
        line-height: 1.1 !important;
        height: 30px !important; /* Match icon height exactly */
        justify-content: center !important;
        gap: 0.05rem !important; /* Very tight for perfect centering */
    }
    
    .contact-address span {
        line-height: 1.05 !important; /* Very tight for mobile */
        font-size: 0.85rem !important;
    }
    
    .footer-logo-square .footer-logo-img,
    .footer-logo-square .custom-logo {
        max-height: 100px !important;
    }
    
    .footer-heading {
        font-size: 0.95rem;
        margin-bottom: 0.875rem;
        text-align: center; /* Ensure centering */
    }
    
    .contact-info {
        gap: 1rem;
    }
    
    .footer-menu a {
        font-size: 0.9rem;
    }
    
    .footer-info-col .footer-description p {
        font-size: 0.85rem;
        text-align: center; /* Center description text */
    }
    
    .footer-bottom-content {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    .footer-copyright p,
    .footer-disclaimer p {
        font-size: 0.85rem;
    }
    
    /* Ensure all sections are centered */
    .footer-info-col,
    .footer-links-col,
    .footer-contact-col,
    .footer-legal-col {
        text-align: center !important;
        padding: 1rem 0.75rem;
        max-width: 100%;
    }
    
    /* Center all headings */
    .footer-heading {
        text-align: center !important;
        font-size: 0.95rem;
        margin-bottom: 0.875rem;
    }
    
    /* Center description text */
    .footer-info-col .footer-description p {
        font-size: 0.85rem;
        text-align: center !important;
    }
    
    /* Center menu items */
    .footer-menu {
        text-align: center !important;
    }
    
    .footer-menu li {
        text-align: center !important;
    }
    
    .footer-menu a {
        text-align: center !important;
        font-size: 0.9rem;
    }
    
    /* Perfect mobile contact alignment */
    .contact-info {
        max-width: 280px !important;
        margin: 0 auto !important;
    }
    
    .contact-item {
        gap: 0.875rem !important;
        padding: 0.5rem 0 !important;
        max-width: 260px !important;
        margin: 0 auto !important;
        min-height: 38px !important; /* Consistent height on mobile */
        align-items: center !important; /* Perfect alignment */
    }
    
    .contact-icon {
        width: 30px !important;
        height: 30px !important;
        flex-shrink: 0 !important;
    }
    
    .contact-icon svg {
        width: 15px !important;
        height: 15px !important;
    }
    
    .contact-link {
        font-size: 0.85rem !important;
        line-height: 1 !important; /* Perfect centering */
        height: 30px !important; /* Match icon height exactly */
        align-items: center !important;
    }
    
    .contact-address {
        font-size: 0.85rem !important;
        line-height: 1.1 !important;
        height: 30px !important; /* Match icon height exactly */
        justify-content: center !important;
        gap: 0.05rem !important; /* Very tight for perfect centering */
    }
    
    .contact-address span {
        line-height: 1.05 !important; /* Very tight for mobile */
        font-size: 0.85rem !important;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .footer-container {
        padding: 0 0.75rem;
    }
    
    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .footer-logo-square,
    .footer-info-col,
    .footer-links-col,
    .footer-contact-col,
    .footer-legal-col {
        padding: 0.875rem 0.5rem;
        text-align: center; /* Ensure centering on very small screens */
    }
    
    /* Ultra-precise contact alignment for very small screens */
    .contact-info {
        max-width: 240px;
    }
    
    .contact-item {
        max-width: 220px;
        gap: 0.75rem;
        min-height: 32px; /* Consistent with icon */
        align-items: center !important;
    }
    
    .contact-icon {
        width: 28px;
        height: 28px;
    }
    
    .contact-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .contact-link {
        font-size: 0.8rem;
        height: 28px !important; /* Match icon height */
        line-height: 1 !important;
        align-items: center !important;
    }
    
    .contact-address {
        font-size: 0.8rem;
        height: 28px !important; /* Match icon height */
        justify-content: center !important;
        line-height: 1.1 !important;
        gap: 0.05rem !important;
    }
    
    .contact-address span {
        line-height: 1.05 !important;
        font-size: 0.8rem;
    }
    
    .footer-heading {
        font-size: 0.9rem;
        text-align: center; /* Ensure centering */
    }
    
    .footer-menu a {
        font-size: 0.85rem;
    }
    
    .contact-link,
    .contact-address {
        font-size: 0.8rem;
    }
    
    .footer-info-col .footer-description p {
        font-size: 0.8rem;
        text-align: center; /* Center description text */
    }
}

/* Force layout consistency with JavaScript backup */
@media (max-width: 1100px) {
    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        grid-auto-flow: initial !important;
    }
}

@media (min-width: 1101px) {
    .footer-grid {
        display: grid !important;
        flex-direction: initial !important;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 1200px) and (orientation: landscape) and (max-height: 800px) {
    .footer-top {
        padding: 2rem 0 1.5rem;
    }
    
    .footer-grid {
        gap: 1.25rem;
        max-width: 1000px;
        margin: 0 auto;
    }
    
    .footer-logo-square {
        min-height: 120px;
        max-width: 400px;
    }
    
    .footer-info-col,
    .footer-links-col,
    .footer-contact-col,
    .footer-legal-col {
        max-width: 800px;
    }
}
