/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    background: #f8f9fa;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
}

/* Force containers to have small margins */
.main-content, .container, .wrapper, .inner-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
}

/* HERO SECTION - with small margins */
.faq-hero {
    position: relative;
    background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)), url('{% static "images/faq-header.jpg" %}');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 120px 0;
    text-align: center;
    color: white;
    width: 100%;
    margin: 0;
}

/* Content inside hero has small margins */
.faq-hero .hero-content {
    max-width: 1400px;
    margin: 0 2%;
    width: auto;
}

.faq-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    max-width: 800px;
    letter-spacing: -0.02em;
}

.faq-hero p {
    font-size: 18px;
    max-width: 700px;
    opacity: 0.95;
    line-height: 1.6;
}

/* CATEGORY FILTER - with small margins */
.category-filter {
    background: white;
    padding: 25px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 99;
    width: 100%;
    margin: 0;
    text-align: center;
    border-bottom: 1px solid #eef2f0;
}

.category-filter .filter-content {
    max-width: 1400px;
    margin: 0 2%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.category-btn {
    padding: 10px 24px;
    margin: 0;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.category-btn-all {
    background: #2c7a4d;
    color: white;
}

.category-btn-all:hover {
    background: #1e5a38;
    color: white;
    transform: translateY(-2px);
}

.category-btn:not(.category-btn-all) {
    background: #f0f2f5;
    color: #333;
    border: 1px solid #e2e8f0;
}

.category-btn:not(.category-btn-all):hover {
    background: #2c7a4d;
    color: white;
    transform: translateY(-2px);
    border-color: #2c7a4d;
}

.category-btn.active {
    background: #2c7a4d;
    color: white;
    box-shadow: 0 4px 8px rgba(44,122,77,0.2);
}

/* FAQ SECTION - with small margins */
.faq-section {
    background: #f8f9fa;
    padding: 60px 0;
    width: 100%;
    margin: 0;
}

.faq-section .faq-container {
    max-width: 1400px;
    margin: 0 2%;
    width: auto;
}

.faq-card {
    background: white;
    border-radius: 20px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    width: 100%;
}

.faq-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

/* QUESTION STYLES */
.faq-question {
    padding: 22px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s;
}

.faq-question:hover {
    background: #fefef8;
}

.faq-question h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    flex: 1;
    padding-right: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.faq-question span:last-child {
    font-size: 20px;
    color: #2c7a4d;
    transition: transform 0.3s ease;
    font-weight: 600;
}

/* ANSWER TRANSITION */
.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1), padding 0.3s;
}

.faq-answer.show {
    padding: 25px 30px;
    max-height: 1200px;
}

/* ANSWER CONTENT */
.faq-answer-content {
    color: #4a5568;
    line-height: 1.8;
    font-size: 15px;
}

.faq-answer-content p {
    margin-bottom: 16px;
}

.faq-media {
    margin-top: 20px;
    padding: 0;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
}

.faq-media img {
    width: 100%;
    border-radius: 16px;
    max-height: 380px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.faq-media iframe {
    width: 100%;
    border-radius: 16px;
    min-height: 315px;
    aspect-ratio: 16 / 9;
    border: none;
}

.external-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2c7a4d;
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 15px;
    border: none;
    cursor: pointer;
}

.external-link-btn i {
    font-size: 13px;
}

.external-link-btn:hover {
    background: #1e5a38;
    color: white;
    transform: translateX(5px);
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f5e9;
    color: #2c7a4d;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}

.no-faqs {
    text-align: center;
    padding: 60px 30px;
    background: white;
    border-radius: 24px;
    width: 100%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.no-faqs h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 26px;
    font-weight: 700;
}

.no-faqs p {
    color: #5a6e7c;
    font-size: 16px;
}

.featured-badge {
    background: #ffd93d;
    color: #7a5c1a;
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 30px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-block;
}

/* RESPONSIVE */
@media (min-width: 1440px) {
    .faq-hero {
        padding: 140px 0;
    }
    .faq-hero h1 {
        font-size: 58px;
    }
}

@media (max-width: 992px) {
    .faq-hero {
        padding: 90px 0;
    }
    .faq-hero h1 {
        font-size: 42px;
    }
    .faq-question {
        padding: 18px 24px;
    }
    .faq-answer.show {
        padding: 20px 24px;
    }
    .faq-section {
        padding: 50px 0;
    }
}

@media (max-width: 768px) {
    .faq-hero {
        padding: 60px 0;
    }
    .faq-hero h1 {
        font-size: 32px;
    }
    .faq-hero p {
        font-size: 15px;
    }
    .faq-question {
        padding: 15px 20px;
    }
    .faq-question h3 {
        font-size: 15px;
    }
    .faq-answer.show {
        padding: 16px 20px;
    }
    .faq-media iframe {
        min-height: 210px;
    }
    .category-btn {
        padding: 7px 18px;
        font-size: 12px;
    }
    .category-filter {
        padding: 16px 0;
    }
    .faq-section {
        padding: 40px 0;
    }
    .faq-card {
        border-radius: 18px;
    }
    .faq-hero .hero-content,
    .category-filter .filter-content,
    .faq-section .faq-container {
        margin: 0 16px;
    }
}

@media (max-width: 480px) {
    .faq-hero h1 {
        font-size: 26px;
    }
    .faq-question h3 {
        font-size: 14px;
    }
    .category-btn {
        padding: 5px 14px;
        font-size: 11px;
    }
    .faq-answer-content {
        font-size: 14px;
    }
    .external-link-btn {
        padding: 8px 18px;
        font-size: 12px;
    }
    .featured-badge {
        font-size: 9px;
        padding: 2px 8px;
    }
    .faq-hero .hero-content,
    .category-filter .filter-content,
    .faq-section .faq-container {
        margin: 0 12px;
    }
}

/* Active state for better UX */
.faq-question:active {
    opacity: 0.9;
}

/* Arrow rotation */
.faq-question span:last-child {
    display: inline-block;
    transform: rotate(0deg);
}

.faq-question.open span:last-child {
    transform: rotate(180deg);
}