/* footer.css - Final Fix for All Navigation Scenarios - Encoding Fixed */

/* Ensure box-sizing globally */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Footer notices (grey box) */
.footer-notices {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; /* ENSURE this is here for text centering */
    margin-bottom: 0;
    border-top: 1px solid #e9ecef;
}

.footer-notices p {
    margin: 8px 0;
    color: #495057; /* IMPROVED: Changed from #6c757d for better contrast (7.2:1 ratio) */
    font-size: 0.9rem;
    width: 100%;
    max-width: 1400px;
    line-height: 1.5;
    font-weight: 500; /* ADDED: Slightly bolder for better readability */
    text-align: center; /* ADDED: Explicitly center the text within paragraphs */
}

.footer-notices a {
    text-decoration: none;
    color: #2980b9; /* IMPROVED: Changed from #3498db for better contrast */
    font-weight: 600; /* ADDED: Bolder links for better accessibility */
    transition: color 0.3s ease;
}

.footer-notices a:hover {
    color: #1c5a85; /* IMPROVED: Darker hover state for better contrast */
    text-decoration: underline; /* ADDED: Underline on hover for better UX */
}

/* Placeholder section (white background, full width) */
.footer-placeholder {
    background-color: #fff;
    width: 100%;
    margin: 0;
    padding: 0 20px; /* Add base padding */
}

/* Three-column layout */
.footer-columns {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    padding: 50px 20px; /* Add horizontal padding */
}

.footer-column {
    flex: 1;
    min-width: 280px;
}

/* Left Section */
.footer-left p {
    font-size: 1.1rem;
    color: #495057;
    line-height: 1.7;
    margin: 0;
    font-weight: 400;
}

/* Center Section */
.footer-center h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 0 0 20px;
    font-weight: 600;
    position: relative;
}

.footer-center h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: #3498db;
    margin-top: 8px;
    border-radius: 2px;
}

/* FIXED: Footer navigation lists - Multiple selectors to cover all scenarios */
.footer-links,
footer .footer-center .footer-links,
footer .footer-center nav .footer-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 25px !important; /* Reduced bottom margin */
    display: block !important; /* Force block display for vertical stacking */
}

.footer-links li,
footer .footer-center .footer-links li,
footer .footer-center nav .footer-links li {
    margin: 4px 0 !important; /* REDUCED from 12px to 6px for tighter spacing */
    display: block !important;
    width: 100% !important;
}

.footer-links a,
footer .footer-center .footer-links a,
footer .footer-center nav .footer-links a {
    font-size: 1.05rem;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block !important;
    position: relative;
    padding: 2px 0; /* Added small padding for better click area */
}

.footer-links a:hover,
footer .footer-center .footer-links a:hover,
footer .footer-center nav .footer-links a:hover {
    color: #3498db;
    transform: translateX(5px);
}

.footer-links a::before,
footer .footer-center .footer-links a::before,
footer .footer-center nav .footer-links a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #3498db;
}

.footer-links a:hover::before,
footer .footer-center .footer-links a:hover::before,
footer .footer-center nav .footer-links a:hover::before {
    opacity: 1;
}

/* Right Section (Newsletter and Social Links) */
.footer-right h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 0 0 20px;
    font-weight: 600;
    position: relative;
}

.footer-right h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: #3498db;
    margin-top: 8px;
    border-radius: 2px;
}

/* Newsletter Form */
#newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 320px;
    margin-bottom: 30px;
}

#newsletter-form input[type="email"] {
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    color: #2c3e50;
    background: #ffffff;
    font-family: 'Inter', 'Roboto', sans-serif;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#newsletter-form input[type="email"]:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

#newsletter-form input::placeholder {
    color: #adb5bd;
    font-family: 'Inter', 'Roboto', sans-serif;
}

#newsletter-form button {
    padding: 16px 24px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

#newsletter-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

#newsletter-form button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #f8f9fa;
    color: #495057; /* Explicit color for screen-reader-text contrast (inherits to child spans) */
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.social-icon:hover {
    background: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.social-icon:hover .social-svg {
    fill: #ffffff;
}

.social-svg {
    width: 22px;
    height: 22px;
    fill: #495057;
    transition: fill 0.3s ease;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Newsletter Notice */
.newsletter-notice {
    display: block;
    background: #28a745;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    font-family: 'Inter', 'Roboto', sans-serif;
    font-size: 0.95rem;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.newsletter-notice.success {
    background: #28a745;
}

.newsletter-notice.error {
    background: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Horizontal blue line (full width, thicker) */
.footer-divider {
    border: none;
    border-top: 4px solid #3498db;
    width: 100%;
    margin: 0;
}

/* Mobile Responsive Design */
@media screen and (max-width: 768px) {
    .footer-placeholder {
        padding: 0 15px; /* Reduce padding slightly on mobile */
    }
    
    .footer-columns {
        flex-direction: column;
        gap: 40px;
        padding: 40px 15px; /* Ensure proper mobile padding */
    }

    .footer-column {
        min-width: 100%;
    }

    .footer-left p {
        font-size: 1rem;
        text-align: center;
    }

    .footer-center h3,
    .footer-right h3 {
        font-size: 1.3rem;
        text-align: center;
    }

    .footer-center h3::after,
    .footer-right h3::after {
        margin: 8px auto 0;
    }

    /* Mobile navigation - multiple selectors for maximum compatibility */
    .footer-links,
    footer .footer-center .footer-links,
    footer .footer-center nav .footer-links {
        text-align: center !important;
        display: block !important;
    }

    .footer-links li,
    footer .footer-center .footer-links li,
    footer .footer-center nav .footer-links li {
        display: block !important;
        margin: 10px 0 !important; /* Slightly more spacing on mobile for touch targets */
        width: 100% !important;
    }

    .footer-links a,
    footer .footer-center .footer-links a,
    footer .footer-center nav .footer-links a {
        display: inline-block !important;
        font-size: 1.05rem !important;
        color: #495057 !important;
        padding: 4px 0 !important; /* Better touch targets on mobile */
    }

    .footer-links a::before,
    footer .footer-center .footer-links a::before,
    footer .footer-center nav .footer-links a::before {
        display: none !important; /* Hide arrow on mobile */
    }

    .footer-links a:hover,
    footer .footer-center .footer-links a:hover,
    footer .footer-center nav .footer-links a:hover {
        transform: none !important; /* Remove transform on mobile */
    }

    #newsletter-form {
        max-width: 100%;
        align-items: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-notices {
        padding: 15px;
    }

    .footer-notices p {
        font-size: 0.85rem;
        text-align: center;
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
    }
}

@media screen and (max-width: 480px) {
    .footer-placeholder {
        padding: 0 10px;
    }
    
    .footer-columns {
        padding: 30px 10px;
        gap: 30px;
    }

    .footer-column {
        text-align: center;
    }

    #newsletter-form input[type="email"],
    #newsletter-form button {
        padding: 14px 18px;
        font-size: 0.95rem;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }

    .social-svg {
        width: 20px;
        height: 20px;
    }
}

/* Ensure footer sticks to bottom */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}