html { scroll-behavior: smooth; }
/* Base Reset & Variables */
:root {
    --primary-color: #ef394e; /* Digikala Red */
    --primary-dark: #cc2c3d;
    --secondary-color: #1a1a2e;
    --accent-color: #0f3460;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --bg-main: #0a0a12;
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    --transition: all 0.3s ease;
}

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

body {
    font-family: "Vazirmatn", sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding-top: 100px;
    padding-bottom: 100px;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
}

/* Typography */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 10px;
}

h1, h2, h3 {
    line-height: 1.3;
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5rem;
    font-weight: 800;
}

.text-gradient {
    background: linear-gradient(90deg, #ef394e, #ff758c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-large {
    padding: 15px 32px;
    font-size: 1.1rem;
}

/* Glow Effect */
.glow-btn {
    box-shadow: 0 0 20px rgba(239, 57, 78, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 57, 78, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(239, 57, 78, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 57, 78, 0); }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    padding-bottom: 80px;
    overflow: hidden;
}

.hero-bg-shapes .shape {
    position: absolute;
    filter: blur(100px);
    z-index: -1;
    border-radius: 50%;
}

.shape-1 {
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: rgba(239, 57, 78, 0.15);
}

.shape-2 {
    bottom: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: rgba(15, 52, 96, 0.4);
}

.hero-container {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 50px;
    align-items: center;
}

.hero-text .badge {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.hero-text .badge span {
    color: var(--primary-color);
    font-weight: bold;
    margin-left: 5px;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text h1 span {
    color: var(--primary-color);
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.hero-image {
    position: relative;
}

.floating-img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* =========================================
   About Section
========================================= */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.about-card {
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-card img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    object-fit: cover;
}

.about-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* =========================================
   Core Features (Zigzag)
========================================= */
.features-header-banner {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
    padding: 40px 20px;
    text-align: center;
    color: white;
    border-radius: 0;
    margin-bottom: 50px;
    box-shadow: 0 10px 30px rgba(239, 57, 78, 0.2);
}

.features-header-banner .section-title {
    margin-bottom: 0;
}

.features-header-banner h2 {
    color: white;
    margin-bottom: 15px;
}

.features-header-banner p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}

.feature-zigzag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 5rem;
}

.feature-zigzag.reverse {
    flex-direction: row-reverse;
}

.feature-content {
    flex: 1;
}

.feature-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.feature-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
}

.feature-img {
    flex: 1;
    position: relative;
}

.feature-img img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.feature-img img:hover {
    transform: scale(1.02);
}

.feature-img.multiple {
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
}

.feature-img.multiple img {
    width: 80%;
}

.feature-img.multiple .img-overlap {
    position: absolute;
    width: 50%;
    bottom: -20px;
    right: -20px;
    border: 4px solid var(--bg-darker);
}

/* =========================================
   How it Works (4 Steps)
========================================= */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step-card {
    position: relative;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.step-card:hover {
    transform: translateY(-10px);
}

.step-number {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 10px 15px;
    border-radius: 50%;
}

.step-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.step-card h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* =========================================
   UI Gallery
========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 2rem 1.5rem 1rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
    opacity: 1;
}

/* =========================================
   Pro Tip Box
========================================= */
.pro-tip-box {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 3rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(239, 57, 78, 0.1), rgba(0, 210, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pro-tip-content {
    flex: 3;
}

.tip-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.pro-tip-content h3 {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.pro-tip-img {
    flex: 2;
}

.pro-tip-img img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* FAQ Section */
.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 20px 25px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    text-align: right;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.accordion-header i {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.accordion-header.active i {
    transform: rotate(180deg);
}

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

.accordion-content p {
    padding: 0 0 20px 0;
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: rgba(15, 52, 96, 0.1);
    border-top: 1px solid var(--border-glass);
    margin-top: 50px;
}

.footer-cta {
    text-align: center;
    padding: 80px 20px;
}

.footer-cta p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.2rem;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.5);
    padding: 30px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.footer-logo img {
    height: 30px;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Animated Hero Graphic */
.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-container {
    animation: floatVertical 6s ease-in-out infinite;
}

.main-hero-video {
    width: 100%;
    display: block;
    position: relative;
    z-index: 2;
}

.hero-video-wrapper {
    position: relative;
    z-index: 1;
    /* Apply clip-path to wrapper instead of video for better Safari/Mobile support */
    clip-path: inset(0 0 8% 0 round 24px);
    -webkit-clip-path: inset(0 0 8% 0 round 24px);
    transform: translateZ(0); /* Force GPU acceleration to fix edge artifacts */
}

@keyframes pulseGlow {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

@keyframes floatVertical {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Responsive */
@media (max-width: 992px) {
    .hero-container, .security-content, .screenshot-gallery {
        grid-template-columns: 1fr;
    }
    
    .hero-video-wrapper {
        order: -1;
        margin-top: 30px; /* Space from header */
    }

    .hero-text {
        text-align: center;
        margin-top: 10px; /* Space from video */
        order: 1;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .security-image {
        order: 2;
    }
    
    .security-text {
        order: 1;
    }
    
    .feature-zigzag, .feature-zigzag.reverse {
        flex-direction: column;
        gap: 2rem;
    }
    
    .pro-tip-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    
    h1 {
        font-size: 1.6rem !important;
    }
    h2 {
        font-size: 1.6rem !important;
    }
    h3 {
        font-size: 1.3rem !important;
    }
    h4 {
        font-size: 1.1rem !important;
    }
    .hero-text {
        margin-top: -30px !important; /* Pull up to hide 8% gap */
    }
    .main-hero-video {
        margin-bottom: 0; /* Removed buggy margin hack */
    }
    .hero-video-wrapper {
        margin-top: 50px !important; /* Space from header */
    }

    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 18, 0.95);
        backdrop-filter: blur(15px);
        padding: 20px;
        text-align: center;
        border-bottom: 1px solid var(--border-glass);
    }
    
    .nav-links.active {
        display: flex;
    }

    .nav-cta {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Mobile Break */
.mobile-break {
    display: none;
}

@media (max-width: 768px) {
    .mobile-break {
        display: block;
    }
    
    .hero-video-wrapper {
        margin-top: 15px !important; /* Halve the distance for mobile */
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-video-wrapper {
        clip-path: inset(0 0 8% 0 round 15px) !important;
        -webkit-clip-path: inset(0 0 8% 0 round 15px) !important;
    }
    .main-hero-video {
        clip-path: none !important;
        -webkit-clip-path: none !important;
        border-radius: 15px;
    }
}

/* =========================================
   Bridge Section (Light Theme)
========================================= */
.bridge-section {
    background-color: #ffffff;
    width: 100%;
    padding: 80px 20px;
    text-align: center;
}

.bridge-logo-wrapper {
    margin-bottom: 10px;
}

.bridge-logo {
    height: 60px;
    width: auto;
    display: inline-block;
}

.bridge-subtitle {
    color: #2b2b3c;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.bridge-desc {
    color: #4a4a5e;
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    padding: 15px 30px;
}

.bridge-image-wrapper img {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.desktop-only {
    display: inline;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    
    .bridge-logo {
        height: 50px;
    }
    
    .bridge-subtitle {
        font-size: 1.6rem;
    }
    
    .bridge-desc {
        font-size: 1.1rem;
    }
}


/* Feature Badge */
.feature-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    margin-left: 8px;
    box-shadow: 0 5px 15px rgba(239, 57, 78, 0.4);
    vertical-align: middle;
}

/* White Features Section */
.features-white-bg {
    background-color: #ffffff;
    width: 100%;
    position: relative;
    color: var(--secondary-color);
}

.features-white-bg .feature-content h3 {
    color: var(--secondary-color);
}

.features-white-bg .feature-content p {
    color: #444;
}

.features-white-bg .feature-img img {
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); /* lighter shadow for white bg */
}

/* Setup Section */
.setup-section {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden;
}
.setup-section .section-title h2 {
    color: var(--text-main);
}
.setup-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-top: 3rem;
}
.setup-stepper {
    flex: 1;
    position: relative;
}

.setup-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}
.setup-step:last-child {
    margin-bottom: 0;
}
.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    flex-shrink: 0;
    margin-left: 20px;
}
.step-red {
    background: linear-gradient(135deg, #d64550, #ea5a65);
    box-shadow: 0 4px 15px rgba(214, 69, 80, 0.4);
}
.step-pink {
    background: linear-gradient(135deg, #a54173, #be5289);
    box-shadow: 0 4px 15px rgba(165, 65, 115, 0.4);
}
.step-purple {
    background: linear-gradient(135deg, #6c469f, #815bb3);
    box-shadow: 0 4px 15px rgba(108, 70, 159, 0.4);
}
.step-text h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-main);
}
.step-text p {
    font-size: 1.05rem;
    color: var(--text-gray);
    line-height: 1.8;
}
.setup-image {
    flex: 1.3;
}
.setup-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

@media (max-width: 991px) {
    .setup-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .faq.section-padding {
        padding-top: 40px;
    }
}



.setup-step:not(:last-child)::before {
    content: ;
    position: absolute;
    top: 40px;
    right: 18px;
    width: 4px;
    height: calc(100% + 3rem - 40px);
    z-index: 1;
}
.setup-step:nth-child(1)::before {
    background: linear-gradient(to bottom, #d64550, #a54173);
}
.setup-step:nth-child(2)::before {
    background: linear-gradient(to bottom, #a54173, #6c469f);
}

/* Gallery Section */
.gallery-section {
    background-color: var(--bg-main);
    color: var(--text-main);
}
.slider-container {
    position: relative;
    width: 60%;
    margin: 0 auto;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    border: 1px solid var(--border-glass);
}
.slider-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
}
.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.slide.active {
    opacity: 1;
    z-index: 1;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px; height: 45px;
    border-radius: 50%;
    background: rgba(26, 26, 46, 0.7);
    color: white;
    border: 1px solid var(--border-glass);
    cursor: pointer;
    z-index: 2;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    transition: all 0.3s;
}
.slider-btn:hover { 
    background: var(--primary-color); 
    border-color: var(--primary-color);
}
.prev-btn { right: -60px; background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.next-btn { left: -60px; background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 2;
}
.dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.3s;
}
.dot.active { background: var(--primary-color); }

@media (max-width: 991px) {
    .slider-container { width: 85%; }
}
@media (max-width: 768px) {
    .slider-container { width: 100%; }
}

@media (max-width: 991px) {
    .prev-btn { right: 10px; background: rgba(0,0,0,0.6); }
    .next-btn { left: 10px; background: rgba(0,0,0,0.6); }
}

/* Anchor offsets */
section[id] {
    scroll-margin-top: 100px;
}
