/* ==========================================================================
   FOOTER STYLES - Professional Medical Website Footer
   ========================================================================== */

.main-footer {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary) 100%);
    color: var(--color-text-inverse);
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.03"><circle cx="20" cy="20" r="1"/></g></svg>') repeat;
    pointer-events: none;
}

.footer-content {
    padding: var(--spacing-xl) 0 0 0;
    position: relative;
    z-index: 2;
}

/* Footer Row Layout - Ensure 4 columns in single row */
.footer-content .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: var(--spacing-md);
    justify-content: space-between;
}

.footer-content .col-lg-3 {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

.footer-section {
    margin-bottom: var(--spacing-xl);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Footer Logo */
.footer-logo h3 {
    font-size: var(--font-size-h3);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-inverse);
    margin-bottom: var(--spacing-xs);
    font-family: var(--font-family-sans);
}

.footer-tagline {
    font-size: var(--font-size-small);
    color: var(--color-accent-cool);
    font-style: italic;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-description {
    font-size: var(--font-size-body-small);
    line-height: var(--line-height-body);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-lg);
}

/* Footer Titles */
.footer-title {
    font-size: var(--font-size-h5);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-inverse);
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-xs);
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-primary);
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: var(--font-size-body-small);
    transition: all 0.3s ease;
    position: relative;
    padding-left: var(--spacing-sm);
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: var(--color-primary);
}

.footer-links a:hover {
    color: var(--color-text-inverse);
    padding-left: var(--spacing-md);
    text-decoration: none;
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Social Links */
.footer-social {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-text-inverse);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(232, 90, 79, 0.3);
    color: var(--color-text-inverse);
    text-decoration: none;
}

/* Contact Items */
.footer-contact .contact-item {
    display: flex;
    align-items: flex-start;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.footer-contact .contact-item:last-child {
    border-bottom: none;
}

.footer-contact .contact-item:hover {
    padding-left: var(--spacing-sm);
}

.footer-contact .contact-item i {
    color: var(--color-primary);
    font-size: var(--font-size-h6);
    margin-right: var(--spacing-sm);
    margin-top: 2px;
    flex-shrink: 0;
}

.contact-details p {
    margin: 0;
    font-size: var(--font-size-body-small);
    line-height: var(--line-height-body);
    color: rgba(255, 255, 255, 0.9);
}

.contact-details a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

/* Footer Bottom */
.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: var(--spacing-sm) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.footer-copyright p {
    margin: 0;
    font-size: var(--font-size-small);
    color: rgba(255, 255, 255, 0.7);
}

.footer-legal {
    text-align: right;
}

.legal-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
}

.legal-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: var(--font-size-small);
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-body-large);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(232, 90, 79, 0.3);
    padding: 0px !important;
}

.back-to-top.visible {
    opacity: 0.5;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(232, 90, 79, 0.4);
}

/* Desktop Layout - Ensure 4 columns stay in single row */
@media (min-width: 992px) {
    .footer-content .row {
        flex-wrap: nowrap;
    }
    
    .footer-content .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Tablet Layout - 2x2 grid */
@media (min-width: 769px) and (max-width: 991px) {
    .footer-content .row {
        flex-wrap: wrap;
    }
    
    .footer-content .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: var(--spacing-lg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .footer-content {
        padding: var(--spacing-xl) 0;
    }
    
    .footer-content .row {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    .footer-content .col-lg-3 {
        flex: none;
        min-width: 100%;
    }
    
    .footer-section {
        margin-bottom: var(--spacing-lg);
        text-align: left;
    }
    
    .footer-legal {
        text-align: left;
        margin-top: var(--spacing-md);
    }
    
    .footer-copyright {
        text-align: left;
    }
    
    .footer-bottom .row {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .footer-bottom .col-md-6 {
        width: 100%;
    }
    
    .legal-links {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .footer-social {
        justify-content: flex-start;
    }
    
    .footer-contact .contact-item {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }
    
    .footer-contact .contact-item i {
        margin-right: var(--spacing-sm);
        margin-bottom: 0;
        margin-top: 2px;
    }
    
    .back-to-top {
        bottom: 65px;
        right: 25px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .footer-content {
        padding: var(--spacing-lg) 0;
    }
    
    .footer-logo h3 {
        font-size: var(--font-size-h4);
    }
    
    .footer-title {
        font-size: var(--font-size-h6);
    }
    
    .footer-section {
        text-align: left;
    }
    
    .footer-legal {
        text-align: left;
    }
    
    .legal-links {
        flex-direction: column;
        gap: var(--spacing-xs);
        justify-content: flex-start;
    }
    
    .footer-social {
        justify-content: flex-start;
    }
    
    .footer-copyright {
        text-align: left;
    }
    
    .footer-bottom .row {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .footer-bottom .col-md-6 {
        width: 100%;
    }
}