/* ========================================
   پادکار - استایل‌های اصلی
   Padkar Enterprise Platform Styles
   ======================================== */

/* Font Faces */
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazir.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazir-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Base Styles */
* { 
    font-family: 'Vazirmatn', system-ui, sans-serif !important; 
}

html { 
    scroll-behavior: smooth; 
}

body {
    background: linear-gradient(180deg, #0a0f1a 0%, #050810 100%);
    color: #e2e8f0;
    overflow-x: hidden;
}

/* Animated Background */
.hero-bg {
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(16, 185, 129, 0.08), transparent),
        radial-gradient(ellipse 50% 30% at 20% 80%, rgba(245, 158, 11, 0.05), transparent);
}

/* Glass Morphism */
.glass {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-light {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #34d399 50%, #fbbf24 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-x 4s ease infinite;
}

/* Cards */
.feature-card {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.15);
}

/* Monitor 3D Effect */
.monitor-container {
    perspective: 2000px;
}

.monitor-3d {
    transform: rotateX(8deg) rotateY(-3deg);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.monitor-3d:hover {
    transform: rotateX(0) rotateY(0) scale(1.02);
}

/* ISO Badge */
.iso-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Module Cards */
.module-card {
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
}

/* Stats Counter Animation */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Scrollbar */
::-webkit-scrollbar { 
    width: 8px; 
}

::-webkit-scrollbar-track { 
    background: #0a0f1a; 
}

::-webkit-scrollbar-thumb { 
    background: #1e293b; 
    border-radius: 4px; 
}

::-webkit-scrollbar-thumb:hover { 
    background: #334155; 
}

/* Navigation Active State */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Floating Elements */
.float-element {
    animation: float 6s ease-in-out infinite;
}

.float-element:nth-child(2) { 
    animation-delay: -2s; 
}

.float-element:nth-child(3) { 
    animation-delay: -4s; 
}

/* Glow Effects */
.glow-blue { 
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.3); 
}

.glow-emerald { 
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.3); 
}

.glow-gold { 
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.3); 
}

/* Timeline */
.timeline-item::before {
    content: '';
    position: absolute;
    right: -30px;
    top: 0;
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 50%;
    border: 3px solid #0a0f1a;
}

/* Fallback icons */
.icon-fallback { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
}

/* ========================================
   Animations / Keyframes
   ======================================== */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.6); }
}

@keyframes gradient-x {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}


/* ========================================
   Scroll Snap - Full Page Sections
   ======================================== */

/* Enable scroll snap on html for full-page experience */
@media (min-width: 768px) {
    html {
        scroll-snap-type: y proximity;
    }
}

html {
    scroll-behavior: smooth;
}

/* Snap sections - each section snaps to viewport */
.snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

/* Full viewport sections for key content */
.snap-section-full {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
}

/* Auto height sections that still snap */
.snap-section-auto {
    min-height: auto;
    scroll-snap-align: start;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Large content sections - proximity snap, not mandatory */
.snap-section-large {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

/* Section dividers - visual separation */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    margin: 0;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    html {
        scroll-snap-type: y proximity; /* Softer snap on mobile */
    }
    
    .snap-section-full {
        min-height: 100svh; /* Small viewport height */
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Disable snap for very long sections on mobile */
    .snap-section-large {
        scroll-snap-align: none;
    }
}

/* Smooth section transitions */
section {
    position: relative;
}

/* Section indicator dots (optional - can be activated via JS) */
.section-indicators {
    position: fixed;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.section-dot:hover,
.section-dot.active {
    background: #3b82f6;
    border-color: #3b82f6;
    transform: scale(1.3);
}

/* Hide indicators on mobile */
@media (max-width: 768px) {
    .section-indicators {
        display: none;
    }
}

/* Progress bar at top */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    z-index: 100;
    transform-origin: left;
    transition: transform 0.1s ease-out;
}


/* ========================================
   Light Theme Styles
   ======================================== */

body.light-theme {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1e293b;
}

body.light-theme .hero-bg {
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(16, 185, 129, 0.05), transparent),
        radial-gradient(ellipse 50% 30% at 20% 80%, rgba(245, 158, 11, 0.03), transparent);
}

body.light-theme .glass {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .glass-light {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-theme .feature-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.8));
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .feature-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.1);
}

