/* style/khuyen-mai.css */
:root {
    --primary-color: #F2C14E;
    --secondary-color: #FFD36B;
    --bg-color: #0A0A0A;
    --card-bg-color: #111111;
    --text-main-color: #FFF6D6;
    --border-color: #3A2A12;
    --glow-color: #FFD36B;
    --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
}

.page-khuyen-mai {
    font-family: Arial, sans-serif;
    color: var(--text-main-color); /* Assuming dark body background from shared.css */
    background-color: var(--bg-color);
    line-height: 1.6;
}

.page-khuyen-mai__section-title {
    font-size: 2.5em;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-khuyen-mai__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.page-khuyen-mai__sub-title {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 20px;
    border-left: 5px solid var(--secondary-color);
    padding-left: 15px;
}

.page-khuyen-mai p {
    margin-bottom: 15px;
}

.page-khuyen-mai ul,
.page-khuyen-mai ol {
    list-style-position: inside;
    margin-bottom: 15px;
    padding-left: 20px;
}

.page-khuyen-mai ul li,
.page-khuyen-mai ol li {
    margin-bottom: 8px;
}

.page-khuyen-mai a {
    color: var(--secondary-color);
    text-decoration: none;
}

.page-khuyen-mai a:hover {
    text-decoration: underline;
}

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-khuyen-mai__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 211, 107, 0.4);
}

.page-khuyen-mai__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-khuyen-mai__btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-khuyen-mai__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-color);
}

/* Hero Carousel Section */
.page-khuyen-mai__hero-carousel-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 10px; /* Assuming body has padding-top from shared.css */
    margin-bottom: 40px;
}

.page-khuyen-mai__hero-slider {
    display: flex;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.page-khuyen-mai__hero-slide {
    min-width: 100%;
    transition: transform 0.5s ease-in-out;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.page-khuyen-mai__hero-slide.is-active {
    display: flex;
}

.page-khuyen-mai__hero-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-khuyen-mai__hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 5%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    color: var(--text-main-color);
    text-align: center;
}

.page-khuyen-mai__hero-title {
    font-size: clamp(2em, 3.5vw, 3em);
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.2;
}

.page-khuyen-mai__hero-description {
    font-size: clamp(1em, 1.5vw, 1.2em);
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-khuyen-mai__hero-slider-prev,
.page-khuyen-mai__hero-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 10;
    border-radius: 5px;
}

.page-khuyen-mai__hero-slider-prev {
    left: 10px;
}

.page-khuyen-mai__hero-slider-next {
    right: 10px;
}

.page-khuyen-mai__hero-slider-prev::before {
    content: '❮';
}

.page-khuyen-mai__hero-slider-next::before {
    content: '❯';
}

/* Guide Box Section */
.page-khuyen-mai__guide-box {
    padding: 40px 20px;
    background-color: var(--card-bg-color);
    border-radius: 10px;
    margin: 40px auto;
    max-width: 1200px;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.page-khuyen-mai__guide-title {
    font-size: 2em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
}

.page-khuyen-mai__guide-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-khuyen-mai__guide-card {
    flex: 0 0 calc(20% - 12px);
    max-width: calc(20% - 12px);
    text-align: center;
    text-decoration: none;
    color: var(--text-main-color);
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-khuyen-mai__guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 211, 107, 0.3);
}

.page-khuyen-mai__guide-card img {
    width: 100%;
    height: 350px; /* Fixed height for vertical cards */
    object-fit: cover;
    display: block;
    aspect-ratio: 250/350;
}

.page-khuyen-mai__guide-card--pos-1,
.page-khuyen-mai__guide-card--pos-5 {
    padding-top: 50px;
}

.page-khuyen-mai__guide-card--pos-2,
.page-khuyen-mai__guide-card--pos-4 {
    padding-top: 25px;
}

/* Home Content Box Section */
.page-khuyen-mai__home-content-box {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px 30px;
    background-color: var(--card-bg-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(242, 193, 78, 0.5);
    height: 700px; /* Desktop fixed height */
    overflow: hidden;
}

.page-khuyen-mai__home-content-inner {
    height: 100%;
    overflow-y: auto;
    padding-right: 15px; /* For scrollbar */
}

.page-khuyen-mai__home-content-inner::-webkit-scrollbar {
    width: 8px;
}

.page-khuyen-mai__home-content-inner::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 10px;
}

.page-khuyen-mai__home-content-inner::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/* Blog Section */
.page-khuyen-mai__blog-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 20px;
}

.page-khuyen-mai__blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.page-khuyen-mai__blog-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-khuyen-mai__blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 211, 107, 0.4);
}

.page-khuyen-mai__blog-card img {
    width: 100%;
    height: 225px; /* Aspect ratio 800x450 */
    object-fit: cover;
    display: block;
    aspect-ratio: 16/9;
}

.page-khuyen-mai__blog-card-title {
    font-size: 1.3em;
    padding: 15px;
    margin-bottom: 0;
}

.page-khuyen-mai__blog-card-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-khuyen-mai__blog-card-title a:hover {
    text-decoration: underline;
}

