/* Global styles and font */

body {

}

/* Custom Cursor (Desktop Only) */
.custom-cursor {
    position: fixed;
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none; /* Clicks pass through */
    z-index: 9999;
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: all 0.1s ease;
    display: none; /* پیش‌فرض مخفی - فقط داخل اسلایدر نمایش داده می‌شود */
}
.custom-cursor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    transition: all 0.1s ease;
}
.custom-cursor.left::before {
    border-left: 0;
    border-right: 15px solid rgba(255, 255, 255, 0.9);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    transform: translate(-70%, -50%);
}
.custom-cursor.right::before {
    border-right: 0;
    border-left: 15px solid rgba(255, 255, 255, 0.9);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    transform: translate(-30%, -50%);
}

/* Navbar Styles */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100; /* Above slider content */
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent; /* Changed to transparent */
    transition: background 0.3s ease;
}
.navbar-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
}
.navbar-nav {
    list-style: none;
    display: flex;
    gap: 40px;
}
.navbar-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}
.navbar-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: width 0.3s ease;
}
.navbar-nav a:hover::after {
    width: 100%;
}
.navbar-nav a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Hamburger Menu (Mobile) */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
    z-index: 101; /* Above mobile nav */
}
/* Mobile Menu (initially hidden and off-screen) */
.mobile-nav {
    position: fixed; /* Fixed to viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Full screen height */
    background: rgba(0, 0, 0, 0.95); /* Semi-transparent dark background */
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Center items horizontally */
    list-style: none;
    gap: 30px;
    transform: translateX(100%); /* Start off-screen to the right */
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out, visibility 0.5s ease-in-out; /* Smooth animation */
    z-index: 99; /* Below hamburger, above slider */
    opacity: 0; /* Initially transparent */
    visibility: hidden; /* Initially hidden from accessibility tree */
    pointer-events: none; /* Prevent clicks when hidden */
}
/* Mobile Menu when open */
.mobile-nav.open {
    transform: translateX(0); /* Slide into view */
    opacity: 1; /* Fully visible */
    visibility: visible; /* Accessible */
    pointer-events: auto; /* Allow clicks */
}
/* Styling for individual list items in mobile menu */
.mobile-nav li {
    opacity: 0; /* Initial state for animation */
    transform: translateY(20px); /* Initial state for animation */
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    width: 100%; /* Make li take full width for centering text */
}
/* Animation for individual list items when menu is open */
.mobile-nav.open li {
    opacity: 1;
    transform: translateY(0);
}
/* Staggered animation delays for list items */
.mobile-nav.open li:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.open li:nth-child(2) { transition-delay: 0.2s; }
.mobile-nav.open li:nth-child(3) { transition-delay: 0.3s; }
.mobile-nav.open li:nth-child(4) { transition-delay: 0.4s; }
.mobile-nav.open li:nth-child(5) { transition-delay: 0.5s; } /* For 'Contact' */

.mobile-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 2.2rem; /* Larger font for mobile links */
    font-weight: 600; /* Bolder font */
    padding: 15px 0; /* Increased vertical padding for better touch area */
    display: block; /* Make the whole area clickable */
    text-align: center; /* Center text within the link */
    transition: background 0.3s ease, color 0.3s ease; /* Added transition for hover */
}
.mobile-nav a:hover, .mobile-nav a:active { /* Added :active for touch devices */
    background: rgba(255, 255, 255, 0.1); /* Subtle background on hover/tap */
    color: rgba(255, 255, 255, 0.8);
}

