/* --- Global Reset & Setup --- */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --gradient-start: rgba(1, 0, 85, 1);
    --gradient-end: rgba(19, 121, 79, 1);
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --bg-hover: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --shadow-color: rgba(30, 41, 59, 0.1);
    --spotlight-color: rgba(111, 153, 221, 0.125);
    /* Color for the new hover effect */
    --font-body: 'Noto Sans Arabic', sans-serif;
    --font-heading: 'Vazirmatn', sans-serif;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.7;
    font-weight: 400;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.text-gradient {
    background: linear-gradient(45deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: rotate(360deg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}


/* --- Header & Navbar --- */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 15px var(--shadow-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.nav-logo img {
    width: 40px;
    height: 40px;
}

.nav-logo h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1.05rem;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    z-index: 1001;
}

/* --- Hero Section --- */
.hero {
    padding: 80px 0;
    background-color: var(--bg-light);
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    100% {
        opacity: 1;
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 32px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.hero-features-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2.5rem;
}

.hero-features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.hero-features-list .fa-check-circle {
    color: var(--gradient-end);
}

/* Hero Visual & Orbit Animation */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-orbit {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.central-logo {
    width: 200px;
    height: 200px;
    animation: logoPulse 4s ease-in-out infinite;
}

.icon-orbiter {
    position: absolute;
    font-size: 1.8rem;
    background: linear-gradient(45deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --angle: calc(var(--i) * 36deg);
    animation: orbit 25s linear infinite;
    animation-delay: calc(var(--i) * -2.5s);
    transform: rotate(0) translate(180px) rotate(0);
}

@keyframes orbit {
    100% {
        transform: rotate(360deg) translate(180px) rotate(-360deg);
    }
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.075);
    }
}

/* --- Features Section --- */
.features-section {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 40px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-icon,
.feature-title,
.feature-description {
    position: relative;
    z-index: 2;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1;
}

.feature-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: radial-gradient(circle 200px at var(--x) var(--y),
            var(--spotlight-color),
            transparent 80%);
    opacity: 0;
    transition: opacity 0.4s ease-out;
    z-index: 1;
}

.feature-card:hover::before {
    opacity: 1;
}

/* --- Showcase Section --- */
.showcase-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.showcase-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 100px;
}

.showcase-item:last-child {
    margin-bottom: 0;
}

.showcase-item.reverse {
    direction: ltr;
}

.showcase-item.reverse .showcase-text {
    direction: rtl;
}

.showcase-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.showcase-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.showcase-image img {
    border-radius: var(--border-radius-md);
    box-shadow: 0 15px 30px var(--shadow-color);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.showcase-image img:hover {
    transform: scale(1.03) rotate(1deg);
    box-shadow: 0 25px 50px var(--shadow-color);
}


/* --- Products Section --- */
.products-section {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 40px; /* Increased padding */
    padding-top: 50px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
    border-color: var(--primary-color);
}

/* Make popular card stand out */
.product-card.popular {
    border-width: 2px;
    border-color: var(--gradient-end);
}

.product-card.popular:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
    /* border-color: var(--primary-dark); */
}


.product-icon,
.product-title,
.product-description,
.product-price,
.product-link {
    z-index: 2;
    position: relative;
}

.product-icon {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.product-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.product-description {
    color: var(--text-secondary);
    flex-grow: 1;
    text-align: justify;
    margin-bottom: 1.5rem;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 1rem;
}

.product-link {
    font-weight: 500;
    color: var(--primary-color);
}

.product-link i {
    margin-right: 5px;
    transition: transform 0.3s ease;
}

.product-link:hover i {
    transform: translateX(-4px);
}

/* Most Popular Badge */
.product-badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--gradient-end);
    color: white;
    padding: 8px 40px;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    transform: translateX(-25%) translateY(20px) rotate(-45deg);
    transform-origin: center;
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
    z-index: 3;
}

.product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: radial-gradient(circle 200px at var(--x) var(--y), var(--spotlight-color), transparent 80%);
    opacity: 0;
    transition: opacity 0.4s ease-out;
    z-index: 1;
}

.product-card:hover::before {
    opacity: 1;
}

.products-footer {
    text-align: center;
    margin-top: 60px;
}


/* --- Footer --- */
.footer {
    background-color: var(--bg-light);
    color: var(--text-secondary);
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: start;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-brand,
.footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo img {
    width: 45px;
}

.footer-logo h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.copyright-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    transition: transform 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 5px 15px var(--shadow-color);
}


/* --- Scroll Animations --- */
.anim-fade-in,
.anim-slide-up {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.anim-slide-up {
    transform: translateY(40px);
}

.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- Responsive Design --- */
@media (max-width: 992px) {

    .hero-content,
    .showcase-item,
    .showcase-item.reverse,
    .features-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .showcase-item {
        margin-bottom: 60px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-text {
        order: 2;
    }

    .hero-visual {
        order: 1;
        margin-bottom: 40px;
    }

    .hero-subtitle,
    .hero-features-list {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-features-list {
        display: inline-block;
        text-align: right;
    }

    .showcase-item,
    .showcase-item.reverse {
        direction: rtl;
    }

    .showcase-image {
        margin-bottom: 30px;
    }

    .showcase-text {
        text-align: center;
    }

    .icon-orbit {
        width: 300px;
        height: 300px;
    }

    .central-logo {
        width: 130px;
        height: 130px;
    }

    .icon-orbiter {
        font-size: 1.6rem;
        width: 55px;
        height: 55px;
        transform: rotate(0) translate(140px) rotate(0);
        animation-name: orbit-tablet;
    }

    @keyframes orbit-tablet {
        100% {
            transform: rotate(360deg) translate(140px) rotate(-360deg);
        }
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 48px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-toggle {
        display: block;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .footer {
        padding: 20px 0 24px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .footer-brand,
    .footer-social,
    .footer-logo,
    .social-links {
        text-align: center;
        margin: auto;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero {
        padding-top: 64px;
    }

    .hero-content {
        gap: 36px;
    }

    .section-title,
    .hero-title,
    .showcase-title {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .showcase-title {
        font-size: 1.8rem;
    }

    .feature-card,
    .product-card {
        padding: 30px;
        padding-top: 40px;
    }

    .icon-orbit {
        width: 200px;
        height: 200px;
    }

    .central-logo {
        width: 105px;
        height: 105px;
    }

    .icon-orbiter {
        font-size: 1.4rem;
        width: 45px;
        height: 45px;
        transform: rotate(0) translate(110px) rotate(0);
        animation-name: orbit-mobile;
    }

    @keyframes orbit-mobile {
        100% {
            transform: rotate(360deg) translate(110px) rotate(-360deg);
        }
    }
}