@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    color: #1a1a1a;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Navigation Bar */
.navbar {
    background: #2c3e50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 15px 0;
}

.logo-icon {
    font-size: 32px;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-item a {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    padding: 20px 20px;
    transition: background 0.3s, color 0.3s;
    font-weight: 500;
}

.nav-item a:hover,
.nav-item.active a {
    background: #34495e;
    color: #3498db;
}

/* Dropdown Menu */
.dropdown-content {
    display: none;
    position: absolute;
    background: #34495e;
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    top: 100%;
    left: 0;
    border-radius: 0 0 8px 8px;
}

.dropdown-content a {
    color: #ecf0f1;
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background: #3498db;
    color: white;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%),
                url('https://images.unsplash.com/photo-1518770660439-4636190af475?w=1920&q=80') center/cover;
    color: white;
    padding: 100px 20px;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 15px;
    opacity: 0.95;
}

.hero-description {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
}

.btn-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

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

/* Featured Section */
.featured-section {
    padding: 80px 20px;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 50px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

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

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

.project-thumbnail {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon {
    font-size: 80px;
}

.project-card-content {
    padding: 25px;
}

.project-card-content h3 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.project-card-content p {
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.6;
}

.difficulty-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
}

.difficulty-badge.easy {
    background: #27ae60;
}

.difficulty-badge.medium {
    background: #f39c12;
}

.difficulty-badge.hard {
    background: #e74c3c;
}

.project-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.project-link:hover {
    color: #2980b9;
}

.section-cta {
    text-align: center;
}

/* About Preview Section */
.about-preview {
    padding: 80px 20px;
    background: #f8f9fa;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-image .image-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 400px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 60px 20px 20px;
}

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

.footer-section h3 {
    color: #3498db;
    font-size: 24px;
    margin-bottom: 15px;
}

.footer-section h4 {
    color: #3498db;
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-section p {
    margin-bottom: 10px;
    line-height: 1.8;
}

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

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

.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #3498db;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #bdc3c7;
}

/* Project Detail Pages */
.main-content {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.project-detail {
    display: block;
}

.project-header {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.project-header h2 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.project-header .badge {
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    color: white;
}

.project-description {
    font-size: 18px;
    line-height: 1.8;
    color: #2c3e50;
    margin-top: 15px;
}

.project-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.project-section h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

.components-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.component-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #3498db;
}

.component-item::before {
    content: "🔌";
    font-size: 20px;
}

.code-container {
    position: relative;
    margin-top: 20px;
}

.code-block {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 25px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.copy-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.copy-button:active {
    transform: translateY(0);
}

.copy-button.copied {
    background: #27ae60;
}

.copy-button.copied::after {
    content: ' ✓';
}

.diagram-placeholder,
.photo-placeholder,
.video-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.diagram-placeholder {
    height: 400px;
    margin: 20px 0;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.photo-placeholder {
    height: 200px;
}

.video-placeholder {
    height: 300px;
}

/* Parts Grid */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.part-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.part-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.part-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-bottom: 20px;
}

.part-card h4 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 12px;
}

.part-card p {
    color: #2c3e50;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Projects Page */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 60px;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 20px;
    opacity: 0.95;
}

/* Steps List */
.steps-list {
    list-style: none;
    counter-reset: step-counter;
}

.step-item {
    counter-increment: step-counter;
    margin-bottom: 30px;
    padding-left: 60px;
    position: relative;
}

.step-item::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: #3498db;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.step-item h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
}

.step-item p {
    color: #2c3e50;
    line-height: 1.8;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.info-card strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-card span {
    color: #2c3e50;
    font-size: 18px;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ecf0f1;
    font-size: 28px;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s;
}

.mobile-menu-toggle:hover {
    color: #3498db;
}

.mobile-menu-toggle:focus {
    outline: 2px solid #3498db;
    outline-offset: 4px;
}

/* Project Filter Controls */
.project-controls {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-search-input {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s;
}

.project-search-input:focus {
    outline: none;
    border-color: #3498db;
}

.project-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: #3498db;
    color: white;
}

.filter-btn.active {
    background: #3498db;
    color: white;
}

.filter-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Troubleshooting Accordion */
.troubleshooting-accordion {
    margin-top: 20px;
}

.accordion-item {
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
    background: white;
    transition: background 0.3s;
}

.accordion-header:hover {
    background: #f8f9fa;
}

.accordion-header:focus {
    outline: 2px solid #3498db;
    outline-offset: -2px;
}

.accordion-problem {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.problem-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.problem-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.accordion-toggle {
    font-size: 24px;
    color: #3498db;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.accordion-item.active .accordion-toggle {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.accordion-body {
    padding: 0 20px 20px 20px;
    background: white;
}

.solution-steps {
    list-style: none;
    counter-reset: solution-counter;
}

.solution-steps li {
    counter-increment: solution-counter;
    padding: 12px 0 12px 40px;
    position: relative;
    color: #2c3e50;
    line-height: 1.7;
    border-left: 2px solid #3498db;
    margin-left: 20px;
    margin-bottom: 10px;
}

.solution-steps li::before {
    content: counter(solution-counter);
    position: absolute;
    left: -12px;
    top: 12px;
    background: #3498db;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.solution-tip {
    background: #e8f4f8;
    border-left: 4px solid #3498db;
    padding: 12px 15px;
    margin-top: 15px;
    border-radius: 4px;
}

.solution-tip strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.solution-tip p {
    color: #2c3e50;
    margin: 0;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 968px) {
    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2c3e50;
        display: none;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

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

    .nav-item a {
        padding: 15px 20px;
        border-bottom: 1px solid #34495e;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background: #34495e;
        border-radius: 0;
        display: none;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .dropdown-content a {
        padding-left: 40px;
        background: #2c3e50;
        border-bottom: 1px solid #34495e;
    }

    /* Hero Section */
    .hero {
        padding: 60px 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-description {
        font-size: 16px;
    }

    /* Project Header */
    .project-header {
        padding: 25px 20px;
    }

    .project-header h2 {
        font-size: 28px;
    }

    .project-description {
        font-size: 16px;
    }

    /* Project Section */
    .project-section {
        padding: 20px;
    }

    .project-section h3 {
        font-size: 20px;
    }

    /* Grids */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

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

    .components-list {
        grid-template-columns: 1fr;
    }

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

    /* Section Title */
    .section-title {
        font-size: 28px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .page-header p {
        font-size: 16px;
    }

    /* Code Block */
    .code-block {
        font-size: 12px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    /* Extra small devices */
    .logo-text {
        font-size: 18px;
    }

    .logo-icon {
        font-size: 24px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .project-header h2 {
        font-size: 24px;
        flex-direction: column;
        align-items: flex-start;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .project-card-content {
        padding: 20px;
    }

    .project-section {
        padding: 15px;
    }
}
