/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent; /* Removes tap highlight on iOS */
}

body {
    background-color: #0a0a0a;
    color: #f5f5f5;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh; /* Ensures full height on mobile */
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    height: 3px;
    width: 100%;
    background-color: #00e5ff;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Active state for menu toggle */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Navbar */
.navbar {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    position: fixed;
    width: 100%;
    top: 0;
    left: 0; /* Ensure full width on mobile */
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00e5ff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: #f5f5f5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #00e5ff;
}

/* Hero section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
    overflow: hidden; /* Prevent video from causing scrollbars */
}

/* Video Background Styles */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.hero-background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    opacity: 0.5; /* 50% opacity for better readability */
    z-index: -1;
}

/* Hero content */
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); /* For better readability against video */
}

.hero p {
    font-size: 1.5rem;
    max-width: 800px;
    margin-bottom: 2rem;
    color: #cccccc;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #00e5ff, #0088ff);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.3);
}

/* Services section */
.services {
    padding: 6rem 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 5rem;
    font-size: 2.5rem;
    color: #ffffff;
}

.section-title span {
    color: #00e5ff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.2);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #00e5ff;
}

/* Portfolio section */
.portfolio {
    padding: 6rem 2rem; 
    background-color: #0d0d0d;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    transition: transform 0.3s, box-shadow 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 229, 255, 0.4);
}

.portfolio-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.portfolio-overlay p {
    font-size: 1rem;
    color: #cccccc;
}

/* Contact section */
.contact {
    padding: 6rem 2rem;
    background-color: #0d0d0d;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #00e5ff;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-details p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cccccc;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    border-radius: 5px;
    color: #ffffff;
    -webkit-appearance: none;
    appearance: none; /* Standard property as well as vendor prefix */
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-button {
    background: linear-gradient(135deg, #00e5ff, #0088ff);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    -webkit-appearance: none;
    appearance: none; /* Standard property as well as vendor prefix */
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.3);
}

/* Footer */
footer {
    background-color: #000000;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links li {
    margin: 0 1rem;
}

.footer-links a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #00e5ff;
}

.copyright {
    color: #777777;
    font-size: 0.9rem;
}

/* Scroll Menu */
.scroll-menu {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    z-index: 999;
}

.scroll-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #555;
    margin: 8px 0;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
}

.scroll-dot:hover, 
.scroll-dot.active {
    background-color: #00e5ff;
    transform: scale(1.5);
}

/* Responsive adjustments */
@media (min-width: 1400px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 1800px;
    }
}

@media (max-width: 1200px) {
    .scroll-menu {
        right: 10px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .scroll-menu {
        display: none;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        width: 95%;
    }
    
    .section-title {
        margin-bottom: 3rem;
    }
}

/* If you want to ENABLE the video on mobile devices, replace the existing
   media query at max-width: 768px with this version: */

   @media (max-width: 768px) {
    /* Video background on mobile - actually showing the video */
    .hero-background-video {
        /* Optimizations for mobile video playback */
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.4; /* Slightly darker for better text readability on mobile */
    }
    
    /* Add a darker overlay to ensure text remains readable */
    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8); /* Stronger shadow for readability */
    }
    
    .hero p {
        font-size: 1.2rem;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .navbar {
        padding: 1rem;
    }
    
    .nav-links {
        position: fixed;
        background-color: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        top: 0;
        right: 0;
        height: 100vh;
        width: 80%;
        max-width: 300px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.5s ease;
        z-index: 1000;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links li {
        margin: 1.5rem 0;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 4rem 1.5rem;
    }
    
    .portfolio {
        padding: 4rem 1.5rem;
    }
    
    .portfolio-overlay h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .contact-form,
    .contact-info {
        width: 100%;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-links li {
        margin: 0.5rem 0;
    }
    
    .portfolio-overlay {
        padding: 1rem;
    }
    
    .portfolio-overlay h3 {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }
    
    .portfolio-overlay p {
        font-size: 0.9rem;
    }
    
    .cta-button {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
    }
    
    .submit-button {
        width: 100%;
    }
}

/* Fix for body scrolling on mobile when menu is open */
body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Safe area inset for iPhone X and newer */
@supports (padding: max(0px)) {
    .navbar {
        padding-left: max(2rem, env(safe-area-inset-left));
        padding-right: max(2rem, env(safe-area-inset-right));
    }
    
    .menu-toggle {
        right: max(20px, env(safe-area-inset-right));
    }
    
    footer {
        padding-bottom: max(3rem, env(safe-area-inset-bottom));
    }
}