/* Text Colors */
body.light-theme .text-white { color: #1e293b !important; }
body.light-theme .text-slate-300 { color: #475569 !important; }
body.light-theme .text-slate-400 { color: #64748b !important; }
body.light-theme .text-slate-500 { color: #94a3b8 !important; }

/* Navbar */
body.light-theme #navbar .glass {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Cards & Boxes */
body.light-theme .bg-slate-800,
body.light-theme .bg-slate-800\/50 {
    background: rgba(241, 245, 249, 0.8) !important;
}

body.light-theme .border-slate-800 {
    border-color: #e2e8f0 !important;
}

/* Footer */
body.light-theme footer {
    border-color: #e2e8f0;
}

/* Scrollbar */
body.light-theme::-webkit-scrollbar-track { 
    background: #f1f5f9; 
}

body.light-theme::-webkit-scrollbar-thumb { 
    background: #cbd5e1; 
}

body.light-theme::-webkit-scrollbar-thumb:hover { 
    background: #94a3b8; 
}

/* Float elements */
body.light-theme .float-element {
    opacity: 0.3;
}

/* Section indicators */
body.light-theme .section-dot {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Theme toggle button */
body.light-theme #theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}


/* ========================================
   Light Theme - Additional Fixes
   ======================================== */

/* Contact Tooltip */
body.light-theme #contact-tooltip .bg-slate-800\/95,
body.light-theme #contact-tooltip > div {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

body.light-theme #contact-tooltip p {
    color: #1e293b !important;
}

body.light-theme #contact-tooltip .bg-slate-800 {
    background: #fff !important;
}

/* SWOT Analysis Cards */
body.light-theme .bg-emerald-900,
body.light-theme [class*="bg-emerald-9"] {
    background: rgba(16, 185, 129, 0.15) !important;
}

body.light-theme .bg-red-900,
body.light-theme [class*="bg-red-9"] {
    background: rgba(239, 68, 68, 0.15) !important;
}

body.light-theme .bg-blue-900,
body.light-theme [class*="bg-blue-9"] {
    background: rgba(59, 130, 246, 0.15) !important;
}

body.light-theme .bg-amber-900,
body.light-theme [class*="bg-amber-9"] {
    background: rgba(245, 158, 11, 0.15) !important;
}

/* SWOT text colors in light theme */
body.light-theme .text-emerald-300 { color: #059669 !important; }
body.light-theme .text-red-300 { color: #dc2626 !important; }
body.light-theme .text-blue-300 { color: #2563eb !important; }
body.light-theme .text-amber-300 { color: #d97706 !important; }

/* Dark backgrounds that need to be light */
body.light-theme .bg-slate-900,
body.light-theme [class*="bg-slate-9"] {
    background: #f1f5f9 !important;
}

body.light-theme .bg-slate-700 {
    background: #e2e8f0 !important;
}

/* Border colors */
body.light-theme .border-emerald-500\/30 { border-color: rgba(16, 185, 129, 0.4) !important; }
body.light-theme .border-blue-500\/30 { border-color: rgba(59, 130, 246, 0.4) !important; }
body.light-theme .border-amber-500\/30 { border-color: rgba(245, 158, 11, 0.4) !important; }
body.light-theme .border-red-500\/30 { border-color: rgba(239, 68, 68, 0.4) !important; }

/* Module cards backgrounds */
body.light-theme .module-card,
body.light-theme [class*="rounded-2xl"][class*="border-2"] {
    background: rgba(255, 255, 255, 0.9) !important;
}

/* Stats section glass */
body.light-theme .glass.rounded-3xl {
    background: rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Gradient backgrounds for icons */
body.light-theme .bg-gradient-to-br {
    opacity: 0.9;
}

/* Logo text */
body.light-theme .text-2xl.font-black.text-white {
    color: #1e293b !important;
}

/* Contact options in floating widget */
body.light-theme #contact-options a {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Progress bar background */
body.light-theme .bg-slate-700.rounded-full {
    background: #e2e8f0 !important;
}

/* FAQ and other dark sections */
body.light-theme .bg-gradient-to-r.from-slate-900 {
    background: linear-gradient(to right, #f8fafc, #f1f5f9) !important;
}


/* ========================================
   Light Theme - Complete Fixes
   ======================================== */

/* Gradient Text - باید در تم سفید تیره‌تر باشه */
body.light-theme .gradient-text {
    background: linear-gradient(135deg, #2563eb 0%, #059669 50%, #d97706 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Section backgrounds that are too dark */
body.light-theme section[class*="relative"] {
    background: transparent;
}

body.light-theme .bg-gradient-to-r.from-slate-900\/50,
body.light-theme .bg-gradient-to-b.from-slate-900 {
    background: linear-gradient(to bottom, rgba(241, 245, 249, 0.5), transparent) !important;
}

/* Why Us section - بکگراند تیره */
body.light-theme #why-us,
body.light-theme [id="why-us"] {
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%) !important;
}

/* Text that's too light - توضیحات زیر عناوین */
body.light-theme p.text-slate-400,
body.light-theme span.text-slate-400,
body.light-theme div.text-slate-400,
body.light-theme li.text-slate-400 {
    color: #475569 !important;
}

body.light-theme .text-slate-500 {
    color: #64748b !important;
}

/* Comparison table footer - خاکستری تیره */
body.light-theme .bg-slate-800\/50,
body.light-theme [class*="bg-slate-800"] {
    background: rgba(226, 232, 240, 0.8) !important;
}

body.light-theme .bg-slate-900\/50 {
    background: rgba(241, 245, 249, 0.9) !important;
}

/* Table rows */
body.light-theme tr.border-slate-800 {
    border-color: #e2e8f0 !important;
}

body.light-theme td, 
body.light-theme th {
    border-color: #e2e8f0 !important;
}

/* Icon boxes with colored backgrounds - باید روشن‌تر باشن */
body.light-theme .bg-blue-500\/20 { background: rgba(59, 130, 246, 0.12) !important; }
body.light-theme .bg-emerald-500\/20 { background: rgba(16, 185, 129, 0.12) !important; }
body.light-theme .bg-amber-500\/20 { background: rgba(245, 158, 11, 0.12) !important; }
body.light-theme .bg-purple-500\/20 { background: rgba(168, 85, 247, 0.12) !important; }
body.light-theme .bg-rose-500\/20 { background: rgba(244, 63, 94, 0.12) !important; }
body.light-theme .bg-red-500\/20 { background: rgba(239, 68, 68, 0.12) !important; }

/* Feature list items text */
body.light-theme .space-y-4 .text-white,
body.light-theme .space-y-3 .text-white {
    color: #1e293b !important;
}

body.light-theme .space-y-4 .text-slate-400,
body.light-theme .space-y-3 .text-slate-400 {
    color: #64748b !important;
}

/* Cards with dark backgrounds */
body.light-theme .feature-card .text-white {
    color: #1e293b !important;
}

body.light-theme .feature-card .text-slate-400,
body.light-theme .feature-card .text-slate-300 {
    color: #64748b !important;
}

/* Headings */
body.light-theme h1.text-white,
body.light-theme h2.text-white,
body.light-theme h3.text-white,
body.light-theme h4.text-white {
    color: #0f172a !important;
}

/* Strong tags */
body.light-theme strong.text-white {
    color: #1e293b !important;
}

/* Badge backgrounds */
body.light-theme .bg-slate-800.text-slate-300 {
    background: #e2e8f0 !important;
    color: #475569 !important;
}

/* Timeline and comparison sections */
body.light-theme #comparison .glass,
body.light-theme #timeline .glass {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* FAQ section */
body.light-theme #faq .glass {
    background: rgba(255, 255, 255, 0.85) !important;
}

/* CTA section */
body.light-theme #cta .glass {
    background: rgba(255, 255, 255, 0.9) !important;
}

/* Contact section */
body.light-theme #contact .glass {
    background: rgba(255, 255, 255, 0.9) !important;
}

/* Input fields */
body.light-theme input,
body.light-theme textarea,
body.light-theme select {
    background: #fff !important;
    border-color: #e2e8f0 !important;
    color: #1e293b !important;
}

body.light-theme input::placeholder,
body.light-theme textarea::placeholder {
    color: #94a3b8 !important;
}

/* Colored text that needs to stay visible */
body.light-theme .text-blue-400 { color: #2563eb !important; }
body.light-theme .text-emerald-400 { color: #059669 !important; }
body.light-theme .text-amber-400 { color: #d97706 !important; }
body.light-theme .text-purple-400 { color: #7c3aed !important; }
body.light-theme .text-rose-400 { color: #e11d48 !important; }

/* Section indicator dots */
body.light-theme .section-dot {
    background: rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.25);
}

body.light-theme .section-dot.active,
body.light-theme .section-dot:hover {
    background: #3b82f6;
    border-color: #3b82f6;
}

/* Scroll progress bar */
body.light-theme .scroll-progress {
    background: linear-gradient(90deg, #2563eb, #059669);
}

/* Footer */
body.light-theme footer {
    background: #f8fafc;
    border-color: #e2e8f0 !important;
}

body.light-theme footer .text-white {
    color: #1e293b !important;
}

body.light-theme footer .text-slate-500 {
    color: #64748b !important;
}


/* ========================================
   Floating Contact Widget - Professional
   ======================================== */

/* Main FAB Button */
.contact-fab {
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4);
}

.contact-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.5);
}

/* Contact Panel */
.contact-panel {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

/* Contact Options */
.contact-option {
    transition: all 0.2s ease;
}

.contact-option:active {
    transform: scale(0.98);
}

/* Light Theme - Contact Widget */
body.light-theme .contact-panel {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .contact-option .text-slate-800 {
    color: #1e293b !important;
}

body.light-theme .contact-option .text-slate-500 {
    color: #64748b !important;
}

body.light-theme .contact-option:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}

/* Dark Theme - Contact Widget */
body:not(.light-theme) .contact-panel {
    background: rgba(15, 23, 42, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body:not(.light-theme) .contact-option .text-slate-800 {
    color: #fff !important;
}

body:not(.light-theme) .contact-option .text-slate-500 {
    color: #94a3b8 !important;
}

body:not(.light-theme) .contact-option:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Animation for panel open */
#contact-options.open {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
}


/* Contact Tooltip */
.contact-tooltip-box {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

body.light-theme .contact-tooltip-box {
    background: #fff !important;
    color: #1e293b !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .contact-tooltip-box p {
    color: #1e293b !important;
}

body.light-theme .contact-tooltip-box > div:last-child {
    background: #fff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Badge fix */
#contact-badge {
    line-height: 1;
    font-family: 'Vazirmatn', system-ui, sans-serif !important;
}


/* ========================================
   Light Theme - IMS/ISO Section Fix
   ======================================== */

/* IMS Section background */
body.light-theme #ims {
    background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 50%, #f0fdf4 100%);
}

body.light-theme #ims .bg-gradient-to-r.from-emerald-950\/30 {
    background: transparent !important;
}

/* ISO Section headings */
body.light-theme #ims h2.text-white {
    color: #064e3b !important;
}

/* ISO gradient text */
body.light-theme #ims .text-transparent.bg-clip-text {
    background: linear-gradient(to right, #059669, #0d9488) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

/* ISO Section paragraph */
body.light-theme #ims p.text-slate-400 {
    color: #475569 !important;
    line-height: 2 !important;
}

body.light-theme #ims strong.text-white {
    color: #064e3b !important;
}

/* ISO cards */
body.light-theme #ims .glass {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

body.light-theme #ims .glass:hover {
    background: rgba(236, 253, 245, 0.9) !important;
}

body.light-theme #ims h4.text-white {
    color: #1e293b !important;
}

body.light-theme #ims .text-slate-500 {
    color: #64748b !important;
}

/* Badge in IMS */
body.light-theme #ims .bg-emerald-500\/10 {
    background: rgba(16, 185, 129, 0.15) !important;
}

body.light-theme #ims .text-emerald-400 {
    color: #059669 !important;
}