.page-khuyen-mai__blog-card-meta {
    font-size: 0.9em;
    color: #aaa;
    padding: 0 15px 10px;
}

.page-khuyen-mai__blog-card-excerpt {
    font-size: 0.95em;
    color: #ccc;
    padding: 0 15px 20px;
}

.page-khuyen-mai__view-all {
    text-align: center;
    margin-top: 40px;
}

/* FAQ Section */
.page-khuyen-mai__faq-item {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-khuyen-mai__faq-item[open] {
    box-shadow: 0 4px 15px rgba(255, 211, 107, 0.3);
}

.page-khuyen-mai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--primary-color);
    background-color: rgba(242, 193, 78, 0.05);
    list-style: none;
}

.page-khuyen-mai__faq-question::-webkit-details-marker {
    display: none;
}

.page-khuyen-mai__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-khuyen-mai__faq-item[open] .page-khuyen-mai__faq-toggle {
    transform: rotate(45deg);
}

.page-khuyen-mai__faq-answer {
    padding: 15px 25px 20px;
    color: var(--text-main-color);
    font-size: 0.95em;
    border-top: 1px solid var(--border-color);
}

.page-khuyen-mai__faq-answer p {
    margin-bottom: 0;
}

/* General image responsiveness */
.page-khuyen-mai img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-khuyen-mai__hero-title {
        font-size: clamp(1.8em, 3.5vw, 2.5em);
    }
    .page-khuyen-mai__hero-description {
        font-size: clamp(0.9em, 1.5vw, 1.1em);
    }
    .page-khuyen-mai__guide-card {
        flex: 0 0 calc(33.333% - 10px);
        max-width: calc(33.333% - 10px);
    }
    .page-khuyen-mai__guide-card--pos-1,
    .page-khuyen-mai__guide-card--pos-5 {
        padding-top: 0;
    }
    .page-khuyen-mai__guide-card--pos-2,
    .page-khuyen-mai__guide-card--pos-4 {
        padding-top: 0;
    }
    .page-khuyen-mai__blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-khuyen-mai {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-khuyen-mai__hero-carousel-section {
        padding-top: 10px !important;
    }
    .page-khuyen-mai__hero-content {
        padding: 15px 5%;
        position: static; /* Remove absolute positioning on mobile */
        background: var(--bg-color); /* Solid background for text below image */
    }
    .page-khuyen-mai__hero-title {
        font-size: 1.8em !important;
        margin-top: 15px;
    }
    .page-khuyen-mai__hero-description {
        font-size: 1em !important;
    }
    .page-khuyen-mai__hero-slider-prev,
    .page-khuyen-mai__hero-slider-next {
        padding: 8px 12px;
        font-size: 1.2em;
    }
    .page-khuyen-mai__guide-box {
        padding: 20px 15px;
        margin: 20px auto;
    }
    .page-khuyen-mai__guide-title {
        font-size: 1.6em;
        margin-bottom: 20px;
    }
    .page-khuyen-mai__guide-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 10px;
    }
    .page-khuyen-mai__guide-card {
        padding-top: 0 !important; /* Reset padding for mobile */
        flex: none;
        max-width: none;
    }
    .page-khuyen-mai__guide-card--pos-1,
    .page-khuyen-mai__guide-card--pos-2 {
        grid-column: span 3; /* Two cards per row */
    }
    .page-khuyen-mai__guide-card--pos-3,
    .page-khuyen-mai__guide-card--pos-4,
    .page-khuyen-mai__guide-card--pos-5 {
        grid-column: span 2; /* Three cards per row for the rest */
    }
    .page-khuyen-mai__guide-card img {
        height: 250px; /* Adjust height for mobile */
        aspect-ratio: 250/350; /* Maintain aspect ratio */
    }
    .page-khuyen-mai__home-content-box {
        height: auto !important; /* Full height on mobile */
        max-width: 100% !important;
        margin: 20px 0;
        padding: 15px;
        box-sizing: border-box;
    }
    .page-khuyen-mai__home-content-inner {
        height: auto !important;
        overflow: visible !important;
        padding-right: 0;
    }
    .page-khuyen-mai__section-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    .page-khuyen-mai__sub-title {
        font-size: 1.4em;
        margin-top: 30px;
    }
    .page-khuyen-mai__blog-section {
        margin: 40px auto;
        padding: 0 15px;
    }
    .page-khuyen-mai__blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-khuyen-mai__btn-primary,
    .page-khuyen-mai__btn-secondary,
    .page-khuyen-mai a[class*="button"],
    .page-khuyen-mai a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-khuyen-mai__hero-content .page-khuyen-mai__btn-primary {
        margin-bottom: 20px;
    }
    .page-khuyen-mai__cta-buttons,
    .page-khuyen-mai__button-group,
    .page-khuyen-mai__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
        display: flex;
        flex-direction: column;
    }
    .page-khuyen-mai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-khuyen-mai__card,
    .page-khuyen-mai__section,
    .page-khuyen-mai__box {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-khuyen-mai__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-khuyen-mai__faq-answer {
        padding: 10px 20px 15px;
    }
}