/**
 * MyMediq BNH - Modern Medical Footer Styles
 * Clean, professional healthcare design
 * Version: 2.0
 */

/* ===== CSS VARIABLES - Uses System Theme Colors from modern-theme.php ===== */
:root {
    --footer-primary: var(--medical-footer-bg, var(--medical-primary, #0f477c));
    --footer-secondary: var(--medical-secondary, #ca2027);
    --footer-accent: var(--medical-accent, #23a2e1);
    --footer-dark: #0a2d4d;
    --footer-light: #f8fafc;
    --footer-text: #e2e8f0;
    --footer-muted: #94a3b8;
    --footer-border: rgba(255, 255, 255, 0.1);
    --footer-glass: rgba(255, 255, 255, 0.05);
    --footer-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== MAIN FOOTER STRUCTURE ===== */
.footer {
    background-color: var(--footer-primary);
    color: var(--footer-text);
    position: relative;
    overflow: hidden;
}

/* Medical Pattern Background */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(35, 162, 225, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(202, 32, 39, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* Cross Pattern Overlay */
.footer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M40 0h20v40h40v20H60v40H40V60H0V40h40z' fill='rgba(255,255,255,0.02)'/%3E%3C/svg%3E") no-repeat;
    background-size: contain;
    opacity: 0.5;
    pointer-events: none;
}

/* ===== EMERGENCY STRIP ===== */
.footer-emergency-strip {
    background: var(--footer-secondary);
    padding: 12px 0;
    position: relative;
    z-index: 1;
}

.footer-emergency-strip .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.emergency-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 500;
}

.emergency-item i {
    font-size: 1.1rem;
    animation: pulse-icon 2s infinite;
}

.emergency-item a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.emergency-item a:hover {
    text-decoration: underline;
}

@keyframes pulse-icon {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ===== FOOTER MAIN CONTENT ===== */
.footer-main {
    padding: 60px 0 40px;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
    gap: 50px;
}

/* ===== FOOTER BRAND COLUMN ===== */
.footer-brand {
    padding-right: 30px;
}

.footer-logo {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 20px;
    transition: var(--footer-transition);
}

.footer-logo:hover {
    opacity: 0.8;
}

.footer-brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--footer-accent);
    margin: 0 0 15px 0;
    font-weight: 500;
}

.footer-brand p {
    color: var(--footer-muted);
    line-height: 1.7;
    font-size: 0.95rem;
    margin: 0;
}

/* ===== FOOTER COLUMN STYLES ===== */
.footer-column {
    display: block;
    visibility: visible;
    opacity: 1;
}

.footer-column h4 {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
    visibility: visible;
    opacity: 1;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--footer-secondary);
    border-radius: 2px;
}

/* ===== QUICK LINKS ===== */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--footer-muted);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--footer-transition);
    position: relative;
    padding-left: 0;
}

.footer-links a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--footer-transition);
    color: var(--footer-secondary);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* ===== CONTACT INFO ===== */
.footer .contact-info,
.hospital-footer .contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.footer .contact-item p,
.footer .contact-item a,
.hospital-footer .contact-item p,
.hospital-footer .contact-item a {
    color: var(--footer-muted);
    font-size: 0.95rem;
    text-decoration: none;
    margin: 0;
    line-height: 1.6;
    transition: var(--footer-transition);
}

.footer .contact-item a:hover,
.hospital-footer .contact-item a:hover {
    color: white;
}

/* ===== SOCIAL LINKS ===== */
.footer-social-section {
    padding-top: 15px;
    margin-top: 10px;
}

/* Force horizontal layout with maximum specificity */
footer.footer .footer-column .footer-social-section .social-links,
.footer .footer-column .footer-social-section .social-links,
.footer .social-links,
.footer .footer-social-section .social-links,
.hospital-footer .social-links {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

footer.footer .footer-column .footer-social-section .social-links a,
.footer .footer-column .footer-social-section .social-links a,
.footer .social-link,
.footer .footer-social-section .social-link,
.footer .social-links a.social-link,
.hospital-footer .social-link {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    display: inline-flex !important;
    flex: 0 0 42px !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--footer-glass) !important;
    border: 1px solid var(--footer-border) !important;
    border-radius: 10px !important;
    color: white !important;
    font-size: 1.1rem !important;
    text-decoration: none !important;
    transition: var(--footer-transition) !important;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.social-link.facebook:hover { background: #1877f2; border-color: #1877f2; }
.social-link.twitter:hover { background: #1da1f2; border-color: #1da1f2; }
.social-link.instagram:hover { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); border-color: #dc2743; }
.social-link.linkedin:hover { background: #0a66c2; border-color: #0a66c2; }
.social-link.youtube:hover { background: #ff0000; border-color: #ff0000; }
.social-link.whatsapp:hover { background: #25d366; border-color: #25d366; }

/* ===== FOOTER BOTTOM ===== */
.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    position: relative;
    z-index: 1;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    color: var(--footer-muted);
    font-size: 0.9rem;
    margin: 0;
}

.footer-copyright strong {
    color: white;
}

.footer-bottom-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: var(--footer-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--footer-transition);
    position: relative;
}

.footer-bottom-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--footer-secondary);
    transition: width 0.3s ease;
}

.footer-bottom-links a:hover {
    color: white;
}

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

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--footer-primary) 0%, var(--footer-accent) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--footer-transition);
    z-index: 999;
    box-shadow: 0 8px 25px rgba(15, 71, 124, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(15, 71, 124, 0.5);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 35px;
    }
    
    .footer-brand {
        padding-right: 15px;
    }
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-main {
        padding: 50px 0 30px;
    }
    
    .footer-container {
        padding: 0 25px;
    }
    
    .footer-brand {
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .footer-emergency-strip .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .footer-main {
        padding: 40px 0 25px;
    }
    
    .footer-container {
        padding: 0 20px;
    }
    
    .footer-logo-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .trust-badges {
        justify-content: flex-start;
    }
    
    .footer-column h4 {
        font-size: 1.05rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 0 15px;
    }
    
    .footer-main {
        padding: 35px 0 20px;
    }
    
    .footer-column h4 {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    .service-card {
        padding: 10px 12px;
    }
    
    .service-card-icon {
        width: 34px;
        height: 34px;
    }
    
    .social-link {
        width: 38px;
        height: 38px;
    }
    
    .trust-badge {
        padding: 8px 12px;
    }
    
    .footer-logo {
        height: 45px;
    }
}

/* ===== WORKING HOURS (Optional) ===== */
.working-hours {
    background: var(--footer-glass);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--footer-border);
}

.working-hours-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--footer-border);
}

.working-hours-item:last-child {
    border-bottom: none;
}

.working-hours-item .day {
    color: var(--footer-text);
    font-weight: 500;
    font-size: 0.9rem;
}

.working-hours-item .time {
    color: var(--footer-accent);
    font-weight: 600;
    font-size: 0.85rem;
}

.working-hours-item.highlight {
    background: rgba(202, 32, 39, 0.1);
    margin: 0 -15px;
    padding: 8px 15px;
    border-radius: 6px;
}

.working-hours-item.highlight .day,
.working-hours-item.highlight .time {
    color: var(--footer-secondary);
}
