/* 
   Modern PROFESSIONAL VISIONARY (Light Theme)
   - High-end, clean, and professional aesthetic
   - Designed to build trust and attract new clients
*/

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700;900&family=Outfit:wght@300;400;600;800&display=swap');

:root {
    /* Light Theme (Default) */
    --primary: #2563eb;          /* Royal Blue */
    --primary-soft: #eff6ff;
    --secondary: #7c3aed;        /* Vibrant Purple */
    --accent: #0ea5e9;           /* Sky Blue */
    
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;           
    --bg-card: #ffffff;
    
    --text-main: #0f172a;        
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    
    --border-base: #e2e8f0;
    --border-soft: #f1f5f9;
    --cursor-color: rgba(37, 99, 235, 0.5);
    
    --hero-circle-stroke: #efefef;
}

/* Dark Theme */
body.dark-mode {
    --primary: #3b82f6;
    --primary-soft: rgba(59, 130, 246, 0.1);
    --secondary: #8b5cf6;
    --accent: #38bdf8;
    
    --bg-main: #0a0f1c;
    --bg-alt: #0f172a;
    --bg-card: #1e293b;
    
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-dim: #94a3b8;
    
    --border-base: #334155;
    --border-soft: #1e293b;
    --cursor-color: rgba(255, 255, 255, 0.3);
    
    --hero-circle-stroke: #1e293b;
}

    /* Design Tokens */
    --radius-2xl: 24px;
    --radius-xl: 18px;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.1);
    --shadow-premium: 0 20px 25px -5px rgba(37, 99, 235, 0.1), 0 8px 10px -6px rgba(37, 99, 235, 0.05);

    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
    text-align: right;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Magic Cursor */
#magic-cursor {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
}
#cursor {
    width: 20px; height: 20px;
    background: var(--cursor-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(2px);
}
#cursor.hovered {
    width: 50px; height: 50px;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid var(--primary);
}

h1, h2, h3, h4, h5, h6 { font-family: 'Vazirmatn', sans-serif; font-weight: 900; line-height: 1.2; }

/* Background Decorations */
.bg-blob {
    position: fixed; top: -10%; left: -10%; width: 40%; height: 40%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    filter: blur(80px); z-index: -1; animation: float 20s infinite alternate;
}
.bg-blob-2 {
    position: fixed; bottom: -10%; right: -10%; width: 50%; height: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
    filter: blur(80px); z-index: -1; animation: float 25s infinite alternate-reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Navbar */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.5rem 8%; background: rgba(var(--bg-main-rgb, 255, 255, 255), 0.8);
    backdrop-filter: blur(20px); position: fixed; width: 100%; top: 0; z-index: 1000;
    border-bottom: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    transition: background-color 0.4s ease;
}
.dark-mode .navbar {
    background: rgba(10, 15, 28, 0.8);
}

.logo { 
    text-decoration: none; display: flex; flex-direction: column; gap: 2px;
}
.logo span { font-size: 1.5rem; font-weight: 900; color: var(--text-main); letter-spacing: -0.5px; }
.logo-tagline { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-link { 
    text-decoration: none; color: var(--text-muted); font-weight: 600; 
    transition: var(--transition-base); font-size: 0.95rem;
}
.nav-link:hover, .nav-link.active { color: var(--primary); }

/* Buttons */
.primary-btn {
    background: var(--primary); color: #fff; border: none;
    padding: 1rem 2rem; border-radius: var(--radius-lg);
    font-weight: 700; text-decoration: none; display: inline-flex; align-items: center;
    transition: var(--transition-base); cursor: pointer; box-shadow: var(--shadow- premium);
}
.primary-btn:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.outline-btn {
    background: transparent; color: var(--text-main); border: 2px solid var(--border-base);
    padding: 0.9rem 2rem; border-radius: var(--radius-lg);
    font-weight: 700; text-decoration: none; display: inline-flex; align-items: center;
    transition: var(--transition-base); cursor: pointer;
}
.outline-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* Hero Section (Redesigned with SVG Background & Slideshow) */
.hero {
    position: relative;
    padding: 0; /* Removed padding because slideshow covers full screen */
    display: flex; 
    align-items: center; 
    justify-content: center;
    text-align: center;
    height: 100vh;
    overflow: hidden;
}

.slideshow-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
    transform: scale(1.05);
    transition: transform 6s ease-in-out;
}
.slide.active .slide-bg {
    transform: scale(1);
}

.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8));
    z-index: -1;
}

/* Slideshow Controls */
.slide-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 5%;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none; /* Let clicks pass through empty areas */
}

.slide-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    pointer-events: auto;
}
.slide-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.slide-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-base);
}
.dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.hero-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}
.hero-bg svg {
    position: absolute;
    width: 100%;
    height: auto;
    max-width: 1200px;
    opacity: 0.2; /* reduced opacity since there's an image behind it */
}
.hero-bg svg circle {
    stroke: rgba(255,255,255,0.3);
}

.hero-content { 
    max-width: 800px;
    z-index: 2;
    padding: 0 20px;
}

.section-tag {
    display: inline-block; padding: 0.5rem 1.2rem; background: rgba(37, 99, 235, 0.2);
    backdrop-filter: blur(5px);
    color: #60a5fa; font-weight: 800; font-size: 0.85rem; border-radius: var(--radius-full);
    margin-bottom: 1.5rem; letter-spacing: 1px;
}

