﻿/* layout.css - Phiên bản hoàn thiện với sửa responsive */

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f9f9f9;
    color: #000;
    line-height: 1.6;
    scroll-behavior: smooth;
}

a {
    color: #007bff;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* === Navbar === */
.custom-navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 0.8rem 1rem;
    z-index: 999;
    max-width: 100%;
}

    .custom-navbar .container {
        max-width: 1400px !important;
    }

    .custom-navbar .navbar-brand,
    .custom-navbar .brand-text {
        color: #003087;
        font-weight: bold;
        font-size: 18px;
    }

    .custom-navbar .nav-link {
        color: #000000bd;
        font-size: 15px;
        font-weight: bold;
        transition: all 0.3s ease;
        text-transform: uppercase;
        padding: 8px 12px;
        margin: 0 2px;
        border-radius: 5px;
    }

        .custom-navbar .nav-link:hover {
            color: #ffc107;
            border-radius: 5px;
            text-decoration: none;
            background-color: rgba(255, 193, 7, 0.15);
            padding: 8px 12px;
            margin: 0 2px;
            transition: all 0.3s ease;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
        }

        .custom-navbar .nav-link.active {
            color: #ffffff;
            background-color: #ffc107;
            border-radius: 5px;
            text-decoration: none;
            padding: 8px 12px;
            margin: 0 2px;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
        }


.navbar-brand img {
    max-height: 70px;
}

/* === Dropdown === */
.dropdown-menu {
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    color: #34495e;
    transition: background 0.2s;
}

    .dropdown-item:hover {
        background-color: #ecf0f1;
        color: #2980b9;
    }

.btn-warning.btn-sm {
    font-weight: bold;
    color: #ffffff;
    background-color: #e67e22;
    border: none;
}

/* === Profile Icon & Username === */
.profile-icon i {
    font-size: 1.5rem;
    color: #0d6efd;
}

.username {
    font-weight: 500;
    margin-left: 8px;
}

.nav-item .profile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    transition: all 0.3s ease;
    margin-left: 10px;
}

    .nav-item .profile-icon:hover {
        color: #ffffff;
        transform: scale(1.1);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

.nav-item .username {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 500;
    margin-left: 8px;
    transition: color 0.3s ease;
}

.nav-item .profile-icon:hover .username {
    color: #e74c3c;
}

/* === Footer === */
.footer {
    background-color: #f1f4f6;
    padding: 40px 0 20px;
    border-top: 1px solid #ddd;
    color: #444;
}

    .footer h4 {
        font-size: 1.2rem;
        font-weight: 700;
        margin-bottom: 15px;
    }

    .footer p, .footer a {
        font-size: 0.95rem;
        color: #555;
    }

        .footer a:hover {
            text-decoration: underline;
        }

    .footer .social-links a {
        display: inline-block;
        margin-right: 12px;
        font-size: 1.2rem;
        color: #007bff;
        transition: transform 0.3s ease;
    }

        .footer .social-links a:hover {
            transform: scale(1.2);
            color: #0056b3;
        }

.map-responsive iframe {
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* === Back to Top Button === */
#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10002;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

    #backToTop:hover {
        background-color: #0056b3;
        transform: scale(1.1);
    }

/* === Floating Contact Button === */
.floating-contact {
    position: fixed;
    bottom: 90px;
    right: 30px;
    z-index: 10001;
}

.contact-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

    .contact-button:hover {
        background-color: #0056b3;
        transform: scale(1.1);
    }

.contact-tooltip {
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.contact-button:hover + .contact-tooltip {
    opacity: 1;
}

.floating-contact:hover .contact-tooltip {
    display: block;
}

/* Pulse Animation */
.contact-button.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.6);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }

    100% {
        transform: scale(1);
    }
}

/* === Contact Modal === */
.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

    .contact-modal.show {
        display: flex;
    }

.contact-modal-content {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #aaa;
    transition: color 0.2s;
}

    .contact-modal-close:hover {
        color: #333;
    }

.contact-modal-item {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    align-items: center;
}

.contact-modal-icon {
    font-size: 1.5rem;
}

.contact-form-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #ffc107;
    color: #212529;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s;
}

    .contact-form-btn:hover {
        background-color: #e0a800;
    }

/* === Favorite Floating Button === */
.favorite-floating-btn {
    position: fixed;
    bottom: 160px;
    right: 30px;
    z-index: 10010;
    background: #fff;
    color: #e74c3c;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 16px rgba(44,62,80,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: box-shadow 0.2s, background 0.2s;
    border: 2px solid #e74c3c;
}

    .favorite-floating-btn:hover {
        background: #e74c3c;
        color: #fff;
        box-shadow: 0 8px 32px rgba(44,62,80,0.22);
    }

