.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
}

.footer-top {
    padding: 60px 0 40px;
}

.footer-widget-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.footer-links,
.footer-contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contact-info li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-contact-info a {
    color: #ecf0f1;
    text-decoration: none;
}

.footer-links a:hover,
.footer-contact-info a:hover {
    color: #3498db;
}

.footer-bottom {
    background: #243342;
    padding: 15px 0;
    font-size: 0.85rem;
}

.footer-bottom-links {
    text-align: right;
}

.footer-bottom-links a {
    color: #bdc3c7;
    margin-left: 15px;
}

.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #3498db;
    color: #fff;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
}

/* ===== Footer Social Icons – Match Micro Header ===== */

.footer .social-links {
    display: inline-flex;
    gap: 12px;
}

.footer .social-link {
    color: #ecf0f1;
    background: rgba(255, 255, 255, 0.1);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.footer .social-link:hover {
    background: #3498db;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ===== Footer Column Layout Refinement (Desktop Only) ===== */
@media (min-width: 992px) {

    /* Reduce gap between 1st and 2nd columns */
    .footer .footer-top .row > div:nth-child(1) {
        padding-right: 10px;
    }

    .footer .footer-top .row > div:nth-child(2) {
        padding-left: 40px;
    }

    /* Increase width of 4th column (Contact Info) */
    .footer .footer-top .row > div:nth-child(4) {
        flex: 0 0 30%;
        max-width: 30%;
    }

    /* Slightly compensate space from 3rd column */
    .footer .footer-top .row > div:nth-child(3) {
        flex: 0 0 20%;
        max-width: 20%;
    }
}


/* Footer links – smaller text & tighter spacing */
.footer-links li,
.footer-contact-info li {
    margin-bottom: 2px; /* reduced line gap */
}

.footer-links li a,
.footer-contact-info li,
.footer-contact-info li a {
    font-size: 14px;     /* reduced font size */
    line-height: 1.8;   /* tighter line height */
}

/* ===== MOBILE & TABLET: CENTER COPYRIGHT & LEGAL LINKS ===== */

/* Tablet and Mobile (991px and below) */
@media (max-width: 991.98px) {
    .footer-bottom {
        text-align: center !important;
        padding: 20px 0 !important;
    }
    
    /* Center the entire footer bottom row */
    .footer-bottom .row {
        flex-direction: column;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    /* Center copyright text */
    .footer-bottom .col-md-6:first-child,
    .footer-bottom .col-md-4:first-child,
    .footer-bottom .col-md-8:first-child {
        text-align: center !important;
        margin-bottom: 15px;
        width: 100%;
        order: 2; /* Put copyright below links on mobile */
    }
    
    /* Center legal links container */
    .footer-bottom-links {
        text-align: center !important;
        margin-bottom: 15px;
        width: 100%;
        order: 1; /* Put links above copyright on mobile */
    }
    
    /* Center individual legal links */
    .footer-bottom-links a {
        display: inline-block;
        margin: 0 10px 10px 10px !important; /* Equal margin on all sides */
        text-align: center;
    }
    
    /* Stack links vertically on very small screens */
    @media (max-width: 576px) {
        .footer-bottom-links a {
            display: block;
            margin: 0 0 8px 0 !important;
            text-align: center;
        }
        
        .footer-bottom-links a:last-child {
            margin-bottom: 0 !important;
        }
    }
}

/* Mobile only (767px and below) - Additional adjustments */
@media (max-width: 767.98px) {
    .footer-top {
        padding: 40px 0 30px;
        text-align: center;
    }
    
    .footer-widget-title {
        margin-top: 25px;
        margin-bottom: 12px;
    }
    
    .footer-links,
    .footer-contact-info {
        text-align: center;
    }
    
    .footer .social-links {
        justify-content: center;
    }
}

/* Small Mobile (575px and below) */
@media (max-width: 575.98px) {
    .footer-bottom {
        padding: 15px 0 !important;
        font-size: 0.8rem;
    }
    
    .footer-bottom-links a {
        font-size: 0.8rem;
        margin: 0 8px 8px 8px !important;
    }
}

/* ====== NEWSLETTER SECTION - FIXED ====== */
.newsletter-section {
    padding: 20px 0 !important;
    position: relative;
    overflow: hidden;
}

/* ====== TITLE & CAPTION - ALWAYS WHITE ====== */
.newsletter-title,
.newsletter-subtitle {
    color: #ffffff !important; /* White on all devices */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.newsletter-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.newsletter-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
}

/* ====== DESKTOP FORM STYLING ====== */
/* Desktop form placeholder/text */
.newsletter-form .form-control::placeholder {
    color: #2c3e50 !important; /* Dark blue for desktop placeholder */
}

.newsletter-form .form-control {
    color: #2c3e50 !important; /* Dark blue for desktop input text */
}

/* ====== GLOWING LINE - ALWAYS VISIBLE ====== */
.glowing-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #3498db 20%, 
        #3498db 80%, 
        transparent 100%);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.8);
    z-index: 0;
}

