/* CSS Variables for Theme */
:root {
    --primary-color: #0052cc;
    --primary-hover: #003d99;
    --secondary-color: #00b368;
    --accent-color: #ff5722;
    --accent-hover: #e64a19;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fa;
    --bg-tertiary: #e8ecf1;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #5a5a5a;
    --text-tertiary: #757575;
    --border-color: #d1d5db;
    --border-light: #e5e7eb;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --gradient-start: #0052cc;
    --gradient-end: #00b368;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --accent-hover: #fbbf24;
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #252d3d;
    --bg-card: #1a1f2e;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-color: #374151;
    --border-light: #2d3748;
    --shadow: 0 2px 8px rgba(0,0,0,0.4);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.6);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.3);
    --gradient-start: #3b82f6;
    --gradient-end: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

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

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] header {
    background: rgba(26, 31, 41, 0.95);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

header:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] header:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.5rem 0;
}

.logo h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

nav ul {
    list-style-type: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

nav ul li {
    transition: transform 0.2s ease;
}

nav ul li:hover {
    transform: translateY(-2px);
}

nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    position: relative;
    display: block;
}

nav ul li a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: var(--bg-tertiary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0.3rem;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a:hover::before {
    opacity: 1;
}

nav ul li a:hover::after {
    width: 70%;
}

nav ul li a.active {
    color: var(--primary-color);
    font-weight: 600;
}

nav ul li a.active::before {
    opacity: 1;
}

nav ul li a.active::after {
    width: 70%;
    background: var(--primary-color);
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-light);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.2);
}

.theme-toggle:active {
    transform: translateY(0);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--primary-color);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0.08;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: #ff5722;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

/* Page Header (for internal pages) */
.page-header {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 0;
    border-bottom: 3px solid var(--primary-color);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    color: var(--text-secondary);
}

/* Sections */
section {
    padding: 4rem 0;
}

section:nth-child(even) {
    background: var(--bg-secondary);
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

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

.video-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

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

.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background: var(--bg-tertiary);
}

.video-thumbnail iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.video-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 2rem auto;
}

.search-bar {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.search-bar:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Categories/Filter */
.filter-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.8rem 1.5rem;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-primary);
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.resource-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: var(--transition);
}

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

.resource-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.resource-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.resource-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Projects/Equipment */
.project-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.project-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.project-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-body {
    padding: 2rem;
}

.equipment-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.equipment-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.equipment-icon {
    font-size: 2rem;
}

/* Newsletter */
.newsletter-box {
    background: var(--bg-tertiary);
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    max-width: 600px;
    margin: 2rem auto;
}

.newsletter-box h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.newsletter-form input {
    flex: 1;
    min-width: 250px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
}

.newsletter-form button {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--primary-hover);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

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

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Loading Animation */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 300px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        display: none;
        gap: 0.5rem;
    }

    nav ul.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

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

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

    .hero-stats {
        gap: 1.5rem;
    }

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

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

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

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input {
        width: 100%;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.hidden {
    display: none;
}
