/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h2 {
    color: #1b5e20;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #1b5e20;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: 
        linear-gradient(135deg, rgba(27, 94, 32, 0.85) 0%, rgba(46, 125, 50, 0.85) 100%),
        url('https://images.pexels.com/photos/163170/board-printed-circuit-board-computer-electronics-163170.jpeg') center/cover;
    color: white;
    text-align: center;
    padding: 150px 20px 100px;
    margin-top: 80px;
    position: relative;
    /* Fallback gradient if image fails to load */
    background-color: #1b5e20;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.hero-tagline {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0.95;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.hero-tech {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.hero-frameworks {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.85;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: #f57f17;
    color: white;
}

.btn-primary:hover {
    background: #ef6c00;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #1b5e20;
}

/* Sections */
section {
    padding: 80px 0;
}

.services {
    background: #f8f9fa;
}

.services h2,
.philosophy h2,
.portfolio h2,
.value-proposition h2,
.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1b5e20;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #666;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    color: #1b5e20;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Philosophy */
.philosophy {
    background: 
        linear-gradient(135deg, rgba(27, 94, 32, 0.9) 0%, rgba(46, 125, 50, 0.9) 100%),
        url('https://www.csm.tech/storage/uploads/images/4831Embracing-Green-Coding%20(1).jpg') center/cover;
    color: white;
    position: relative;
}

.philosophy h2 {
    color: white;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.philosophy-item {
    text-align: center;
    padding: 1rem;
}

.philosophy-item h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    background: #f8f9fa;
    padding: 0;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
    height: 250px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.portfolio-item:hover {
    transform: translateY(-3px);
}

.portfolio-overlay {
    background: rgba(27, 94, 32, 0.7);
    color: white;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    background: rgba(27, 94, 32, 0.85);
}

.portfolio-item h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.portfolio-link {
    color: #f57f17;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-block;
}

.portfolio-link:hover {
    text-decoration: underline;
}

/* Portfolio Item Background Images */
.portfolio-smartcuffs {
    background-image: url('https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=70');
    background-color: #f57f17;
}

.portfolio-moggie {
    background-image: url('https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=70');
    background-color: #4ecdc4;
}

.portfolio-openvia {
    background-image: url('https://cdn.prod.website-files.com/63d13bc89c5e188364cba85e/63fa0f2e300f0cc74a858a05_OpenVia-Hero-Home.jpg');
    background-color: #2e7d32;
}

.portfolio-zef {
    background-image: url('https://images.squarespace-cdn.com/content/v1/5a452989f6576e04a03298a3/90252024-90f7-4fbd-97ae-1063ada1757d/ZNP+-Car+-+Image.png');
    background-color: #f093fb;
}

.portfolio-downtime {
    background-image: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=70');
    background-color: #388e3c;
}

.portfolio-instincts {
    background-image: url('https://images.unsplash.com/photo-1559827260-dc66d52bef19?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=70');
    background-color: #4caf50;
}

.portfolio-links {
    margin-top: 4rem;
    text-align: center;
}

.portfolio-links h3 {
    color: #1b5e20;
    margin-bottom: 1rem;
}

.links-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.portfolio-social {
    color: #1b5e20;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 2px solid #1b5e20;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.portfolio-social:hover {
    background: #1b5e20;
    color: white;
}

/* Value Proposition */
.value-proposition {
    background: #f8f9fa;
}

.value-proposition p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Contact */
.contact {
    background: 
        linear-gradient(135deg, rgba(27, 94, 32, 0.9) 0%, rgba(46, 125, 50, 0.9) 100%),
        url('https://images.pexels.com/photos/57007/pexels-photo-57007.jpeg') center/cover;
    color: white;
    text-align: center;
    position: relative;
}

.contact h2 {
    color: white;
}

.contact p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-email {
    font-size: 1.1rem;
    margin-bottom: 1.5rem !important;
    font-weight: 500;
}

.contact-email a {
    color: #81c784;
    text-decoration: none;
    font-weight: 600;
}

.contact-email a:hover {
    text-decoration: underline;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Testimonials */
.testimonials {
    background: #f8f9fa;
}

.testimonials h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1b5e20;
}

.testimonials-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonials-carousel {
    overflow: hidden;
    border-radius: 10px;
    width: 100%;
}

.testimonials-track {
    display: flex;
    transition: transform 0.5s ease;
    width: 600%; /* 6 testimonials * 100% each */
}

.testimonial-card {
    background: white;
    padding: 2.5rem;
    margin: 0;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    width: calc(100% / 6); /* Each card takes 1/6 of track width */
    flex-shrink: 0;
    text-align: center;
    box-sizing: border-box;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    font-weight: 600;
    color: #1b5e20;
    margin-bottom: 0.5rem;
}

.testimonial-project {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.testimonial-year {
    color: #999;
    font-size: 0.85rem;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-btn {
    background: #1b5e20;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: #2e7d32;
    transform: scale(1.1);
}

.carousel-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-dot.active {
    background: #1b5e20;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

footer p {
    opacity: 0.8;
}

/* Use Cases Styles */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.use-case-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.use-case-card:hover {
    transform: translateY(-5px);
}

.use-case-image {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

.use-case-content {
    padding: 2rem;
}

.use-case-content h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.use-case-section {
    margin-bottom: 1.5rem;
}

.use-case-section h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.use-case-section p {
    line-height: 1.6;
    color: #666;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .portfolio-item {
        height: 200px;
    }
    
    .portfolio-overlay {
        background: rgba(27, 94, 32, 0.9);
    }
    
    /* Optimize hero background on mobile */
    .hero {
        background: 
            linear-gradient(135deg, rgba(27, 94, 32, 0.85) 0%, rgba(46, 125, 50, 0.85) 100%),
            url('https://images.pexels.com/photos/163170/board-printed-circuit-board-computer-electronics-163170.jpeg?auto=compress&cs=tinysrgb&w=800') center/cover;
        background-attachment: scroll;
        background-color: #1b5e20;
    }
    
    /* Reduce background image quality on mobile */
    .portfolio-smartcuffs {
        background-image: url('https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?ixlib=rb-4.0.3&auto=format&fit=crop&w=400&q=50');
    }
    
    .portfolio-moggie {
        background-image: url('https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba?ixlib=rb-4.0.3&auto=format&fit=crop&w=400&q=50');
    }
    
    .portfolio-instincts {
        background-image: url('https://images.unsplash.com/photo-1518709268805-4e9042af2176?ixlib=rb-4.0.3&auto=format&fit=crop&w=400&q=50');
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.3rem;
        line-height: 1.2;
        margin-bottom: 0.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .services-grid,
    .portfolio-grid,
    .philosophy-grid {
        grid-template-columns: 1fr;
    }

    .links-grid {
        flex-direction: column;
        align-items: center;
    }

    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }

    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    /* Adjust portfolio titles for mobile */
    .portfolio-item h3 {
        font-size: 1.5rem;
    }
    
    /* Testimonials mobile styles */
    .testimonial-card {
        padding: 2rem 1.5rem;
        margin: 0;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    .carousel-nav {
        gap: 0.5rem;
    }
    
    .carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 20px 80px;
    }

    .hero-title {
        font-size: 2rem;
    }

    section {
        padding: 60px 0;
    }

    .service-card,
    .portfolio-item {
        padding: 1.5rem;
    }
}