.hero h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 1.5rem; color: #fff; }
.hero h1 span { color: #60a5fa; position: relative; }
.hero p { font-size: 1.2rem; color: #e2e8f0; margin-bottom: 3rem; }

.btn-group { display: flex; gap: 1.5rem; justify-content: center; }
.hero .outline-btn { color: #fff; border-color: rgba(255,255,255,0.5); }
.hero .outline-btn:hover { background: #fff; color: var(--text-main); }

/* Stats Section */
.stats-section { padding: 5rem 8%; background: var(--bg-main); position: relative; z-index: 10; margin-top: -50px; }
.stats-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 2rem; background: var(--bg-card); padding: 3rem; border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl); border: 1px solid var(--border-soft);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}
.stat-item h3 { font-family: 'Outfit', sans-serif; font-size: 3.5rem; color: var(--text-main); margin-bottom: 0.5rem; }
.stat-item p { color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* Section Header */
.section-padding { padding: 120px 8%; }
.section-header { text-align: center; margin-bottom: 5rem; }
.section-title { font-size: 3rem; }
.section-title span { color: var(--primary); }

/* Service Cards */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; }
.service-card {
    background: var(--bg-card); padding: 3.5rem 3rem; border-radius: var(--radius-2xl);
    border: 1px solid var(--border-base); transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-xl); border-color: var(--primary-soft); }
.service-icon { 
    font-size: 2.5rem; color: var(--primary); margin-bottom: 2rem;
    width: 70px; height: 70px; background: var(--primary-soft);
    display: flex; align-items: center; justify-content: center; border-radius: var(--radius-xl);
}
.service-card h3 { margin-bottom: 1.2rem; font-size: 1.5rem; }
.service-card p { color: var(--text-muted); }

/* Projects Grid (Stacked Cards Style) */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 3rem; }
.project-card {
    background: var(--bg-card); border-radius: var(--radius-2xl); overflow: hidden;
    border: 1px solid var(--border-base); transition: var(--transition-base);
    box-shadow: var(--shadow-sm); position: relative;
}
.project-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.project-image { height: 320px; overflow: hidden; position: relative; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.project-card:hover .project-image img { transform: scale(1.1); }

/* Card Overlay (Blue.me style) */
.card-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    opacity: 0; transition: opacity 0.4s ease;
    display: flex; flex-direction: column; justify-content: flex-end; padding: 2.5rem;
}
.project-card:hover .card-overlay { opacity: 1; }
.card-overlay h3 { color: #fff; margin-bottom: 0.5rem; transform: translateY(20px); transition: 0.4s ease; }
.project-card:hover .card-overlay h3 { transform: translateY(0); }
.project-category { 
    display: inline-block; background: var(--primary); color: #fff; 
    padding: 0.3rem 1rem; border-radius: var(--radius-full); font-size: 0.75rem; 
    font-weight: 700; transform: translateY(20px); transition: 0.4s ease 0.1s; 
    opacity: 0; margin-bottom: 1rem; align-self: flex-start;
}
.project-card:hover .project-category { transform: translateY(0); opacity: 1; }
.card-overlay .project-link { 
    color: #fff; text-decoration: none; font-weight: 600; font-size: 0.9rem;
    transform: translateY(20px); transition: 0.4s ease 0.2s; opacity: 0;
    display: flex; align-items: center; gap: 0.5rem;
}
.project-card:hover .card-overlay .project-link { transform: translateY(0); opacity: 1; }
.card-overlay .project-link:hover { color: var(--accent); }

/* Footer */
.footer { background: #0f172a; color: #fff; padding: 100px 8% 50px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 5rem; margin-bottom: 5rem; }
.footer h4 { color: #fff; margin-bottom: 2.5rem; font-size: 1.2rem; }
.footer-links li { margin-bottom: 1.2rem; }
.footer-links a { color: #94a3b8; text-decoration: none; transition: var(--transition-base); }
.footer-links a:hover { color: #fff; padding-right: 5px; }

.social-links { display: flex; gap: 1rem; margin-top: 2rem; }
.social-btn {
    width: 45px; height: 45px; border-radius: var(--radius-md); background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none;
    transition: var(--transition-base);
}
.social-btn:hover { background: var(--primary); transform: translateY(-5px); }

/* Admin Base Styling */
.dash-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-base);
}

@media (max-width: 1024px) {
    .hero { flex-direction: column; text-align: center; padding-top: 140px; }
    .hero-visual { display: none; }
    .nav-links { display: none; }
    .footer-content { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
    .social-links { justify-content: center; }
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.testimonial-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-base);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-soft);
}

.quote-icon {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 3rem;
    color: var(--primary-soft);
    opacity: 0.5;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.client-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-soft);
}

.client-name {
    font-weight: 800;
    font-size: 1.1rem;
    display: block;
}

.client-role {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Marquee Carousel */
.marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 2rem 0;
    margin-top: 2rem;
    direction: ltr; /* Ensure scrolling direction is consistent */
}
.marquee-content {
    display: inline-flex;
    animation: marqueeScroll 25s linear infinite;
}
.marquee-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    padding: 1.5rem 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-base);
    margin: 0 1rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}
.marquee-item:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-5px);
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Scroll Reveal Animation */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-text.visible {
    opacity: 1;
    transform: translateY(0);
}