/* Refined Footer Variables */
:root {
    --footer-bg: #FAFAFA;
    /* Soft grey background */
    --footer-text: #666666;
    /* Clean grey text */
    --footer-heading: #1A1A1A;
    /* Sharp black for headings */
    --footer-accent: #5A0F1B;
    /* Brand Burgundy */
    --footer-border: #EAEAEA;
    --footer-shadow: 0px -4px 20px rgba(0, 0, 0, 0.04);
}

/* Main Footer */
.main-footer {
    background-color: var(--footer-bg);
    padding: 60px 0 0;
    /* Removed bottom padding */
    border-top: 1px solid var(--footer-border);
    box-shadow: var(--footer-shadow);
    font-family: 'Lato', sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    /* Brand column wider */
    gap: 40px;
    /* Reduced from 60px for compact look */
    align-items: start;
}

/* Footer Columns */
.footer-col h4 {
    font-family: 'Playfair Display', serif;
    color: var(--footer-heading);
    font-size: 1.1rem;
    font-weight: 800;
    /* Bolder titles */
    margin-bottom: 24px;
    position: relative;
    letter-spacing: 0.5px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 24px;
    /* Consistent accent line */
    height: 2px;
    background-color: var(--footer-accent);
    border-radius: 1px;
}

/* Brand Column */
.footer-brand h3 {
    font-family: 'Playfair Display', serif;
    color: var(--footer-accent);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.2;
}

.footer-brand .subtitle {
    font-size: 0.85rem;
    color: var(--footer-heading);
    font-weight: 600;
    margin-bottom: 16px;
    display: block;
    opacity: 0.8;
}

.footer-brand p {
    color: var(--footer-text);
    font-size: 0.9rem;
    /* Reduced size */
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 280px;
}

/* Social Icons - Refined */
.social-links {
    display: flex;
    gap: 10px;
    /* Even spacing */
}

.social-icon {
    width: 32px;
    /* Smaller, cleaner icons */
    height: 32px;
    background-color: #FFFFFF;
    border: 1px solid #DDDDDD;
    /* Subtle border */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-icon:hover {
    background-color: var(--footer-accent);
    color: white;
    border-color: var(--footer-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(90, 15, 27, 0.2);
}

/* Links List */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
    /* Tighter spacing */
}

.footer-links a {
    text-decoration: none;
    color: var(--footer-text);
    font-size: 0.9rem;
    /* Reduced size */
    transition: all 0.2s ease;
    display: inline-block;
    font-weight: 400;
}

.footer-links a:hover {
    color: var(--footer-accent);
    transform: translateX(3px);
    font-weight: 500;
}

/* Contact Info */
.contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--footer-text);
    font-size: 0.9rem;
}

.contact-icon {
    color: var(--footer-accent);
    font-size: 1rem;
    margin-top: 3px;
    /* Align with text baseline */
    flex-shrink: 0;
}

/* Copyright Bar */
.footer-bottom {
    margin-top: 50px;
    padding: 25px 0;
    /* Equal padding top and bottom */
    border-top: 1px solid var(--footer-border);
    text-align: center;
}

.copyright {
    color: #888888;
    /* Lighter text */
    font-size: 0.85rem;
    font-weight: 300;
    /* Thinner font */
    margin: 0;
    /* Remove extra margin */
}

.copyright span {
    color: var(--footer-accent);
    font-weight: 500;
}

/* RTL Support */
html[dir="rtl"] .footer-col h4::after {
    left: auto;
    right: 0;
}

html[dir="rtl"] .footer-links a:hover {
    transform: translateX(-3px);
}

html[dir="rtl"] .contact-info li {
    text-align: right;
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-brand p,
html[dir="rtl"] .footer-links,
html[dir="rtl"] .contact-info {
    text-align: right;
}

html[dir="rtl"] .social-links {
    justify-content: flex-start;
}

/* Responsive Design - Tablet */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        /* 2x2 layout on tablet */
        gap: 30px;
    }

    .footer-brand {
        grid-column: 1 / -1;
        /* Brand spans full width */
        text-align: center;
    }

    .footer-brand p {
        margin-left: auto;
        margin-right: auto;
    }

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

/* Responsive Design - Mobile (≤768px) */
@media (max-width: 768px) {
    .main-footer {
        padding: 40px 0 0;
    }

    .footer-container {
        grid-template-columns: 1fr;
        /* Stacked on mobile */
        gap: 30px;
        text-align: center;
    }

    .footer-brand,
    .footer-col {
        text-align: center;
    }

    .footer-brand h3,
    .footer-col h4 {
        text-align: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-brand p {
        max-width: 100%;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .contact-info {
        text-align: center;
    }

    .contact-info li {
        justify-content: center;
    }

    .footer-bottom {
        margin-top: 40px;
        padding: 20px 0;
    }
}

/* RTL Mobile Adjustments */
@media (max-width: 768px) {
    html[dir="rtl"] .footer-col h4::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    html[dir="rtl"] .footer-brand,
    html[dir="rtl"] .footer-col,
    html[dir="rtl"] .footer-links,
    html[dir="rtl"] .contact-info {
        text-align: center;
    }

    html[dir="rtl"] .contact-info li {
        justify-content: center;
        flex-direction: row;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .footer-container {
        gap: 24px;
        padding: 0 15px;
    }

    .footer-brand h3 {
        font-size: 1.4rem;
    }

    .footer-col h4 {
        font-size: 1rem;
    }

    .footer-links a,
    .contact-info li {
        font-size: 0.85rem;
    }
}