/**
 * FOOTER COMPONENT CSS
 * Modern Real Estate Footer - With Background Image & Gradient
 */

/* ==========================================================================
   SITE FOOTER - Main Container
   ========================================================================== */
.site-footer {
    background-color: var(--color-primary);
    color: #fff;
}

/* ==========================================================================
   FOOTER MAIN SECTION - Background Image with Gradient Overlay
   ========================================================================== */
.footer-main-section {
    position: relative;
    padding: 80px 0 60px;
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
}

/* Gradient Overlay - Trong suốt ~50% để thấy nền phía sau */
.footer-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 102, 179, 0.50) 0%,
        rgba(0, 174, 239, 0.45) 100%
    );
    z-index: 1;
}

/* Add subtle pattern overlay for texture */
.footer-gradient-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); */
    background-image: url('../images/footer.png');
    opacity: 0.5;
}

.footer-main-section .container {
    position: relative;
    z-index: 2;
}

.footer-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   FOOTER BRAND - Logo & Description
   ========================================================================== */
.footer-brand {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: inline-block;
    margin-bottom: 20px;
}

.footer-logo img {
    max-height: 80px;
    width: auto;
    /* Giữ màu gốc logo - không filter trắng */
    transition: opacity 0.3s ease;
}

.footer-logo:hover img {
    opacity: 0.85;
}

.footer-brand-desc {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   FOOTER GRID - 3 Columns Layout
   ========================================================================== */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
}

.footer-column {
    padding: 0 15px;
}

/* Column Title */
.footer-column-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 25px;
    padding-bottom: 15px;
    position: relative;
    letter-spacing: -0.01em;
}

.footer-column-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.6), transparent);
}

/* ==========================================================================
   FOOTER LINKS LIST
   ========================================================================== */
.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-list li {
    margin-bottom: 12px;
}

