/* Allergy News Custom Styles */

/* Global Styles */
body {
    font-family: Georgia, serif;
}

/* Layout Styles */
.container-fluid {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0px 60px !important;
}

/* Header Styles */
.top-header {
    background-color: #fff;
    padding-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.logo-container {
    margin-top: 0;
    padding-top: 0;
}
.logo-container img {
    max-height: 80px;
    margin-top: 0;
    display: block;
}

.main-nav {
    background-color: #fff;
    padding: 20px 0;
    width: 100%;
}

.main-nav .nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;  /* Dàn đều các items */
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.main-nav .nav-item {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.main-nav .nav-link {
    color: #A1A1A1;
    padding: 8px 12px;
    font-size: 15px;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.main-nav .nav-link:hover {
    color: #000000;
}

.main-nav .nav-item.active .nav-link {
    color: #000000;
    background-color: #ACBBC7;
}

.contact-btn {
    background-color: transparent;
    border: 1px solid #ACBBC7;
    color: #000000;
    padding: 8px 25px;
    border-radius: 2px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 2px 2px 0px #000000;
    transition: all 0.2s ease;
}

/* .contact-btn:hover {
    background-color: #000000;
    color: #fff;
    box-shadow: 1px 1px 0px #000000;
    transform: translate(2px, 2px);
} */

/* Search and Navigation Section */
.search-nav-section {
    padding: 20px 0;
}

.search-nav-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Changed to space-between */
    width: 100%; /* Changed from max-width */
}

/* Search Bar */
.search-container {
    position: relative;
    width: 300px;
    flex-shrink: 0;
}

.search-container input {
    width: 100%;
    padding: 10px 15px 10px 40px; /* Changed padding to accommodate left icon */
    border: none; /* Removed border */
    border-radius: 2px;
    font-family: Georgia, serif;
    background-color: #F5F5F5; /* Added light background for distinction */
}

.search-container input:focus {
    outline: none; /* Remove focus outline */
}

.search-container .search-icon {
    position: absolute;
    left: 15px; /* Changed from right to left */
    top: 50%;
    transform: translateY(-50%);
    color: #A1A1A1;
}

/* Daily News Header Section */
.daily-news-header {
    background-color: #fff;
    position: relative;
    text-align: center;
    width: 100%;
    overflow: hidden; /* Prevent line overflow */
}

.daily-news-title {
    font-size: clamp(28px, 5vw, 60px); /* Responsive font size */
    font-weight: 700;
    color: #000000;
    margin: 0;
    letter-spacing: -1px;
    display: inline-block;
    position: relative;
    padding: 0 clamp(20px, 3vw, 50px); /* Responsive padding */
}

.daily-news-title::before,
.daily-news-title::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 1px;
    background-color: #A1A1A1;
    width: clamp(50%, 155%, 155%); /* Responsive width */
}

.daily-news-title::before {
    right: 100%;
}

.daily-news-title::after {
    left: 100%;
}

/* Sub Navigation */
.sub-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sub-nav::-webkit-scrollbar {
    height: 2px;
    width: 30%;
}

.sub-nav::-webkit-scrollbar-thumb {
    background-color: #A1A1A1;
    border-radius: 2px;
}

.sub-nav::-webkit-scrollbar-track {
    margin: 0 35%;
}

.sub-nav .nav {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    width: max-content;
    padding-bottom: 5px; /* Add space for scrollbar */
}

.sub-nav .nav-link {
    color: #A1A1A1;
    padding: 5px 15px;
    font-size: 14px;
    white-space: nowrap;
    text-decoration: none; /* Remove underline */
}

.sub-nav .nav-link:hover {
    color: #000000;
    text-decoration: none; /* Keep no underline on hover */
}

.sub-nav .nav-item.active .nav-link {
    background-color: #ACBBC7;
    color: #000000;
    border-radius: 2px;
}

/* News Sections */
.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #1B4B65;
    margin-bottom: 20px;
}

.news-card {
    margin-bottom: 30px;
    border: none;
}

