/* =========================================
   PAGE-SPECIFIC STYLES FOR AMTHUC
   ========================================= */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #f8f8f8;
    --primary-color: #c0392b;
    /* Màu đỏ giống logo chính */
    --border-color: #dddddd;
    --price-color: #d35400;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #f1f1f1;
    --card-bg: #1e1e1e;
    --border-color: #333333;
    --price-color: #f39c12;
}


* {
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* =========================================
   1. SECTION CHUNG & LƯỚI MÓN ĂN
   ========================================= */
.section-title {
    text-align: center;
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-desc {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 30px;
    font-size: 16px;
    opacity: 0.8;
}

section {
    padding: 60px 5%;
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    cursor: pointer;
    border-radius: 25px;
    font-weight: bold;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.food-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, opacity 0.4s ease-in-out;
    opacity: 1;
}

.food-card.fade-out {
    opacity: 0;
}

.food-card.fade-in {
    opacity: 1;
}

@media (max-width: 940px) {
    .food-grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
}

@media (max-width: 640px) {
    .food-grid {
        grid-template-columns: 1fr;
    }
}

.food-card:hover {
    transform: translateY(-8px);
}

.food-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.card-content p {
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
    opacity: 0.9;
}

.price-tag {
    display: inline-block;
    font-weight: bold;
    color: var(--price-color);
    background: rgba(230, 126, 34, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
}

/* =========================================
   4. CÔNG CỤ ƯỚC TÍNH (ESTIMATOR)
   ========================================= */
.estimator-section {
    background-color: var(--card-bg);
}

.estimator-container {
    max-width: 1000px;
    margin: 0 auto;
}

.estimator-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 30px;
}

.selection-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.selection-col h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
}

.checkbox-item:hover {
    border-color: var(--primary-color);
}

.checkbox-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    height: 24px;
    width: 24px;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    margin-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.checkbox-item input:checked~.checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-item input:checked~.checkmark::after {
    content: "✔";
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.checkbox-item input:checked~.item-info strong {
    color: var(--primary-color);
}

.item-info {
    display: flex;
    flex-direction: column;
}

.item-info strong {
    font-size: 16px;
    transition: 0.2s;
}

.item-info span {
    font-size: 13px;
    color: var(--price-color);
    margin-top: 3px;
    font-weight: 500;
}

.result-col {
    position: sticky;
    top: 100px;
}

.people-input-group {
    margin-bottom: 25px;
}

.people-input-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}

.people-input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    border-radius: 10px;
    font-size: 18px;
    text-align: center;
    font-weight: bold;
    outline: none;
}

.people-input-group input:focus {
    border-color: var(--primary-color);
}

.price-board {
    background: linear-gradient(135deg, var(--primary-color), #d35400);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(211, 84, 0, 0.2);
    margin-top: 10px;
}

.price-board p {
    font-size: 16px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.range-display {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
}

.range-display span {
    font-size: 32px;
    font-weight: 900;
}

.range-display .divider {
    font-size: 16px;
    font-weight: normal;
    opacity: 0.8;
}

.price-board .note {
    font-size: 12px;
    font-style: italic;
    opacity: 0.7;
    margin-top: 20px;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .estimator-grid {
        grid-template-columns: 1fr;
    }

    .result-col {
        position: static;
    }
}

.cta {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 80px 20px;
    text-align: center;
    margin-top: 110px;

    background:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('../img/anh1.jpg') center/cover no-repeat;

    color: white;
}

.cta h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.cta button {
    margin-top: 20px;
    padding: 12px 25px;
    border: none;
    background: #c0392b;
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
}

.cta button:hover {
    background: #e74c3c;
    transform: scale(1.05);
}


/* FOOTER */

footer {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: #222;
    color: #ddd;
    padding: 50px 5%;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    margin-bottom: 15px;
    color: white;
}

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

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

/* ===== CHỈ ANIMATE NỘI DUNG ===== */
#page-content {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease;
}

#page-content.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

/* Hiệu ứng vào trang */
#page-content.fade-in {
    opacity: 1;
    transform: translateY(0);
}


/* ===== COLLAPSIBLE ESTIMATOR SECTIONS ===== */
details.estimator-category {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--card-bg);
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

details.estimator-category:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.1);
}

details.estimator-category summary {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    transition: all 0.3s ease;
}

details.estimator-category summary:hover {
    background-color: #d35400;
}

details.estimator-category summary::after {
    content: "▼";
    font-size: 14px;
    transition: transform 0.3s ease;
}

/* ===== SUB-BANNER ===== */
.sub-banner {
    height: 400px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url('../img/banneramthuc.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.sub-banner h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

details.estimator-category[open] summary::after {
    transform: rotate(180deg);
}

details.estimator-category .category-content {
    padding: 20px;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

details.estimator-category .checkbox-item {
    margin-bottom: 10px;
}

details.estimator-category .checkbox-item:last-child {
    margin-bottom: 0;
}

/* ===== CALCULATE BUTTON STYLES ===== */
.calculate-btn {
    display: block;
    width: auto;
    min-width: 200px;
    padding: 12px 28px;
    margin: 20px auto 35px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), #d35400);
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calculate-btn:hover {
    background: linear-gradient(135deg, #d35400, #b8460a);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
    transform: translateY(-2px);
}

.calculate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
}