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

:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --primary-bg: #f5f3ff;
    --text: #1e1b4b;
    --text-light: #6b7280;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

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

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.875rem;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
}

.btn-sm:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-disabled {
    background: var(--gray-300);
    color: var(--text-light);
    cursor: default;
    border-color: var(--gray-300);
}

.btn-disabled:hover {
    background: var(--gray-300);
    color: var(--text-light);
    transform: none;
    box-shadow: none;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.125rem;
}

/* ===== Navbar ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 0;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.logo span {
    color: var(--primary);
}

.logo:hover {
    color: var(--text);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-bg);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #4c1d95 100%);
    color: var(--white);
    padding: 80px 0 100px;
    text-align: center;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 36px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

.hero .btn-primary:hover {
    background: var(--gray-100);
    border-color: var(--gray-100);
    color: var(--primary-dark);
}

.hero .btn-outline {
    color: var(--white);
    border-color: var(--white);
}

.hero .btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

/* ===== Section Headers ===== */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 650px;
    margin: 0 auto;
}

/* ===== Featured Section ===== */
.featured {
    padding: 80px 0;
    background: var(--gray-50);
}

.featured-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 48px;
    position: relative;
    border: 2px solid var(--primary-light);
}

.featured-badge {
    position: absolute;
    top: -14px;
    left: 32px;
    background: var(--primary);
    color: var(--white);
    padding: 6px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.featured-content h3 {
    font-size: 1.75rem;
    margin-bottom: 16px;
    color: var(--text);
}

.featured-content > p {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.8;
}

.featured-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat {
    text-align: center;
    padding: 20px;
    background: var(--primary-bg);
    border-radius: var(--radius);
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

.featured-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== About / Features Grid ===== */
.about-section {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--text);
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== Directory Section ===== */
.directory {
    padding: 80px 0;
    background: var(--gray-50);
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.directory-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.directory-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.directory-card.highlighted {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
}

.card-rank {
    display: inline-block;
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.875rem;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.directory-card.highlighted .card-rank {
    background: var(--primary);
    color: var(--white);
}

.directory-card h3 {
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.card-category {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.directory-card > p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

.card-rating {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* ===== Categories ===== */
.categories {
    padding: 80px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.category-item {
    padding: 32px;
    background: var(--primary-bg);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    border: 1px solid transparent;
}

.category-item:hover {
    border-color: var(--primary-light);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.category-item h3 {
    font-size: 1.15rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.category-item p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Testimonials ===== */
.testimonials {
    padding: 80px 0;
    background: var(--gray-50);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}

.testimonial-text {
    font-style: italic;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 0.95rem;
}

.testimonial-author strong {
    display: block;
    color: var(--text);
    font-size: 1rem;
}

.testimonial-author span {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary) 0%, #4c1d95 100%);
    color: var(--white);
    text-align: center;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 650px;
    margin: 0 auto 32px;
    line-height: 1.8;
}

.cta-section .btn-primary {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

.cta-section .btn-primary:hover {
    background: var(--gray-100);
    border-color: var(--gray-100);
    color: var(--primary-dark);
}

/* ===== Footer ===== */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--gray-300);
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ===== Detail Page - Breadcrumb ===== */
.breadcrumb {
    padding: 16px 0;
    background: var(--gray-50);
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary);
}

/* ===== Detail Page - Hero ===== */
.detail-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #4c1d95 100%);
    color: var(--white);
    padding: 60px 0 80px;
    text-align: center;
}

.detail-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 6px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.detail-hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.detail-hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 24px;
    line-height: 1.7;
}

.detail-hero-meta {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
    opacity: 0.85;
}

.detail-hero-meta span {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
}

/* ===== Detail Page - Content ===== */
.detail-content {
    padding: 60px 0 80px;
}

.detail-content > .container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

.detail-section {
    margin-bottom: 48px;
}

.detail-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

.detail-section p {
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.8;
}

/* Feature List */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature-item {
    padding: 24px;
    background: var(--primary-bg);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
}

.feature-item h3 {
    font-size: 1.15rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.feature-item p {
    margin-bottom: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Benefit List */
.benefit-list {
    list-style: none;
    padding: 0;
}

.benefit-list li {
    padding: 12px 0 12px 28px;
    position: relative;
    border-bottom: 1px solid var(--gray-200);
    line-height: 1.7;
}

.benefit-list li:last-child {
    border-bottom: none;
}

.benefit-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Testimonials Detail */
.testimonial-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.testimonial-detail-card {
    padding: 28px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.testimonial-stars {
    color: #f59e0b;
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.testimonial-detail-card p {
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 12px;
}

.testimonial-detail-card .testimonial-author strong {
    display: block;
    font-style: normal;
    color: var(--text);
}

.testimonial-detail-card .testimonial-author span {
    font-style: normal;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Detail CTA */
.detail-cta {
    text-align: center;
    padding: 48px;
    background: var(--primary-bg);
    border-radius: var(--radius-lg);
    border: 2px solid var(--primary-light);
}

.detail-cta h2 {
    display: block;
    border-bottom: none;
    padding-bottom: 0;
}

.detail-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* ===== Sidebar ===== */
.detail-sidebar {
    position: sticky;
    top: 90px;
}

.sidebar-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.sidebar-card h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table tr {
    border-bottom: 1px solid var(--gray-200);
}

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

.info-table td {
    padding: 10px 0;
    font-size: 0.9rem;
}

.info-table td:first-child {
    color: var(--text-light);
    width: 100px;
}

.info-table a {
    word-break: break-all;
}

.rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: var(--white);
    font-size: 1.75rem;
    font-weight: 800;
    border-radius: 50%;
    margin: 0 auto 16px;
}

.sidebar-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: center;
}

.sidebar-links {
    list-style: none;
}

.sidebar-links li {
    margin-bottom: 10px;
}

.sidebar-links a {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
}

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .features-grid,
    .directory-grid,
    .category-grid,
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .featured-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-content > .container {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .sidebar-card {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        gap: 4px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 60px 0 80px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .features-grid,
    .directory-grid,
    .category-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .featured-card {
        padding: 32px 24px;
    }

    .featured-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .detail-hero h1 {
        font-size: 1.75rem;
    }

    .detail-hero-meta {
        gap: 8px;
    }

    .detail-sidebar {
        grid-template-columns: 1fr;
    }

    .detail-cta {
        padding: 32px 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.65rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .featured-stats {
        grid-template-columns: 1fr 1fr;
    }

    .featured-actions {
        flex-direction: column;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .detail-hero-meta span {
        font-size: 0.8rem;
    }

    .detail-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}