.favorite-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    font-size: 0.95rem;
    padding: 2px 8px;
    font-weight: bold;
    border: 2px solid #fff;
}

/* === Footer Info === */
.footer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-left: 12px;
    padding-right: 6px;
    text-align: left;
}

.footer-logo {
    width: 200px;
    max-width: 90%;
    border-radius: 8px;
    box-shadow: 0 2px 16px #00308713;
    margin-right: auto;
    margin-left: 0;
    display: block;
}

.footer-desc {
    font-size: 1.2rem !important;
    color: #3a3a3a;
    line-height: 1.6;
    margin-bottom: 10px;
    width: 100%;
    text-align: left;
}

.footer-contact {
    width: 100%;
    margin-bottom: 10px;
    text-align: left;
}

    .footer-contact p {
        margin-bottom: 7px;
        font-size: 0.98rem;
        color: #555;
        display: flex;
        align-items: center;
        gap: 8px;
        justify-content: flex-start;
        flex-direction: row;
    }

    .footer-contact i {
        color: #007bff !important;
        margin-right: 7px;
        margin-left: 0;
        font-size: 1.08em;
        min-width: 18px;
        text-align: center;
    }

.footer-time i {
    color: #ffc107;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    justify-content: flex-start;
    width: 100%;
    flex-direction: row;
}

    .social-links a {
        width: 36px;
        height: 36px;
        background: #fff;
        border-radius: 50%;
        display: flex !important;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px #007bff10;
        font-size: 1.3rem;
        transition: background 0.18s, box-shadow 0.18s, color 0.18s;
        margin: 0;
        border: 1.5px solid #e5e9f2;
        text-decoration-line: none;
    }

        .social-links a.facebook i {
            color: #1877f3;
        }

        .social-links a.youtube i {
            color: #ff0000;
        }

        .social-links a.instagram i {
            color: #e4405f;
        }

        .social-links a.facebook:hover {
            background: #1877f3;
            color: #fff;
            box-shadow: 0 2px 18px #1877f340;
        }

            .social-links a.facebook:hover i,
            .social-links a.youtube:hover i,
            .social-links a.instagram:hover i {
                color: #fff;
            }

        .social-links a.youtube:hover {
            background: #ff0000;
            color: #fff;
            box-shadow: 0 2px 18px #ff00003a;
        }

        .social-links a.instagram:hover {
            background: radial-gradient(circle at 30% 110%, #fccf33 0%, #f55555 50%, #e4405f 80%, #5b51d8 100%);
            color: #fff;
            box-shadow: 0 2px 18px #e4405f3a;
        }

h2.mb-3 {
    color: #111;
}

/* === Responsive === */
@media (max-width: 768px) {
    .navbar-brand img {
        max-height: 50px;
    }

    .custom-navbar .nav-link {
        padding: 0.5rem 0.8rem;
        margin: 2px 0;
    }

        .custom-navbar .nav-link.active {
            background-color: #ffc107;
            color: #ffffff;
            border-radius: 5px;
            margin: 2px 0;
        }

    .footer .row {
        text-align: center;
    }

    .contact-modal-content {
        padding: 20px;
    }

    .contact-tooltip {
        bottom: 60px;
        right: -20px;
    }

    .footer-info {
        align-items: center;
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }

    .footer-desc, .footer-contact {
        text-align: center;
    }

        .footer-contact p {
            justify-content: center;
        }

    .social-links {
        justify-content: center;
    }
}

/* Responsive enhancements */
@media (max-width: 576px) {
    .container {
        padding: 10px; /* Giảm padding để tiết kiệm không gian */
    }

    .custom-navbar .navbar-brand img {
        max-height: 40px; /* Logo nhỏ hơn trên mobile */
        width: auto;
    }

    .custom-navbar .nav-link {
        font-size: 14px; /* Font nhỏ hơn */
        padding: 0.4rem 0.6rem;
    }

    .footer .footer-logo {
        width: 150px; /* Logo footer nhỏ hơn */
    }

    .footer .social-links a {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }

    .footer .map-responsive iframe {
        height: 180px; /* Bản đồ nhỏ hơn */
    }

    #backToTop, .floating-contact, .favorite-floating-btn {
        bottom: 20px; /* Điều chỉnh vị trí floating buttons để tránh chồng chéo */
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .favorite-floating-btn {
        bottom: 80px; /* Tránh chồng floating contact */
    }
}

@media (max-width: 480px) {
    .footer .row {
        flex-direction: column; /* Stack footer sections vertically */
    }

    .footer .col-md-4 {
        margin-bottom: 20px;
    }

    .contact-modal-content {
        padding: 15px;
        max-width: 90%;
    }
}