/* Update selector to exclude square-image class */
.news-card img:not(.square-image) {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card .card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.news-card .card-text {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.news-meta {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
    float: right;
}

/* Popular News Sidebar */

.popular-news .news-item:last-child {
    border-bottom: none;
}

.popular-news .news-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.page-link {
    color: #1B4B65;
    border: none;
    margin: 0 5px;
}

.page-item.active .page-link {
    background-color: #1B4B65;
    border-color: #1B4B65;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .daily-news-title::before,
    .daily-news-title::after {
        width: clamp(30%, 100%, 120%);
    }
}

@media (max-width: 992px) {
    .daily-news-title {
        font-size: 48px;
    }
    .daily-news-title::before,
    .daily-news-title::after {
        width: clamp(20%, 80%, 100%);
    }
    .main-nav .nav-link {
        padding: 6px 10px;
        font-size: 14px;
    }
    .container-fluid.px-28 {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 768px) {
    .search-nav-container {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .search-container {
        width: 100%;
        order: -1; /* Move search to top */
    }
    
    .sub-nav {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .sub-nav .nav {
        justify-content: flex-start;
        width: max-content;
        padding-bottom: 5px;
        min-width: 100%; /* Ensure it's at least full width */
    }
    .sub-nav::-webkit-scrollbar {
        height: 2px;
        width: 30%;
    }
    .sub-nav::-webkit-scrollbar-thumb {
        background-color: #A1A1A1;
        border-radius: 2px;
    }
    .sub-nav::-webkit-scrollbar-track {
        margin: 0 35%;
    }
    .daily-news-title {
        font-size: 36px;
        padding: 0 30px;
    }
    .daily-news-title::before,
    .daily-news-title::after {
        width: clamp(15%, 60%, 80%);
    }
    .main-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    .main-nav .nav {
        flex-wrap: nowrap;
        padding-bottom: 5px;
        width: max-content;
        justify-content: flex-start;  /* Chuyển sang flex-start khi responsive */
        gap: 5px;
    }
    .main-nav::-webkit-scrollbar {
        height: 2px;
        width: 30%;
    }
    .main-nav::-webkit-scrollbar-thumb {
        background-color: #A1A1A1;
        border-radius: 2px;
    }
    .main-nav::-webkit-scrollbar-track {
        margin: 0 35%;
    }
    .contact-btn {
        padding: 6px 15px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .search-container input {
        font-size: 14px; /* Slightly smaller font on mobile */
    }
    .daily-news-title::before,
    .daily-news-title::after {
        width: clamp(10%, 40%, 60%);
    }
}

/* Top Footer */
.top-footer {
    padding: 15px 0;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    margin: 30px 0;
}

.footer-logo {
    width: 82px;
    height: 42px;
}

.footer-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.nav-container {
    display: block;
}

.top-footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.top-footer-nav li {
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.top-footer-nav li:first-child {
    margin-left: 0;
}

.top-footer-nav li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}

.top-footer-nav li.separator {
    color: #e5e5e5;
    margin: 0 10px;
}

.top-footer-nav li.social-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-footer-nav li.social-icons a {
    color: #333;
    font-size: 18px;
}

.top-footer-nav li.social-icons a:hover {
    color: #000;
}

.top-footer-nav li.sign-in-item {
    margin-left: 30px;
}

/* Sign In Button */
.btn-outline-dark {
    border: 2px solid #000;
    color: #000;
    padding: 8px 24px;
    font-weight: 500;
    border-radius: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 3px 3px 0 #000;
}

.btn-outline-dark:hover {
    background-color: #000;
    color: #fff;
    box-shadow: none;
    transform: translate(3px, 3px);
}

.float-end {
    float: right;
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links li a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.footer-links li a:hover {
    color: #333;
}

/* Copyright Section */
.copyright-section {
    background-color: #000000;
    padding: 15px 0;
}

.copyright {
    color: #A1A1A1;
    font-size: 14px;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .nav-container {
        float: none;
        margin-top: 15px;
    }

    .top-footer-nav {
        justify-content: center;
    }

    .footer-logo {
        margin: 0 auto;
    }

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

@media (max-width: 768px) {
    .top-footer-nav {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .top-footer-nav li {
        margin: 0;
    }

    .top-footer-nav li.separator {
        display: none;
    }

    .top-footer-nav li.social-icons {
        margin: 10px 0;
    }

    .top-footer-nav li.sign-in-item {
        margin: 10px 0 0 0;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .container-fluid.px-28 {
        padding-left: 15px;
        padding-right: 15px;
    }

    .top-footer {
        padding: 20px 0;
        text-align: center;
    }

    .footer-logo {
        margin-bottom: 15px;
    }
}
