/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

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

/* Header and Navigation */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    padding: 1rem 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: #2563eb;
}

.logo-img {
    width: 40px;
    height: 40px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: #64748b;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
    background-color: #f1f5f9;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: #64748b;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #fff;
    color: #2563eb;
}

.btn-primary:hover {
    background-color: #f8fafc;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border-color: #fff;
}

.btn-secondary:hover {
    background-color: #fff;
    color: #2563eb;
}

.hero-bg {
    width: 100%;
    height: auto;
}

/* Sections */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.featured,
.trending,
.categories-preview {
    padding: 4rem 0;
}

.trending {
    background-color: #f8fafc;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.video-card {
    background-color: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.video-content {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.video-category {
    background-color: #e2e8f0;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.video-description {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-3px);
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.category-count {
    color: #64748b;
    font-size: 0.875rem;
}

/* Page Header */
.page-header {
    background-color: #f8fafc;
    padding: 3rem 0;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.25rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* Video Directory */
.video-directory {
    padding: 3rem 0;
}

.directory-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    display: flex;
    flex: 1;
    min-width: 300px;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem 0 0 0.5rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #2563eb;
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 0 0.5rem 0.5rem 0;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #1d4ed8;
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    outline: none;
}

.results-info {
    margin-bottom: 2rem;
    color: #64748b;
    font-weight: 500;
}

/* Video Detail Page */
.video-detail-container {
    padding: 2rem 0;
}

.video-detail {
    margin-bottom: 3rem;
}

.video-player {
    aspect-ratio: 16/9;
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.video-main-info h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1e293b;
}

.video-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.video-description-full {
    line-height: 1.6;
    color: #475569;
}

.video-sidebar {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    height: fit-content;
}

.video-topics {
    margin-bottom: 1.5rem;
}

.topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-tag {
    background-color: #e2e8f0;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.content-notice {
    background-color: #fef3c7;
    color: #92400e;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.related-videos {
    margin-top: 3rem;
}

/* Forms */
.contact-section {
    padding: 3rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.contact-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #1e293b;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.contact-item p {
    color: #64748b;
    line-height: 1.6;
}

.contact-form h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #1e293b;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.form-input,
.form-select,
.form-textarea {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #2563eb;
}

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

/* Legal Content */
.legal-content {
    padding: 3rem 0;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #475569;
}

.content-section ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-section li {
    list-style: disc;
    margin-bottom: 0.5rem;
    color: #475569;
}

.values-list {
    list-style: none;
    padding-left: 0;
}

.values-list li {
    background-color: #f8fafc;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid #2563eb;
}

/* Footer */
.footer {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 3rem 0 1rem;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.footer-description {
    margin-bottom: 1.5rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.footer-contact p {
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #cbd5e1;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #94a3b8;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.disclaimer-text {
    font-size: 0.875rem;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        gap: 1rem;
    }

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

    .nav-toggle {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

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

    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .directory-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: auto;
    }

    .filter-controls {
        justify-content: stretch;
    }

    .filter-select {
        flex: 1;
    }

    .video-info {
        grid-template-columns: 1fr;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 2rem 0;
    }

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

    .section-title {
        font-size: 1.75rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .video-card {
        margin-bottom: 1rem;
    }

    .btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }

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

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-logo {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-container {
    grid-template-columns: 1fr 1fr;
}

[dir="rtl"] .footer-content {
    grid-template-columns: 1fr 1fr 2fr;
}

[dir="rtl"] .video-info {
    grid-template-columns: 1fr 2fr;
}

[dir="rtl"] .contact-content {
    grid-template-columns: 2fr 1fr;
}