/* General Styles */
:root {
    --primary-color: #1E3A8A;
    --primary-hover: #172554;
    --secondary-color: #64748B;
    --dark-color: #1F2937;
    --light-color: #F9FAFB;
    --white-color: #FFFFFF;
    --accent-color: #F59E0B;
    --logo-green: #10B981;
    --border-radius: 0.75rem;
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 100px 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
}

/* Header */
.header {
    transition: all 0.3s ease;
}

.header .navbar {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 2rem;
}

.header .navbar.scrolled {
    padding: 0.75rem 2rem;
    background-color: var(--white-color);
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .logo-img {
    transform: rotate(10deg);
}

.logo-text {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--logo-green);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.logo-tosan {
    color: var(--accent-color);
    font-weight: 900;
}

/* Mobile Menu */
.navbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.navbar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-toggle {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: var(--white-color);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--white-color);
        padding: 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        transition: right 0.3s ease-in-out;
        z-index: 1001;
        overflow-y: auto;
    }

    .navbar-collapse.show {
        right: 0;
    }

    .navbar-nav {
        flex-direction: column !important;
        padding: 2rem 0;
    }

    .nav-link {
        padding: 0.8rem 1rem;
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
}

/* Hero Section */
.product-hero-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--logo-green) 100%);
    color: var(--white-color);
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .product-hero-section {
        padding: 60px 0;
        text-align: center;
    }
}

/* Feature Cards */
.feature-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: var(--primary-color);
}

.feature-icon i {
    font-size: 28px;
    color: var(--white-color);
}

/* Application Cards */
.app-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: all 0.3s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(30, 58, 138, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.app-icon i {
    font-size: 24px;
    color: var(--primary-color);
}

/* Benefits List */
.benefits-list {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    padding: 12px 0;
    border-bottom: 1px dashed #E5E7EB;
    display: flex;
    align-items: flex-start;
}

.benefits-list li:last-child {
    border-bottom: none;
}

/* Table */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--dark-color);
    border-collapse: collapse;
}

.table th {
    background: var(--primary-color);
    color: var(--white-color);
    font-weight: 600;
    padding: 12px;
    text-align: right;
}

.table td {
    padding: 12px;
    border-top: 1px solid #dee2e6;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Gallery */
.gallery-item {
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

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

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

/* Contact Form */
.contact-form .form-control {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--white-color);
    padding: 15px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form .form-control:focus {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white-color);
    box-shadow: none;
}

/* Footer */
.footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--dark-color), #111827);
    color: var(--white-color);
    padding: 2.5rem 0 1rem;
}

#footer-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-brand {
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.footer-logo-img {
    height: 60px;
    width: auto;
    margin-right: 15px;
    transition: transform 0.3s ease;
}

.footer-logo:hover .footer-logo-img {
    transform: rotate(10deg);
}

.footer-logo-text {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    color: var(--logo-green);
}

.footer-logo-tosan {
    color: var(--accent-color);
    font-weight: 900;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    flex: 2;
    gap: 2rem;
}

.footer-column h5 {
    color: var(--white-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-column h5::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background: var(--accent-color);
    bottom: -5px;
    right: 0;
}

.footer-desc {
    color: #E5E7EB;
    font-size: 1rem;
    line-height: 1.6;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav.horizontal {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-nav-link {
    color: #D1D5DB;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.footer-nav-link:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white-color);
    font-size: 1.2rem;
    transition: all 0.4s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--accent-color);
    transform: translateY(-5px) rotate(15deg);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1.5rem;
}

.footer-bottom p {
    color: #F3F4F6;
}

.footer-copyright-link {
    color: #F3F4F6;
    font-weight: 600;
    text-decoration: none;
}

.footer-copyright-link:hover {
    color: var(--accent-color);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(45deg, var(--primary-color), var(--logo-green));
    color: var(--white-color);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-8px) scale(1.1);
    background: linear-gradient(45deg, var(--primary-hover), var(--logo-green));
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .footer-links {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
    }
    
    .footer-brand {
        margin-bottom: 1.5rem;
    }
    
    .footer-logo-text {
        font-size: 1.5rem;
    }
    
    .footer-nav.horizontal {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-nav-link:hover {
        transform: none;
    }
    
    .back-to-top {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* RTL Adjustments */
[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .section-title::after {
    right: 0;
    left: auto;
    transform: none;
}

/* Utility Classes */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5);
}