/* === INDEPENDENT FOOTER STYLING - PROTECTED FROM EXTERNAL OVERRIDES === */

/* Independent Color Definitions - No reliance on external CSS variables */
.footer,
.footer *,
.footer::before,
.footer::after {
    /* Primary Colors - Hardcoded for independence */
    --footer-primary-blue: #ffffff !important;
    --footer-secondary-blue: #8fdbfa !important;
    --footer-white: #ffffff !important;
    --footer-pink: #118fd2 !important; /* Blue text color */
    --footer-text-dark: #333333 !important;
    --footer-border-light: #dcdfe3 !important;
    
    /* Prevent external CSS from interfering */
    all: unset !important;
    box-sizing: border-box !important;
}

/* Footer Container - Single Layer Design - 20px MARGINS EACH SIDE */
.footer {
    background: var(--footer-primary-blue) !important; /* Direct blue background - single layer */
    width: 100% !important;
    max-width: calc(100vw - 40px) !important; /* 20px margin each side */
    margin: 20px auto !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(255, 126, 202, 0.3) !important; /* Pink-tinted shadow */
    padding: 12px 20px !important; /* Direct content padding - no border padding */
    position: relative !important;
    overflow: visible !important;
    display: block !important;
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: var(--footer-white) !important;
}

/* Remove responsive width adjustments - use consistent 40px margins */

/* Footer Content - Single Layer Design (no separate content layer needed) */
.footer-content {
    background: transparent !important; /* No separate background - uses footer background */
    color: var(--footer-pink) !important; /* Pink text color */
    padding: 0 !important; /* No additional padding - footer handles it */
    border-radius: 0 !important; /* No separate border radius */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important; /* Center all content horizontally */
    margin: 0 !important;
    min-height: 40px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important; /* Center text alignment */
    flex-direction: row !important; /* Horizontal layout for logo + text */
    gap: 12px !important; /* Space between logo and text */
    flex-wrap: wrap !important; /* Allow wrapping on small screens */
}

/* Footer Left Section (Logo area) - Protected */
.footer-left {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important; /* Center the logo section */
    gap: 0 !important; /* No gap - logo will be directly next to text */
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important; /* Center text alignment */
    order: 1 !important; /* Logo comes first (left side) */
}

/* Footer Logo - Properly sized and protected */
.footer-logo {
    width: auto !important;
    height: 30px !important; /* Slightly smaller to match text height */
    max-width: 80px !important;
    max-height: 30px !important;
    object-fit: contain !important;
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* Footer Right Section (Links) - Protected */
.footer-right {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important; /* Center the links section */
    gap: 16px !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important; /* Center text alignment */
    order: 2 !important; /* Footer-right comes second (contains copyright + links) */
}

/* Override copyright order within footer-right to appear first */
.footer-right .footer-copyright {
    order: -1 !important; /* Copyright appears before links within footer-right */
    margin-right: 16px !important; /* Add space between copyright and first link */
}

/* Footer Copyright Text - Protected */
.footer-copyright {
    color: var(--footer-pink) !important; /* Pink text color */
    font-size: 14px !important;
    font-weight: 400 !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    font-family: Arial, sans-serif !important;
    text-align: center !important; /* Center text alignment */
    display: inline-block !important;
    order: 2 !important; /* Copyright comes between logo and links */
}

/* Footer Links - Protected styling */
.footer-link {
    color: var(--footer-pink) !important; /* Pink text color */
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    transition: color 0.2s ease !important;
    white-space: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    font-family: Arial, sans-serif !important;
    display: inline-block !important;
    text-align: center !important; /* Center text alignment */
}

.footer-link:hover {
    color: var(--footer-white) !important; /* White on hover for contrast */
    text-decoration: underline !important;
}

/* Global Logo Size Control for Footer - Nuclear Protection */
.footer img,
.footer img[src*="logo"],
.footer img[alt*="Online Therapy Tools"],
.footer img[alt*="logo"] {
    width: auto !important;
    height: 25px !important;
    max-width: 100px !important;
    max-height: 25px !important;
    object-fit: contain !important;
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Prevent ANY external CSS from affecting footer elements */
.footer,
.footer *,
.footer *::before,
.footer *::after {
    font-family: Arial, sans-serif !important;
    box-sizing: border-box !important;
}

/* Additional protection for footer container */
.footer {
    isolation: isolate !important; /* Create new stacking context */
    contain: layout style !important; /* Contain layout and style changes */
}

/* Responsive Design for Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column !important;
        gap: 12px !important;
        text-align: center !important;
        padding: 16px !important;
    }
    
    .footer-left {
        justify-content: center !important;
    }
    
    .footer-right {
        justify-content: center !important;
        gap: 12px !important;
    }
    
    .footer-copyright {
        margin-bottom: 8px !important;
    }
}

@media (max-width: 480px) {
    .footer-right {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .footer-link {
        font-size: 13px !important;
    }
    
    .footer-copyright {
        font-size: 13px !important;
    }
}

/* Animated Gradient Keyframes for Footer Border */
@keyframes footer-gradient-shift {
    0% {
        background-position: 0% 50% !important;
    }
    50% {
        background-position: 100% 50% !important;
    }
    100% {
        background-position: 0% 50% !important;
    }
}