.footer-links-list a {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.footer-links-list a::before {
    content: '';
    width: 0;
    height: 1px;
    background-color: #fff;
    position: absolute;
    left: 0;
    bottom: -2px;
    transition: width 0.3s ease;
}

.footer-links-list a:hover {
    color: #fff;
    padding-left: 8px;
}

.footer-links-list a:hover::before {
    width: 100%;
}

/* ==========================================================================
   FOOTER CONTACT LIST
   ========================================================================== */
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.footer-contact-list li:last-child {
    margin-bottom: 0;
}

.footer-contact-list li i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    margin-right: 15px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-contact-list li > div {
    flex: 1;
}

.footer-contact-list .contact-label {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.footer-contact-list li a,
.footer-contact-list li span {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.footer-contact-list li a:hover {
    color: var(--color-secondary);
}

/* ==========================================================================
   FOOTER SOCIAL LINKS
   ========================================================================== */
.footer-social-text {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}

.footer-social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-social-links a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social-links a:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 174, 239, 0.3);
}

/* ==========================================================================
   FOOTER BOTTOM - Copyright Bar
   ========================================================================== */
.footer-bottom {
    background-color: rgba(0, 80, 140, 0.3);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.copyright {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
}

.copyright strong {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.footer-bottom-text {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom-text a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom-text a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ==========================================================================
   FLOATING CONTACT & BACK TO TOP - Unified Layout
   ========================================================================== */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 999;
}

/* Back to Top nằm trong cùng container với floating buttons */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0066b3, #00aeef);
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 1000;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 102, 179, 0.3);
}

/* Khi có floating-contact, back-to-top nằm phía trên */
.floating-contact ~ .back-to-top,
.back-to-top:has(~ .floating-contact) {
    bottom: auto;
}

/* Position when visible - stack above floating buttons */
.back-to-top.visible {
    display: none;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    /* Tính toán: floating-contact bottom (30px) + 2 buttons (52px*2) + gaps (12px*2) + spacing (20px) */
    bottom: 178px;
}

.back-to-top:hover {
    background: linear-gradient(135deg, #00aeef, #0066b3);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 174, 239, 0.4);
    color: #fff;
}

.floating-btn {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.floating-btn:hover {
    transform: scale(1.1) translateY(-3px);
    color: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.floating-btn.phone {
    background: linear-gradient(135deg, var(--brand-accent, #f5821f) 0%, var(--brand-accent-dark, #d96d0a) 100%);
}

.floating-btn.phone:hover {
    background: linear-gradient(135deg, var(--brand-accent-dark, #d96d0a) 0%, #c45a00 100%);
}
.floating-btn.zalo {
    background: linear-gradient(135deg, #0068ff, #0052cc);
}

.floating-btn.zalo:hover {
    box-shadow: 0 8px 30px rgba(0, 104, 255, 0.4);
}

.floating-btn.messenger {
    background: linear-gradient(135deg, #0084ff, #006acc);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1199.98px) {
    .footer-main-section {
        padding: 70px 0 50px;
    }

    .footer-grid {
        gap: 40px;
    }

    .footer-column {
        padding: 0 10px;
    }
}

@media (max-width: 991.98px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 30px;
    }

    .footer-column:last-child {
        grid-column: span 2;
        text-align: center;
    }

    .footer-column:last-child .footer-column-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-column:last-child .footer-social-links {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .footer-main-section {
        padding: 50px 0 40px;
    }

    .footer-brand {
        margin-bottom: 40px;
        padding-bottom: 30px;
    }

    .footer-logo img {
        max-height: 50px;
    }

    .footer-brand-desc {
        font-size: 13px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-column {
        padding: 0;
        text-align: center;
    }

    .footer-column:last-child {
        grid-column: span 1;
    }

    .footer-column-title {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .footer-column-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links-list a {
        justify-content: center;
    }

    .footer-links-list a:hover {
        padding-left: 0;
    }

    .footer-contact-list {
        display: inline-block;
        text-align: left;
    }

    .footer-contact-list li {
        margin-bottom: 15px;
    }

    .footer-contact-list li i {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .footer-social-links {
        justify-content: center;
    }

    .footer-social-links a {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    .copyright,
    .footer-bottom-text {
        font-size: 12px;
    }

    /* Floating contact at bottom right */
    .floating-contact {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }

    .floating-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    /* Back to top stacked above floating contact */
 
    .back-to-top.visible {
        /* floating bottom (20px) + 2 buttons (48px*2) + gaps (10px) + spacing (15px) */
        bottom: 141px;
        display: block;
    }
}

@media (max-width: 480px) {
    .footer-main-section {
        padding: 40px 0 30px;
    }

    .footer-brand {
        margin-bottom: 30px;
        padding-bottom: 25px;
    }

    .footer-grid {
        gap: 30px;
    }

    .footer-contact-list li i {
        width: 34px;
        height: 34px;
        font-size: 12px;
        margin-right: 12px;
    }

    .footer-contact-list .contact-label {
        font-size: 10px;
    }

    .footer-contact-list li a,
    .footer-contact-list li span {
        font-size: 13px;
    }

    .footer-column-hide {
        display: none;
    }

}

/* ==========================================================================
   OLD FOOTER STYLES - Keep for compatibility
   ========================================================================== */
/* Footer Main (legacy) */
.footer-main {
    padding: 80px 0 60px;
}

/* Widget Area (legacy) */
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.widget-column {
    padding: 0;
}

/* Widget Title (legacy) */
.widget-title {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: var(--fw-normal);
    color: var(--color-white);
    margin-bottom: 25px;
    padding-bottom: 15px;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--color-secondary);
}

/* Footer Text (legacy) */
.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Footer Links (legacy) */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--fs-sm);
    transition: all var(--transition-fast);
}

.footer-links a::before {
    content: '\f105';
    font-family: FontAwesome;
    margin-right: 10px;
    font-size: 12px;
    color: var(--color-secondary);
}

.footer-links a:hover {
    color: var(--color-secondary);
    padding-left: 5px;
}

/* Footer Contact Info (legacy) */
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--fs-sm);
}

.footer-contact li i {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-secondary);
    border-radius: var(--radius-sm);
    margin-right: 15px;
    flex-shrink: 0;
}

.footer-contact li a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact li a:hover {
    color: var(--color-secondary);
}

/* Footer Social (legacy) */
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background-color: var(--color-secondary);
    transform: translateY(-3px);
}

/* Site Info (legacy) */
.site-info {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-info .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

/* Footer Contact Section (legacy - Get in touch style) */
.footer-contact-section {
    position: relative;
    padding: 120px 0 100px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(23, 62, 98, 0.85), rgba(23, 62, 98, 0.95));
    z-index: 1;
}

.footer-contact-section .container {
    position: relative;
    z-index: 2;
}

.footer-contact-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 50px;
    letter-spacing: -0.02em;
}

.footer-contact-grid {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-contact-item {
    text-align: center;
}

.footer-contact-item .contact-label {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 12px;
}

.footer-contact-item .contact-value {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
}

.footer-contact-item .contact-value:hover {
    color: var(--color-secondary);
}

.footer-address {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

/* ==========================================================================
   FOOTER CONTACT FORM - Quick Registration
   Đồng bộ với contact.css style
   ========================================================================== */
.footer-form-desc {
    font-family: var(--font-body);
    font-size: var(--fs-sm, 14px);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.6;
}

.footer-contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-form-group {
    position: relative;
}

/* Input style đồng bộ với .contact-form-control */
.footer-form-input {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: var(--fs-base, 14px);
    font-weight: 400;
    color: var(--text-primary, #1e293b);
    background-color: var(--bg-light, #f8f9fa);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--radius-sm, 6px);
    outline: none;
    transition: all var(--transition-fast, 0.2s ease);
}

.footer-form-input::placeholder {
    color: var(--text-muted, #94a3b8);
}

.footer-form-input:focus {
    background-color: var(--color-white, #fff);
    border-color: var(--color-primary, #0066b3);
    box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.1);
}

.footer-form-input.is-invalid {
    border-color: #dc3545;
    background-color: #fff;
}

/* Submit button đồng bộ với .btn-contact-submit */
.footer-form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 40px;
    font-family: var(--font-body);
    font-size: var(--fs-base, 14px);
    font-weight: var(--fw-medium, 500);
    color: var(--color-white, #fff);
    background: var(--color-primary, #0066b3);
    border: none;
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    transition: all var(--transition-base, 0.3s ease);
}

.footer-form-submit:hover {
    background: var(--color-secondary, #00aeef);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 4px 15px rgba(0, 0, 0, 0.15));
}

.footer-form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.footer-form-submit i {
    font-size: 16px;
}

/* Footer Form Alert - đồng bộ với .contact-alert */
.footer-form-alert {
    margin-top: 12px;
}

.footer-alert {
    padding: 15px 20px;
    border-radius: var(--radius-sm, 6px);
    font-family: var(--font-body);
    font-size: var(--fs-sm, 13px);
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: fadeInAlert 0.3s ease;
}

.footer-alert.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.footer-alert.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Field error message */
.footer-field-error {
    color: #dc3545;
    font-size: var(--fs-xs, 12px);
    margin-top: 5px;
    display: block;
}

@keyframes fadeInAlert {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Form Responsive */
@media (max-width: 991.98px) {
    .footer-column:last-child .footer-contact-form {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 767.98px) {
    .footer-form-input {
        padding: 12px 14px;
    }

    .footer-form-submit {
        padding: 14px 30px;
    }
}

/* Legacy Responsive */
@media (max-width: 1199.98px) {
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .footer-main {
        padding: 60px 0 40px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .widget-title {
        font-size: var(--fs-lg);
        margin-bottom: 20px;
    }

    .site-info .container {
        flex-direction: column;
        text-align: center;
    }
}
