/* Base styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

/* Search Bar */
.search-container {
    position: relative;
    margin-left: 20px;
}

.search-input {
    padding: 10px 15px 10px 40px;
    border-radius: 25px;
    border: none;
    outline: none;
    width: 250px;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    background-color: white;
    color: #333;
    width: 300px;
}

.search-input:focus::placeholder {
    color: #999;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    pointer-events: none;
}

.search-input:focus + .search-icon {
    color: #3498db;
}

/* Search Results */
.search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-height: 400px;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.search-results::-webkit-scrollbar {
    display: none;
}

.search-result-item {
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.search-result-item h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.search-result-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.search-result-item .result-type {
    display: inline-block;
    padding: 2px 8px;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #666;
}

.highlight {
    background-color: #fffacd;
    font-weight: bold;
}

/* Hero Section */
.hero {
    padding: 100px 0;
    text-align: center;
    background-color: #3498db;
    color: white;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    background-color: #2c3e50;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #1a252f;
}

/* Scroll wrapper with navigation arrows */
.scroll-wrapper {
    position: relative;
}

.scroll-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(52, 152, 219, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
}

.scroll-wrapper:hover .scroll-nav-btn,
.scroll-wrapper:focus-within .scroll-nav-btn {
    opacity: 1;
    visibility: visible;
}

.scroll-nav-btn:hover {
    background-color: rgba(52, 152, 219, 1);
    transform: translateY(-50%) scale(1.1);
}

.scroll-nav-btn.prev {
    left: -25px;
}

.scroll-nav-btn.next {
    right: -25px;
}

.scroll-nav-btn:after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
}

.scroll-nav-btn.prev:after {
    border-top: 8px solid transparent;
    border-right: 12px solid white;
    border-bottom: 8px solid transparent;
    margin-right: 2px;
}

.scroll-nav-btn.next:after {
    border-top: 8px solid transparent;
    border-left: 12px solid white;
    border-bottom: 8px solid transparent;
    margin-left: 2px;
}

/* Common styles for scroll containers */
.project-scroll-container,
.tutorial-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 30px;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.project-scroll-container::-webkit-scrollbar,
.tutorial-scroll-container::-webkit-scrollbar {
    display: none;
}

/* Projects Section */
.projects {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
}

.project-card {
    flex: 0 0 auto;
    width: 350px;
    scroll-snap-align: start;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-img {
    height: 200px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid #eee;
}

.project-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
    margin: auto;
}

.project-card:hover .project-img img {
    transform: scale(1.05);
}

.project-content {
    padding: 20px;
}

.project-content h3 {
    margin-top: 0;
}

.project-content p {
    color: #666;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    margin-top: 15px;
}

.tag {
    background-color: #eee;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* Tutorials Section */
.tutorials {
    padding: 80px 0;
    background-color: #ecf0f1;
}

.tutorial-card {
    flex: 0 0 auto;
    width: 300px;
    scroll-snap-align: start;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tutorial-img {
    height: 180px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #eee;
}

.tutorial-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
    transition: transform 0.3s ease;
}

.tutorial-card:hover .tutorial-img img {
    transform: scale(1.05);
}

.play-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background-color: rgba(52, 152, 219, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform 0.3s ease;
}

.tutorial-card:hover .play-icon {
    transform: scale(1.1);
}

.play-icon:after {
    content: "";
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-left: 18px solid white;
    border-bottom: 10px solid transparent;
    margin-left: 4px;
}

.tutorial-content {
    padding: 20px;
}

/* About Section */
.about {
    padding: 80px 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-img {
    flex: 1;
    height: 300px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #eee;
}

.about-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.about-img:hover img {
    transform: scale(1.02);
}

.about-text {
    flex: 2;
}

/* Contact CTA Section */
.contact-cta {
    padding: 80px 0;
    background-color: #34495e;
    color: white;
    text-align: center;
}

.contact-cta-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-cta-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 600;
}

.contact-cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.contact-cta .btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.contact-cta .btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    margin: 0 10px;
    transition: transform 0.3s, background-color 0.3s;
}

.social-link:hover {
    transform: translateY(-3px);
    background-color: #ecf0f1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .search-input {
        width: 200px;
    }
    
    .search-input:focus {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    nav ul {
        margin: 0;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    nav ul li {
        margin: 0;
    }
    
    .search-container {
        margin: 0;
        order: 3;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .search-input {
        width: 100%;
        padding: 8px 12px 8px 35px;
    }
    
    .search-input:focus {
        width: 100%;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .scroll-nav-btn {
        opacity: 1;
        visibility: visible;
        width: 40px;
        height: 40px;
    }
    
    .scroll-nav-btn.prev {
        left: -20px;
    }
    
    .scroll-nav-btn.next {
        right: -20px;
    }
    
    .contact-cta-content {
        padding: 0 15px;
    }
    
    .contact-cta-content h2 {
        font-size: 28px;
    }
    
    .contact-cta-content p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 18px;
    }
    
    nav ul {
        gap: 10px;
    }
    
    .search-input {
        padding: 6px 10px 6px 30px;
        max-width: 250px;
    }
    
    .search-icon {
        left: 12px;
    }
    
    .scroll-nav-btn {
        width: 35px;
        height: 35px;
    }
    
    .scroll-nav-btn.prev {
        left: -18px;
    }
    
    .scroll-nav-btn.next {
        right: -18px;
    }
}