:root {
    /* Custom Colors */
    --thabet-primary: #11A84E;
    --thabet-secondary: #22C768;
    --thabet-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --thabet-card-bg: #11271B;
    --thabet-background: #08160F;
    --thabet-text-main: #F2FFF6;
    --thabet-text-secondary: #A7D9B8;
    --thabet-border: #2E7A4E;
    --thabet-glow: #57E38D;
    --thabet-gold: #F2C14E;
    --thabet-divider: #1E3A2A;
    --thabet-deep-green: #0A4B2C;
}

/* style/download.css */
/* body đã padding-top: var(--header-offset) từ shared.css; trang này không cần thêm */

.page-download {
    font-family: 'Arial', sans-serif;
    color: var(--thabet-text-main); /* Default text color for dark background */
    background-color: var(--thabet-background); /* Default background for main content */
}

.page-download__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Hero Section */
.page-download__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small decorative top padding, not --header-offset */
    background-color: var(--thabet-deep-green);
    color: var(--thabet-text-main);
    text-align: center;
}

.page-download__hero-section .page-download__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.page-download__hero-content {
    max-width: 800px;
}

.page-download__main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--thabet-gold);
}

.page-download__description {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--thabet-text-secondary);
}

.page-download__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-download__btn-primary,
.page-download__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid transparent;
    box-sizing: border-box;
}

.page-download__btn-primary {
    background: var(--thabet-button-gradient);
    color: var(--thabet-text-main);
}

.page-download__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-download__btn-secondary {
    background-color: transparent;
    color: var(--thabet-secondary);
    border-color: var(--thabet-secondary);
}

.page-download__btn-secondary:hover {
    background-color: var(--thabet-secondary);
    color: var(--thabet-text-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-download__hero-image-wrapper {
    width: 100%;
    max-width: 800px;
    margin-top: 40px;
}

.page-download__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* General Section Styling */
.page-download__why-download-section,
.page-download__download-guide-section,
.page-download__features-overview-section,
.page-download__security-section,
.page-download__faq-section,
.page-download__final-cta-section {
    padding: 80px 0;
}

.page-download__light-bg {
    background-color: var(--thabet-card-bg);
    color: var(--thabet-text-main);
}

.page-download__dark-bg {
    background-color: var(--thabet-background);
    color: var(--thabet-text-main);
}

.page-download__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--thabet-gold);
}

.page-download__section-description {
    font-size: 1.05rem;
    line-height: 1.6;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px auto;
    color: var(--thabet-text-secondary);
}

/* Features Grid */
.page-download__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-download__feature-card {
    background-color: var(--thabet-deep-green);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    border: 1px solid var(--thabet-border);
}

.page-download__feature-card:hover {
    transform: translateY(-5px);
}

.page-download__feature-icon {
    width: 100%;
    max-width: 150px;
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
}

.page-download__card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--thabet-gold);
}

.page-download__card-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--thabet-text-secondary);
}

/* Download Guide Tabs */
.page-download__guide-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.page-download__tab-button {
    background-color: var(--thabet-deep-green);
    color: var(--thabet-text-main);
    padding: 12px 25px;
    border: 1px solid var(--thabet-border);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-download__tab-button:hover,
.page-download__tab-button--active {
    background: var(--thabet-button-gradient);
    border-color: var(--thabet-secondary);
    color: var(--thabet-text-main);
}

.page-download__tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.page-download__tab-content--active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-download__platform-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
    color: var(--thabet-gold);
}

.page-download__platform-description {
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--thabet-text-secondary);
}

.page-download__guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.page-download__guide-step {
    text-align: center;
    background-color: var(--thabet-deep-green);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--thabet-border);
}

.page-download__guide-image {
    width: 100%;
    height: auto;
    max-height: 300px; /* Limit height for consistency */
    object-fit: contain;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-download__step-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--thabet-gold);
}

.page-download__step-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--thabet-text-secondary);
}

.page-download__cta-area {
    text-align: center;
    margin-top: 30px;
}

/* Features Overview */
.page-download__feature-list {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.page-download__feature-item {
    display: flex;
    align-items: center;
    gap: 40px;
    background-color: var(--thabet-deep-green);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--thabet-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.page-download__feature-item--reverse {
    flex-direction: row-reverse;
}

.page-download__feature-image {
    flex: 1;
    width: 100%;
    height: auto;
    min-width: 300px; /* Ensure images are not too small */
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.page-download__feature-content {
    flex: 1;
}

.page-download__feature-content .page-download__card-title {
    text-align: left;
    font-size: 1.8rem;
}

.page-download__feature-content .page-download__card-text {
    text-align: left;
    margin-bottom: 20px;
}

.page-download__text-link {
    color: var(--thabet-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-download__text-link:hover {
    color: var(--thabet-gold);
    text-decoration: underline;
}

/* Security Section */
.page-download__security-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 40px;
}

.page-download__security-image {
    flex: 1;
    width: 100%;
    height: auto;
    min-width: 300px; /* Ensure images are not too small */
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.page-download__security-list {
    flex: 1.5;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-download__list-item {
    background-color: var(--thabet-deep-green);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid var(--thabet-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.page-download__list-item:last-child {
    margin-bottom: 0;
}

.page-download__list-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--thabet-gold);
}

.page-download__list-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--thabet-text-secondary);
}

/* FAQ Section */
.page-download__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-download__faq-item {
    background-color: var(--thabet-deep-green);
    border: 1px solid var(--thabet-border);
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.page-download__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--thabet-gold);
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background-color 0.3s ease;
}

.page-download__faq-question:hover {
    background-color: var(--thabet-deep-green);
}

.page-download__faq-item[open] > .page-download__faq-question {
    background-color: var(--thabet-deep-green);
    border-bottom: 1px solid var(--thabet-border);
    border-radius: 10px 10px 0 0;
}

.page-download__faq-qtext {
    flex-grow: 1;
}

.page-download__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    width: 20px;
    text-align: center;
    margin-left: 15px;
    color: var(--thabet-secondary);
}

.page-download__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--thabet-text-secondary);
}

