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

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;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

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

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

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.brand-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c5aa0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #2c5aa0;
}

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 500px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

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

.hero-image img {
    width: 100%;
    max-width: 500px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #1e3f73;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: #2c5aa0;
    color: white;
}

.btn-outline {
    background: transparent;
    color: #666;
    border-color: #ddd;
}

.btn-outline:hover {
    background: #f8f9fa;
    border-color: #2c5aa0;
    color: #2c5aa0;
}

/* Sections */
.featured,
.categories-preview {
    padding: 4rem 0;
}

.featured {
    background: #f8f9fa;
}

.featured h2,
.categories-preview h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #1a1a1a;
}

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

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.video-link {
    display: block;
}

.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: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.video-channel {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.video-views {
    color: #888;
}

.video-category {
    background: #e3f2fd;
    color: #2c5aa0;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.video-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

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

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #2c5aa0;
}

.category-card h3 {
    font-size: 1.3rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: #666;
    margin-bottom: 1rem;
}

.category-count {
    display: inline-block;
    background: #2c5aa0;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Section Footer */
.section-footer {
    text-align: center;
}

/* Search and Filter */
.search-section {
    background: #f8f9fa;
    padding: 2rem 0;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.search-container h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.search-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #2c5aa0;
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
}

.filter-select:focus {
    outline: none;
    border-color: #2c5aa0;
}

.filter-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tag {
    background: #e3f2fd;
    color: #2c5aa0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag:hover,
.filter-tag.active {
    background: #2c5aa0;
    color: white;
}

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

.video-player {
    max-width: 800px;
    margin: 0 auto 2rem;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

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

.video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #666;
    font-size: 1.2rem;
    height: 100%;
}

.video-details {
    max-width: 800px;
    margin: 0 auto;
}

.video-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.video-metadata {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.video-metadata span {
    color: #666;
    font-size: 0.9rem;
}

.video-description {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.video-description h3 {
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.video-topics {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.topic-tag {
    background: #e3f2fd;
    color: #2c5aa0;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.content-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #856404;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-logo {
    width: 30px;
    height: 30px;
}

.footer-brand-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c5aa0;
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

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

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

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1rem;
    text-align: center;
    color: #ccc;
}

.disclaimer-text {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #999;
}

/* Page Specific Styles */
.page-header {
    background: #f8f9fa;
    padding: 2rem 0;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #666;
}

.page-content {
    padding: 3rem 0;
}

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

.content-section h2 {
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.content-section h3 {
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

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

.content-section li {
    margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

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

    .nav-toggle {
        display: flex;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 20px;
    }

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

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

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

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

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

    .video-metadata {
        flex-direction: column;
        gap: 0.5rem;
    }

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

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

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

    .video-card {
        margin: 0 -5px;
    }

    .category-card {
        padding: 1.5rem;
    }
}

/* RTL Support */
[dir="rtl"] .nav {
    direction: rtl;
}

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

[dir="rtl"] .hero {
    direction: rtl;
}

[dir="rtl"] .video-duration {
    left: 8px;
    right: auto;
}

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