/* Input & Button Styling */
.newsletter-form .form-control {
    height: 42px;
    border: none;
    border-radius: 4px 0 0 4px;
    padding: 0 15px;
    font-size: 0.95rem;
    border: 1px solid rgba(52, 152, 219, 0.5); /* Blue border for desktop */
    background: rgba(255, 255, 255, 0.95);
}

.newsletter-form .btn-light {
    height: 42px;
    border-radius: 0 4px 4px 0;
    padding: 0 25px;
    font-weight: 600;
    background: #3498db; /* Blue button for desktop */
    color: #ffffff; /* White text on button */
    border-color: #ffffff;
}

/* ====== MOBILE SPECIFIC - WHITE TEXT, DARK FORM ====== */
@media (max-width: 768px) {
    .newsletter-section {
        padding: 25px 0 !important;
        background: linear-gradient(135deg, #2c3e50, #2980b9) !important;
    }
    
    /* Mobile: Ensure title and subtitle are white (override any potential conflicts) */
    .newsletter-title,
    .newsletter-subtitle {
        color: #ffffff !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        text-align: center;
    }
    
    /* Mobile: Form field styling */
    .newsletter-form .form-control::placeholder {
        color: rgba(255, 255, 255, 0.8) !important; /* Brighter placeholder for mobile */
    }
    
    .newsletter-form .form-control {
        color: #ffffff !important; /* White text for mobile input */
        border: 1px solid rgba(255, 255, 255, 0.4);
        background: rgba(255, 255, 255, 0.15);
    }
    
    .newsletter-title {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }
    
    .newsletter-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
        opacity: 0.95;
    }
    
    /* Mobile: Button back to original */
    .newsletter-form .btn-light {
        background: #fff;
        color: #2c3e50;
        border-color: #fff;
    }
    
    /* GLOW LINE - BRIGHTER ON MOBILE */
    .glowing-line {
        height: 4px;
        background: linear-gradient(90deg, 
            transparent 5%, 
            #3498db 25%, 
            #4fc3f7 50%, 
            #3498db 75%, 
            transparent 95%);
        box-shadow: 
            0 0 20px rgba(52, 152, 219, 0.9),
            0 0 40px rgba(52, 152, 219, 0.4);
    }
    
    /* Larger inputs for mobile */
    .newsletter-form .form-control.mobile-input {
        height: 46px;
        font-size: 1rem;
        background: rgba(255, 255, 255, 0.2);
    }
    
    .newsletter-form .btn-light.mobile-btn {
        height: 46px;
        padding: 0 30px;
        font-size: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 575.98px) {
    .newsletter-section {
        padding: 20px 15px !important;
    }
    
    .newsletter-title {
        font-size: 1.3rem;
    }
    
    .newsletter-subtitle {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    /* Glow line - even brighter on small mobile */
    .glowing-line {
        height: 5px;
        box-shadow: 
            0 0 25px rgba(52, 152, 219, 1),
            0 0 50px rgba(52, 152, 219, 0.5);
    }
}