/* style/gift-codes.css */
:root {
    --primary-color: #007bff;
    --secondary-color: #ffc107;
    --text-on-dark: #ffffff;
    --text-on-light: #333333;
    --card-background: #ffffff;
    --border-color: #e0e0e0;
    --light-gray-bg: #f1f3f5;
}

.page-gift-codes {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-on-dark); /* Default text color for page content on dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
}

/* Fixed navigation bar padding */
.page-gift-codes__hero-banner {
    padding-top: 180px; /* Desktop: Adjust based on fixed header height */
    padding-bottom: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3); /* Darker gradient for hero */
    text-align: center;
    position: relative;
}

.page-gift-codes__hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-gift-codes__main-title {
    font-size: 3.2em;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text-on-dark);
    line-height: 1.2;
}

.page-gift-codes__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-on-dark);
}

.page-gift-codes__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--secondary-color);
    color: var(--text-on-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
}

.page-gift-codes__cta-button:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-gift-codes__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-gift-codes__section {
    padding: 40px 0;
    background-color: #0d0d0d; /* Slightly lighter dark background for sections */
}

.page-gift-codes__card {
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-bottom: 30px;
    color: var(--text-on-light); /* Dark text on light card background */
}

.page-gift-codes__section-title {
    font-size: 2.2em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
}

.page-gift-codes__sub-title {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 15px;
}

.page-gift-codes__text-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-gift-codes__text-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.page-gift-codes__text-link--cta {
    color: var(--secondary-color);
}

.page-gift-codes__text-link--cta:hover {
    color: #e0a800;
}

.page-gift-codes__content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.page-gift-codes__grid-item {
    background: var(--light-gray-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-gift-codes__grid-item h3 {
    color: var(--primary-color);
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 15px;
}

.page-gift-codes__list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.page-gift-codes__list li {
    background: var(--light-gray-bg);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    color: var(--text-on-light);
}

.page-gift-codes__list li h3 {
    color: var(--primary-color);
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 10px;
}

.page-gift-codes__game-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.page-gift-codes__game-list li {
    background: var(--light-gray-bg);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
    font-size: 1.1em;
    color: var(--text-on-light);
}

.page-gift-codes__game-list li strong {
    color: var(--primary-color);
}

.page-gift-codes__news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.page-gift-codes__news-item {
    background: var(--light-gray-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-gift-codes__news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-gift-codes__news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.page-gift-codes__news-content {
    padding: 20px;
    color: var(--text-on-light);
}

.page-gift-codes__news-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-gift-codes__news-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-gift-codes__news-title a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.page-gift-codes__news-excerpt {
    font-size: 0.95em;
    margin-bottom: 15px;
}

.page-gift-codes__news-date {
    font-size: 0.85em;
    color: #6c757d;
}

/* FAQ Section Styles */
.page-gift-codes__faq-list {
    margin-top: 30px;
}

.page-gift-codes__faq-item {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-gift-codes__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 20px;
    opacity: 0;
    color: var(--text-on-light);
    background: var(--light-gray-bg);
}

.page-gift-codes__faq-item.active .page-gift-codes__faq-answer {
    max-height: 2000px !important; /* Ensure it expands sufficiently */
    padding: 20px !important;
    opacity: 1;
    border-radius: 0 0 10px 10px;
}

.page-gift-codes__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-gift-codes__faq-question:hover {
    background: var(--light-gray-bg);
    border-color: #d0d0d0;
}

.page-gift-codes__faq-question:active {
    background: #eeeeee;
}

.page-gift-codes__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: var(--text-on-light);
}

.page-gift-codes__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.page-gift-codes__faq-item.active .page-gift-codes__faq-toggle {
    color: #333;
    transform: rotate(45deg); /* Change + to X */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-gift-codes__main-title {
        font-size: 2.8em;
    }
    .page-gift-codes__section-title {
        font-size: 1.8em;
    }
    .page-gift-codes__card {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .page-gift-codes__hero-banner {
        padding-top: 140px !important; /* Mobile: Adjust based on fixed header height */
        padding-bottom: 40px;
    }
    .page-gift-codes__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .page-gift-codes__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-gift-codes__cta-button {
        padding: 12px 30px;
        font-size: 1em;
    }
    .page-gift-codes__section {
        padding: 30px 0;
    }
    .page-gift-codes__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-gift-codes__card {
        padding: 25px;
        margin-bottom: 20px;
    }
    .page-gift-codes__section-title {
        font-size: 1.6em;
        margin-bottom: 20px;
    }
    .page-gift-codes__sub-title {
        font-size: 1.2em;
        margin-top: 20px;
        margin-bottom: 10px;
    }
    .page-gift-codes__content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-gift-codes__list li {
        padding: 15px;
        margin-bottom: 10px;
    }
    .page-gift-codes__list li h3 {
        font-size: 1.1em;
    }
    .page-gift-codes__game-list li {
        font-size: 1em;
    }
    .page-gift-codes__news-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-gift-codes__news-image {
        height: 180px;
    }
    .page-gift-codes__news-content {
        padding: 15px;
    }
    .page-gift-codes__news-title {
        font-size: 1.1em;
    }
    .page-gift-codes__news-excerpt {
        font-size: 0.9em;
    }
    .page-gift-codes__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-gift-codes__faq-question h3 {
        font-size: 1em;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-gift-codes__faq-toggle {
        margin-left: 10px;
        width: 28px;
        height: 28px;
        font-size: 24px;
    }
    .page-gift-codes__faq-answer {
        padding: 0 15px;
    }
    .page-gift-codes__faq-item.active .page-gift-codes__faq-answer {
        padding: 15px !important;
    }

    /* Mobile image responsive adaptation */
    .page-gift-codes img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-gift-codes__hero-banner img,
    .page-gift-codes__news-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    .page-gift-codes__main-title {
        font-size: 1.8em;
    }
    .page-gift-codes__section-title {
        font-size: 1.4em;
    }
    .page-gift-codes__cta-button {
        padding: 10px 25px;
        font-size: 0.9em;
    }
    .page-gift-codes__news-image {
        height: 150px;
    }
    .page-gift-codes__faq-toggle {
        font-size: 20px;
        width: 24px;
        height: 24px;
    }
}