/* Slider Styles */
.slider-container {
    position: relative;
    width: 100%;
    height: 100vh; /* Full viewport height for desktop */
    overflow: hidden;
    cursor: none; /* فقط داخل اسلایدر cursor مخفی باشد */
}
.slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1); /* Animation for slide change */
    cursor: grab; /* Cursor for dragging */
    user-select: none; /* Prevent text selection during drag */
}
.slider-wrapper.dragging {
    cursor: grabbing;
}
.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.slide-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0,0,0,0.3));
    z-index: 1;
}
.slide-content {
    text-align: center;
    z-index: 2;
    position: relative;
    padding: 0 20px; /* Add padding for smaller screens */
    color: white;
}
/* Content animation initial state (managed by JS for animation reset) */
.slide-title, .slide-subtitle {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out; /* Added transition for smooth reset */
}
.slide-title {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    cursor: default; /* No longer a button, so default cursor */
}
.slide-subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Animation Keyframes */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation Lines (Desktop Only) */
.navigation-lines {
    position: absolute;
    top: 45%;
    width: 2px;
    height: 10%;
    background: rgba(255, 255, 255, 0.3);
    z-index: 5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    border-radius: 2px;
}
.nav-line-left {
    left: 8%;
}
.nav-line-right {
    right: 8%;
}
.navigation-lines.active {
    background: rgba(255, 255, 255, 0.8);
    height: 20%;
    top: 40%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    width: 3px;
}

/* Navigation Areas for Click (Desktop & Mobile) */
/* IMPORTANT: These are now active on mobile too for click navigation */
.navigation-area {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    z-index: 10;
    cursor: pointer;
    pointer-events: auto; /* Ensure clicks are registered */
}
.nav-area-left {
    left: 0;
}
.nav-area-right {
    right: 0;
}

/* Navigation Rectangles */
.navigation-rects {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.nav-rect {
    width: 30px;
    height: 6px;
    border-radius: 2px;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.4s ease;
}
.nav-rect.active {
    background: #fff;
    transform: scale(1.1);
}
.nav-rect:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Social Icons */
.social-icons {
    position: absolute;
    bottom: 30px;
    left: 50px;
    z-index: 20;
    display: flex;
    gap: 25px;
}
.social-icons a {
    color: #fff;
    font-size: 1.8rem;
    transition: transform 0.3s ease, color 0.3s ease;
}
.social-icons a:hover {
    transform: translateY(-5px);
    color: rgba(255, 255, 255, 0.7);
}

/* All Projects Link */
.all-projects-link {
    position: absolute;
    bottom: 30px;
    right: 50px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}
.all-projects-link:hover {
    color: rgba(255, 255, 255, 0.7);
}
.all-projects-link i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}
.all-projects-link:hover i {
    transform: translateX(5px);
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Slider height for mobile */
    .slider-container {
        height: 93vh;
        cursor: default; /* cursor عادی برای موبایل */
    }

    .slide-title {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }
    
    .slide-subtitle {
        font-size: 1.1rem;
    }
    
    /* Hide custom cursor on mobile */
    .custom-cursor {
        display: none !important;
    }
    
    /* Hide navigation lines on mobile */
    .navigation-lines {
        display: none;
    }
    /* Navigation areas are NOT hidden on mobile anymore, for click functionality */

    /* Navbar for mobile */
    .navbar {
        padding: 15px 20px;
        background: transparent; /* Keep transparent on mobile too */
    }
    .navbar-nav {
        display: none; /* Hide desktop menu */
    }
    .hamburger-menu {
        display: block; /* Show hamburger icon */
    }

    /* Adjust social icons and all projects link for mobile */
    .social-icons {
        left: 20px;
        bottom: 20px;
        gap: 15px;
    }
    .social-icons a {
        font-size: 1.5rem;
    }
    .all-projects-link {
        right: 20px;
        bottom: 20px;
        font-size: 1rem;
    }
    .all-projects-link i {
        font-size: 0.9rem;
    }

    /* Navigation rectangles for mobile */
    .navigation-rects {
        bottom: 60px; /* Move up to avoid overlap with social/project links */
        gap: 8px;
    }
    .nav-rect {
        width: 20px;
        height: 5px;
    }
}

@media (max-width: 480px) {
    .slide-title {
        font-size: 2rem;
    }
    .slide-subtitle {
        font-size: 0.9rem;
    }
    .navbar-logo {
        font-size: 1.5rem;
    }
    .hamburger-menu {
        font-size: 1.5rem;
    }
    .mobile-nav a {
        font-size: 1.5rem;
    }
}

.hamburger-lines {
    display: flex;
    flex-direction: column;
    width: 20px;
    height: 15px;
    justify-content: space-between;
    cursor: pointer;
}

.hamburger-lines span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animation for X shape */
.hamburger-menu.open .hamburger-lines span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.open .hamburger-lines span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger-menu.open .hamburger-lines span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}