/* Variables - Original Version */
:root {
    --color-primary: #6A0DAD;
    /* Deep Violet */
    --color-accent: #8a35c7;
    /* Electric Blue */
    --color-background: #000000;
    /* Absolute Black */
    --glass-blur: 2px;
    /* Original Blur */
    --glass-saturate: 180%;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.05);
}

/* Base Styles & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    color: #E0E0E0;
    /* Light Gray for text */
    background-color: var(--color-background);
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Three.js Canvas for Dynamic Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    /* Keep it behind all content */
    opacity: 0.7;
    /* Slightly transparent for a subtle effect */
}

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

/* Neon Text Effect */
.neon-text {
    color: #fff;
    text-shadow:
        0 0 7px var(--color-accent),
        0 0 10px var(--color-accent),
        0 0 21px var(--color-accent),
        0 0 42px var(--color-primary),
        0 0 82px var(--color-primary),
        0 0 92px var(--color-primary),
        0 0 102px var(--color-primary);
}

/* Liquid Glass (Glassmorphism) Effect - Original Version */
.liquid-glass {
    
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    /* Original Radius */
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 rgba(170, 170, 170, 0.2),
        /* هایلایت داخلی */
        inset 0 -1px 0 rgba(46, 46, 46, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.liquid-glass:hover {
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    z-index: 100;
    padding: 15px 30px;
    /* Custom Glass for Header */
    background: rgba(255, 255, 255, 0.03);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-accent);
}

nav a {
    color: #fff;
    text-decoration: none;
    margin-right: 25px;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--color-accent);
}

/* Call to Action Button */
.cta-button {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--color-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    color: #fff;
    background: var(--color-accent);
    box-shadow: 0 0 15px var(--color-accent);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    /* Added for mobile stacking */
    justify-content: center;
    /* Center content vertically */
    align-items: center;
    text-align: center;
    padding-top: 50px;
    /* Adjusted padding */
}

.hero-section h1 {
    font-size: 5rem;
    margin-bottom: 20px;
    font-weight: 900;
}

.hero-section .tagline {
    font-size: 1.5rem;
    color: #ccc;
    margin-bottom: 40px;
}

.primary-cta {
    font-size: 1.2rem;
    padding: 15px 40px;
}

/* Content Sections */
.content-section {
    padding: 100px 0;
    min-height: 80vh;
}

.content-section h2 {
    font-size: 3rem;
    margin-bottom: 40px;
    text-align: center;
    font-weight: 800;
}

#about .container {
    padding: 50px;
    text-align: center;
    max-width: 800px;
}

#about p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    padding: 30px;
    text-align: center;
}

.service-card .icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--color-accent);
}

.service-card h3 {
    color: #fff;
    margin-bottom: 10px;
}

/* Products Grid */
.products-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
}

.product-card {
    padding: 40px;
    width: 350px;
    text-align: center;
    border-left: 5px solid var(--color-primary);
}

.product-card h3 {
    color: var(--color-accent);
    margin-bottom: 10px;
}

/* Testimonials */
#testimonials {
    text-align: center;
}

.testimonial-card {
    max-width: 700px;
    margin: 50px auto 0;
    padding: 40px;
}

.quote {
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 20px;
    color: #fff;
}

.client-name {
    font-weight: 700;
    color: var(--color-primary);
}

/* Contact Form */
.contact-form-wrapper {
    max-width: 600px;
    margin: 50px auto 0;
    padding: 40px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    text-align: right;
    // direction: rtl;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-accent);
    outline: none;
}
#formResult.success {
    background: #d4edda15;
    color: #287e3c;
    border: 1px solid #c3e6cb;
}
#formResult.error {
    background: #f8d7da15;
    color: #a33843;
    border: 1px solid #f5c6cb;
}

/* Footer */
footer {
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-accent);
}

footer p {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #777;
}

/* ----------------------------------------------------------------- */
/* Media Queries for FULL Responsiveness - ENHANCED */
/* ----------------------------------------------------------------- */

/* Small Desktops and Tablets (Max Width 1024px) */
@media (max-width: 1024px) {
    .hero-section h1 {
        font-size: 4rem;
    }

    .content-section {
        padding: 80px 0;
    }
}

/* Tablets and Mobile Landscape (Max Width 768px) */
@media (max-width: 768px) {

    /* Header & Navigation for Mobile */
    header {
        position: fixed;
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        border-radius: 0;
        padding: 15px 20px;
        /* Custom Glass for Header - slightly less blur for better visibility */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    header nav {
        /* Hide menu links on mobile - a hamburger menu would be needed in production */
        display: none;
    }

    header .container {
        justify-content: center;
        /* Center the logo */
    }

    /* Hero Section Adjustments */
    .hero-section {
        padding-top: 120px;
        /* Give space for fixed header */
        min-height: 80vh;
    }

    .hero-section h1 {
        font-size: 3rem;
    }

    .hero-section .tagline {
        font-size: 1.2rem;
    }

    .primary-cta {
        padding: 12px 30px;
        font-size: 1.1rem;
    }

    /* Content Sections */
    .content-section {
        padding: 60px 0;
    }

    .content-section h2 {
        font-size: 2.5rem;
    }

    /* Services & Products Stacking */
    .services-grid,
    .products-grid {
        grid-template-columns: 1fr;
        /* Stack items vertically */
        gap: 20px;
    }

    .product-card {
        width: 90%;
        /* Full width on mobile */
        margin: 0 auto;
    }

    /* Testimonials */
    .testimonial-card {
        padding: 30px;
    }

    .quote {
        font-size: 1.1rem;
    }
}

/* Small Mobile Devices (Max Width 480px) */
@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .tagline {
        font-size: 1rem;
    }

    .content-section h2 {
        font-size: 2rem;
    }

    .contact-form-wrapper {
        padding: 30px 20px;
    }
}