.page-download__faq-answer p {
    margin: 0;
}

.page-download__faq-item summary::-webkit-details-marker {
    display: none;
}
.page-download__faq-item summary::marker {
    display: none;
}

/* Final CTA Section */
.page-download__final-cta-section {
    text-align: center;
    background-color: var(--thabet-deep-green);
    padding: 80px 20px;
}

.page-download__final-cta-section .page-download__cta-buttons {
    margin-top: 40px;
}

/* --- Responsive Styles --- */

/* Desktop (>= 1024px) - Base styles are already for desktop */
@media (min-width: 1024px) {
    .page-download__hero-section .page-download__container {
        flex-direction: row;
        text-align: left;
    }

    .page-download__hero-content {
        text-align: left;
    }

    .page-download__hero-image-wrapper {
        margin-top: 0;
    }

    .page-download__hero-section .page-download__cta-buttons {
        justify-content: flex-start;
    }

    .page-download__security-content {
        flex-direction: row;
    }
}

/* Tablet (769px - 1023px) */
@media (max-width: 1023px) {
    .page-download__hero-section .page-download__container {
        flex-direction: column;
        text-align: center;
    }
    .page-download__hero-content {
        max-width: none;
    }
    .page-download__hero-section .page-download__cta-buttons {
        justify-content: center;
    }
    .page-download__feature-item,
    .page-download__feature-item--reverse {
        flex-direction: column;
        text-align: center;
    }
    .page-download__feature-content .page-download__card-title,
    .page-download__feature-content .page-download__card-text {
        text-align: center;
    }
    .page-download__security-content {
        flex-direction: column;
    }
    .page-download__security-list {
        margin-top: 30px;
    }
}

/* Mobile (<= 768px) */
@media (max-width: 768px) {
    .page-download__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body already handles --header-offset */
    }

    .page-download__container {
        padding: 0 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-download__main-title {
        font-size: 2rem;
    }

    .page-download__description {
        font-size: 1rem;
    }

    .page-download__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .page-download__btn-primary,
    .page-download__btn-secondary {
        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-download__hero-image-wrapper {
        margin-top: 30px;
    }

    .page-download__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-download__why-download-section,
    .page-download__download-guide-section,
    .page-download__features-overview-section,
    .page-download__security-section,
    .page-download__faq-section,
    .page-download__final-cta-section {
        padding: 40px 0;
    }

    .page-download__section-title {
        font-size: 1.8rem;
    }

    .page-download__section-description {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .page-download__features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-download__feature-card {
        padding: 25px;
    }

    .page-download__feature-icon {
        max-width: 120px;
    }

    .page-download__card-title {
        font-size: 1.3rem;
    }

    .page-download__card-text {
        font-size: 0.9rem;
    }

    .page-download__guide-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .page-download__tab-button {
        font-size: 1rem;
        width: 100%;
    }

    .page-download__platform-title {
        font-size: 1.6rem;
    }

    .page-download__platform-description {
        font-size: 0.9rem;
    }

    .page-download__guide-steps {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .page-download__guide-step {
        padding: 25px;
    }

    .page-download__guide-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-download__step-title {
        font-size: 1.2rem;
    }

    .page-download__step-text {
        font-size: 0.9rem;
    }

    .page-download__feature-item,
    .page-download__feature-item--reverse {
        flex-direction: column;
        gap: 25px;
        padding: 25px;
    }

    .page-download__feature-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: unset;
    }

    .page-download__feature-content .page-download__card-title {
        font-size: 1.5rem;
        text-align: center;
    }

    .page-download__feature-content .page-download__card-text {
        text-align: center;
        font-size: 0.9rem;
    }

    .page-download__security-content {
        flex-direction: column;
        gap: 30px;
    }

    .page-download__security-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: unset;
    }

    .page-download__list-item {
        padding: 20px;
    }

    .page-download__list-title {
        font-size: 1.15rem;
    }

    .page-download__list-text {
        font-size: 0.9rem;
    }

    .page-download__faq-question {
        font-size: 1rem;
        padding: 15px 20px;
    }

    .page-download__faq-answer {
        font-size: 0.9rem;
        padding: 0 20px 15px 20px;
    }

    .page-download__final-cta-section {
        padding: 50px 15px;
    }

    .page-download__final-cta-section .page-download__cta-buttons {
        margin-top: 30px;
    }
    
    /* Ensure all images and video containers are responsive */
    .page-download img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-download video,
    .page-download__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-download__video-section,
    .page-download__video-container,
    .page-download__video-wrapper,
    .page-download__section,
    .page-download__card,
    .page-download__container,
    .page-download__cta-buttons,
    .page-download__button-group,
    .page-download__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-download__cta-buttons {
        flex-wrap: wrap !important;
        gap: 10px;
    }
}