/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #f5c518;
    --primary-dark: #d4a910;
    --primary-light: #3d2e00;
    --header-bg: #2d1b4e;
    --header-bg-dark: #1f1238;
    --secondary: #ffffff;
    --accent: #f5c518;
    --text: #e0e0e0;
    --text-light: #a0a0b0;
    --text-white: #ffffff;
    --bg: #0a0a0a;
    --bg-card: #1a1a2e;
    --bg-light: #141425;
    --border: #2a2a45;
    --border-light: #1e1e35;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 16px;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; border-radius: var(--radius); }

/* ========== HEADER ========== */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(255,255,255,0.08);
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(45,27,78,0.5);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo { display: flex; align-items: center; }

.logo-img {
    height: 36px;
    width: auto;
    border-radius: 0;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
    white-space: nowrap;
}

.btn-login {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.btn-login:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

.btn-register {
    background: var(--primary);
    color: #111;
    font-weight: 700;
    border-color: var(--primary);
}

.btn-register:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,197,24,0.4);
}

/* Content area buttons override */
.content-buttons .btn-login {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}

.content-buttons .btn-login:hover {
    background: rgba(245,197,24,0.1);
}

/* ========== HAMBURGER ========== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    width: 26px; height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========== MOBILE NAV ========== */
.mobile-nav {
    display: none;
    background: var(--header-bg-dark);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px;
}

.mobile-nav.active { display: block; }

.mobile-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-buttons .btn {
    width: 100%;
    text-align: center;
}

/* ========== MAIN ========== */
main {
    padding-top: 88px;
    padding-bottom: 60px;
    background: var(--bg);
}

.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-section {
    line-height: 1.8;
}

.content-section h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.3;
}

.content-section h2 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700;
    color: #ffffff;
    margin: 48px 0 16px;
    padding-top: 12px;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 10px;
}

.content-section h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    margin: 28px 0 12px;
}

.content-section p {
    color: var(--text);
    margin-bottom: 16px;
    font-size: 1rem;
}

.content-section ul,
.content-section ol {
    padding-left: 20px;
    margin-bottom: 16px;
}

.content-section ul { list-style: disc; }
.content-section ol { list-style: decimal; }

.content-section li {
    color: var(--text);
    margin-bottom: 8px;
    font-size: 0.97rem;
}

.content-section img {
    margin: 24px 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* ========== CONTENT BUTTONS ========== */
.content-buttons {
    display: flex;
    gap: 14px;
    margin: 28px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.content-buttons .btn {
    padding: 14px 36px;
    font-size: 1rem;
}

/* ========== TABLE OF CONTENTS ========== */
.content-toggle-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    margin-bottom: 4px;
}

.content-toggle-btn:hover {
    background: var(--bg-light);
}

.content-toggle-btn.active {
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: none;
}

.table-of-contents {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.table-of-contents.active { display: block; }

.toc-title {
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 12px !important;
    font-size: 1.05rem;
}

.toc-list {
    list-style: none !important;
    padding-left: 0 !important;
}

.toc-list li {
    margin-bottom: 6px !important;
}

.toc-list li a {
    color: var(--primary);
    transition: var(--transition);
    font-size: 0.95rem;
}

.toc-list li a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ========== TABLES ========== */
.table-wrapper {
    overflow-x: auto;
    margin: 20px 0 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--text);
    vertical-align: top;
}

table tr:first-child td {
    background: var(--header-bg);
    font-weight: 700;
    color: #fff;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background: rgba(45,27,78,0.15);
}

/* ========== FAQ ========== */
.faq-container {
    margin: 24px 0;
}

.faq-item {
    margin-bottom: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: #ffffff;
    transition: var(--transition);
    gap: 14px;
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 !important;
    padding: 0 !important;
}

.faq-icon {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--primary);
    transition: var(--transition);
    flex-shrink: 0;
    line-height: 1;
}

.faq-question.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 0 20px 18px;
}

.faq-answer.active {
    display: block;
}

.faq-answer p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0 !important;
}

/* ========== REVIEWS ========== */
.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}

.review-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(245,197,24,0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-author {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}

.review-date {
    color: var(--text-light);
    font-size: 0.82rem;
}

.review-text {
    color: var(--text);
    font-size: 0.93rem;
    line-height: 1.6;
    margin-bottom: 0 !important;
}

/* ========== FOOTER ========== */
footer {
    background: var(--header-bg-dark);
    border-top: 3px solid var(--primary);
    padding: 40px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #b0b0c0;
    font-size: 0.93rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

footer p {
    color: #8888a0;
    font-size: 0.88rem;
    margin-bottom: 6px;
}

/* ========== PAGE SPECIFIC ========== */
.page-header {
    padding: 120px 0 50px;
    background: linear-gradient(135deg, var(--header-bg) 0%, var(--header-bg-dark) 50%, #150d25 100%);
    color: #fff;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
}

.page-header p {
    color: rgba(255,255,255,0.7);
    margin-top: 10px;
}

.page-content {
    padding: 50px 0 80px;
    background: var(--bg);
}

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

.page-content h2 {
    font-size: 1.4rem;
    color: #ffffff;
    margin: 36px 0 12px;
    font-weight: 700;
}

.page-content h2:first-child {
    margin-top: 0;
}

.page-content p,
.page-content li {
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.8;
}

.page-content ul {
    padding-left: 20px;
    list-style: disc;
}

/* ========== CONTACT FORM ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #ffffff;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-card);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245,197,24,0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-info-block {
    margin-bottom: 28px;
}

.contact-info-block h3 {
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 8px;
}

.contact-info-block p {
    color: var(--text-light);
}

.form-success {
    display: none;
    background: rgba(22,101,52,0.2);
    border: 1px solid #16a34a;
    color: #4ade80;
    padding: 16px 20px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 20px;
}

.form-success.show { display: block; }

/* ========== TEAM GRID ========== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 36px;
}

.team-card {
    text-align: center;
    padding: 36px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    transition: var(--transition);
}

.team-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.team-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--header-bg), var(--primary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.4rem;
    margin: 0 auto 16px;
}

.team-card h3 {
    color: #ffffff;
    margin-bottom: 4px;
}

.team-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .desktop-buttons { display: none; }

    .content-section h1 {
        font-size: 1.6rem;
    }

    .content-buttons {
        flex-direction: column;
    }

    .content-buttons .btn {
        width: 100%;
    }

    .reviews-container {
        grid-template-columns: 1fr;
    }

    .contact-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }

    table td {
        padding: 10px 12px;
        font-size: 0.88rem;
    }
}

@media (max-width: 480px) {
    .header-container { height: 60px; }
    main { padding-top: 76px; }

    .content-section h2 {
        font-size: 1.25rem;
    }

    .faq-question {
        padding: 14px 16px;
    }

    .faq-question h3 {
        font-size: 0.93rem;
    }
}
