/* 
 * Solar SCADA Website Styles
 * Theme: Modern Dark Industrial
 * Colors: Deep Blue/Black, Solar Orange, Cyber Cyan
 */

:root {
    --bg-dark: #070d19; /* Obsidian Dark Space */
    --bg-darker: #03050c; /* Deep Space Obsidian */
    --primary: hsl(38, 95%, 55%); /* Solar Glow Neon Orange */
    --primary-glow: hsla(38, 95%, 55%, 0.15);
    --secondary: hsl(187, 95%, 45%); /* Cyber Telemetry Cyan */
    --secondary-glow: hsla(187, 95%, 45%, 0.15);
    --accent-ai: hsl(263, 90%, 65%); /* Quantum Violet for AI */
    --accent-ai-glow: hsla(263, 90%, 65%, 0.15);
    --text-main: #f8fafc;
    --text-muted: #889bb0; /* Sleek steel slate */
    --glass-bg: rgba(7, 13, 25, 0.65); /* Dark obsidian glass */
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(6, 182, 212, 0.25);
    --font-main: 'Vazirmatn', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --grid-dot: rgba(6, 182, 212, 0.12); /* Blueprint grid dots */
    --grid-line: rgba(255, 255, 255, 0.015);
}

[dir="ltr"] {
    --font-main: 'Outfit', 'Inter', sans-serif;
}

/* Custom Engineering Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.skip-link {
    position: absolute;
    top: -50px;
    right: 20px;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    z-index: 10000;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.feature-guides-seo {
    display: none;
}

.feature-guides-seo .seo-guide-item {
    margin-bottom: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.feature-guides-seo .seo-guide-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
}

.feature-guides-seo .seo-guide-body {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.95rem;
    color: var(--text-muted);
}

.feature-guides-seo .seo-guide-body h4 {
    font-size: 1rem;
    margin: 12px 0 6px;
    color: var(--text-main);
}

.feature-guides-seo .seo-guide-body ul {
    margin: 8px 0;
    padding-left: 20px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-darker);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
    z-index: -2;
    pointer-events: none;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: 
        radial-gradient(var(--grid-dot) 1px, transparent 1px),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 30px 30px, 150px 150px, 150px 150px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
    mask-image: radial-gradient(circle at center, black 50%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 50%, transparent 100%);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

.gradient-text {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary), #d97706);
    color: white;
    padding: 12px 30px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4), 0 8px 25px rgba(245, 158, 11, 0.4);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
    transform: translateY(-2px);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

/* Engineering corner alignment brackets */
.glass-card::before, .glass-card::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    opacity: 0.25;
    transition: var(--transition);
    pointer-events: none;
}
.glass-card::before {
    top: 0;
    left: 0;
    border-top: 2px solid var(--secondary);
    border-left: 2px solid var(--secondary);
}
.glass-card::after {
    bottom: 0;
    right: 0;
    border-bottom: 2px solid var(--secondary);
    border-right: 2px solid var(--secondary);
}
.glass-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 32px 0 rgba(6, 182, 212, 0.12);
}
.glass-card:hover::before {
    opacity: 0.95;
    width: 14px;
    height: 14px;
    border-color: var(--secondary);
}
.glass-card:hover::after {
    opacity: 0.95;
    width: 14px;
    height: 14px;
    border-color: var(--primary);
}

/* Navbar - Redesigned */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    overflow: visible;
}

.navbar {
    padding: 16px 24px;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    min-width: 0;
    flex-shrink: 1;
}

.nav-logo-img {
    height: 48px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.nav-logo-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(6, 182, 212, 0.15));
    border-radius: 12px;
    color: var(--primary);
    font-size: 1.2rem;
}

.nav-logo-accent {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 4px;
    list-style: none;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-menu li {
    flex-shrink: 0;
}

.nav-menu a {
    padding: 10px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 10px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-menu a:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

.nav-menu a.active {
    color: var(--primary);
    background: rgba(245, 158, 11, 0.12);
}

.nav-menu a {
    position: relative;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex-shrink: 0;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
}

.nav-cta {
    padding: 10px 22px !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
    white-space: nowrap;
}

.nav-mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.nav-mobile-toggle:hover {
    background: rgba(245, 158, 11, 0.15);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(6, 182, 212, 0.08);
    color: var(--secondary);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
    border: 1px solid rgba(6, 182, 212, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--secondary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--secondary);
    animation: status-pulse 2s infinite ease-in-out;
}

@keyframes status-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 6px var(--secondary);
    }
    50% {
        transform: scale(1.4);
        opacity: 0.4;
        box-shadow: 0 0 12px var(--secondary);
    }
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 900;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}

.stats-row {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--glass-border);
    padding-top: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-visual {
    position: relative;
}

.img-container {
    position: relative;
    padding: 10px;
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease-out;
}

.img-container:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

/* Hero Screenshot Carousel Styles */
.hero-carousel-container {
    position: relative;
    padding: 10px;
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease-out;
}

.hero-carousel-container:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.carousel-slides {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16/10;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background: rgba(3, 5, 12, 0.4);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.97);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 2;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Telemetry Laser Scan Line */
.carousel-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
    box-shadow: 0 0 10px var(--accent);
    opacity: 0.4;
    z-index: 5;
    pointer-events: none;
    animation: carousel-scan 5s linear infinite;
}

@keyframes carousel-scan {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

/* Glassmorphic Captions */
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    background: rgba(7, 13, 25, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

[dir="ltr"] .carousel-caption {
    text-align: left;
}

.carousel-caption h4 {
    margin: 0;
    font-size: 1.05rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.carousel-caption p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Navigation Pager Chevrons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(3, 5, 12, 0.6);
    border: 1px solid var(--glass-border);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #03050c;
    box-shadow: 0 0 12px var(--primary);
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn.prev {
    left: 15px;
}

.carousel-btn.next {
    right: 15px;
}

/* Carousel dots indicators */
.carousel-indicators {
    position: absolute;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-dot.active {
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
    width: 20px;
    border-radius: 4px;
}

.img-container img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.floating-card {
    position: absolute;
    background: rgba(15, 23, 42, 0.9);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    animation: float 3s ease-in-out infinite;
    z-index: 10; /* Ensure active overlay on top of carousel slides */
}

.floating-card i {
    font-size: 1.5rem;
    color: var(--primary);
}

.floating-card.c1 {
    top: -20px;
    right: -20px;
}

.floating-card.c2 {
    bottom: -20px;
    left: -20px;
    animation-delay: 1.5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Features Section */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.feature-card {
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.feature-card.glass-card {
    padding: 0;
}

.feature-card-img {
    height: 160px;
    min-height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(245, 158, 11, 0.1));
    border-radius: 20px 20px 0 0;
}

.feature-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.feature-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 110px;
}

.feature-card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature-card-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary);
}

.feature-card:hover .feature-card-img img {
    transform: scale(1.05);
    transition: transform 0.4s ease;
}

.feature-card {
    cursor: pointer;
}

.feature-expand-hint {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--secondary);
    opacity: 0.8;
}

.feature-expand-hint i {
    margin-left: 4px;
}

.feature-guide-panel {
    display: none;
    margin-top: 30px;
    padding: 35px 40px !important;
    position: relative;
}

.feature-guide-panel.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.feature-guide-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.feature-guide-close:hover {
    background: rgba(245, 158, 11, 0.2);
    color: var(--primary);
}

.feature-guide-content {
    padding-top: 20px;
}

.feature-guide-content h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.feature-guide-content p {
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 15px;
}

.feature-guide-content ul {
    list-style: none;
    margin: 15px 0;
}

.feature-guide-content ul li {
    padding: 8px 0;
    padding-right: 25px;
    position: relative;
    color: var(--text-muted);
}

.feature-guide-content ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    color: var(--secondary);
}

/* Feature card image fallback */
.feature-card-img.use-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
}
.feature-card-img .icon-fallback {
    display: none;
    font-size: 4rem;
    color: var(--secondary);
}
.feature-card-img.use-fallback .icon-fallback {
    display: flex !important;
}

/* Solar Program Info */
.solar-info {
    background: linear-gradient(180deg, transparent 0%, rgba(6, 182, 212, 0.03) 50%, transparent 100%);
}
.solar-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}
.solar-info-card {
    transition: var(--transition);
}
.solar-info-card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary);
}
.solar-info-card i {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 15px;
}
.solar-info-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}
.solar-info-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Use Cases - override use-case-card for grid */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}
.use-case-list {
    list-style: none;
    margin-top: 15px;
}
.use-case-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.use-case-list i {
    color: var(--secondary);
}

/* About section */
.about {
    background: linear-gradient(180deg, transparent 0%, rgba(245, 158, 11, 0.03) 50%, transparent 100%);
}
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.about-card {
    transition: var(--transition);
}
.about-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
}
.about-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}
.about-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}
.about-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.ai-features {
    list-style: none;
}
.ai-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.ai-features i {
    font-size: 1rem;
    color: var(--secondary);
    margin-top: 3px;
}

/* Why Harmony */
.why-harmony {
    background: linear-gradient(180deg, transparent 0%, rgba(6, 182, 212, 0.03) 50%, transparent 100%);
}
.why-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.why-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px 30px;
    min-width: 160px;
    transition: var(--transition);
}
.why-card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary);
}
.why-card i {
    font-size: 2rem;
    color: var(--secondary);
}
.why-card span {
    font-size: 0.95rem;
    font-weight: 600;
}

/* FAQ Accordion */
.faq-list {
    max-width: 700px;
    margin: 0 auto;
}
.faq-item {
    margin-bottom: 15px;
    padding: 0 !important;
    overflow: hidden;
}
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: none;
    border: none;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1.05rem;
    font-weight: 600;
    text-align: right;
    cursor: pointer;
    transition: var(--transition);
}
.faq-question:hover {
    color: var(--primary);
}
.faq-question i {
    margin-left: 15px;
    color: var(--secondary);
    transition: transform 0.3s ease;
}
.faq-item.active .faq-question i {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-item.active .faq-answer {
    max-height: 200px;
}
.faq-answer p {
    padding: 0 25px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* For Solar Farm Owner Section */
.for-owner {
    background: linear-gradient(180deg, transparent 0%, rgba(6, 182, 212, 0.03) 50%, transparent 100%);
}

.owner-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.owner-card {
    transition: var(--transition);
}

.owner-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
}

.owner-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.owner-card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.owner-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Use Cases Section */
.use-cases {
    background: linear-gradient(180deg, transparent 0%, rgba(245, 158, 11, 0.03) 50%, transparent 100%);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.use-case-card {
    transition: var(--transition);
}

.use-case-card:hover {
    transform: translateY(-8px);
    border-color: var(--secondary);
}

.use-case-card i {
    font-size: 2.2rem;
    color: var(--secondary);
    margin-bottom: 18px;
}

.use-case-card h3 {
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.use-case-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Gallery Section */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.check-list {
    list-style: none;
    margin: 30px 0;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.check-list i {
    color: var(--secondary);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    height: 500px;
}

.image-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: var(--transition);
}

.g-img-1 {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.g-img-2 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.mt-4 {
    margin-top: 2rem;
}

/* Showcase Cards (Gallery redesign) */
.showcase-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}
.showcase-card {
    text-align: center;
    transition: var(--transition);
}
.showcase-card:hover {
    transform: translateY(-8px);
    border-color: var(--secondary);
}
.showcase-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(245, 158, 11, 0.15));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.showcase-icon i {
    font-size: 2rem;
    color: var(--primary);
}
.showcase-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.showcase-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.gallery-cta {
    text-align: center;
}

/* Language Switcher */
.lang-dropdown {
    position: relative;
}
.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 0.95rem;
    cursor: pointer;
}
.lang-btn:hover {
    border-color: var(--secondary);
}
.lang-btn i {
    font-size: 0.75rem;
    transition: transform 0.2s;
}
.lang-dropdown.open .lang-btn i {
    transform: rotate(180deg);
}
.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    min-width: 160px;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
[dir="ltr"] .lang-menu { right: auto; left: 0; }
.lang-dropdown.open .lang-menu {
    display: block;
}
.lang-menu button {
    display: block;
    width: 100%;
    padding: 10px 14px;
    text-align: right;
    background: none;
    border: none;
    color: var(--text-main);
    font-family: var(--font-main);
    cursor: pointer;
    border-radius: 8px;
}
[dir="ltr"] .lang-menu button { text-align: left; }
.lang-menu button:hover {
    background: rgba(6, 182, 212, 0.15);
}

/* Contact / Demo Request Form */
.contact-form-section {
    background: linear-gradient(180deg, transparent 0%, rgba(6, 182, 212, 0.04) 50%, transparent 100%);
}
.demo-request-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px !important;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 25px;
}
.form-group-full {
    grid-column: 1 / -1;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 18px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
}
.form-group textarea {
    resize: vertical;
    min-height: 100px;
}
.form-submit {
    margin-top: 10px;
}
.form-submit button {
    cursor: pointer;
}
@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Tech Section - removed, keep for any leftover refs */
.tech-logos {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition);
}

.tech-item i {
    font-size: 3rem;
    color: var(--glass-border);
    transition: var(--transition);
}

.tech-item:hover i {
    color: var(--primary);
    transform: scale(1.1);
}

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    background: var(--bg-dark);
    margin-top: 100px;
}

.footer-content {
    padding: 32px 20px 36px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.footer-col-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-logo {
    height: 140px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    display: block;
}

.footer h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.footer p {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding: 16px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Nav lang dropdown inside nav-actions */
.nav-actions .lang-dropdown .lang-btn {
    padding: 10px 16px;
    height: 44px;
    border-radius: 12px;
}

/* Responsive - نوار منو در عرض کم به همبرگر تبدیل می‌شود */
@media (max-width: 1150px) {
    .nav-menu {
        display: none;
    }

    .nav-mobile-toggle {
        display: flex;
        flex-shrink: 0;
    }

    /* دکمه تماس در هدر مخفی؛ دسترسی از منوی همبرگر */
    .nav-actions .nav-cta {
        display: none;
    }

    .nav-menu.active {
        display: flex !important;
        position: fixed;
        top: 72px;
        right: 12px;
        left: 12px;
        flex-direction: column;
        background: var(--glass-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 16px;
        border-radius: 16px;
        border: 1px solid var(--glass-border);
        box-shadow: 0 20px 50px rgba(0,0,0,0.35);
        gap: 4px;
        z-index: 99999;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.active a {
        padding: 14px 18px;
        border-radius: 10px;
        display: block;
    }

    .nav-menu-contact { display: list-item !important; }
}

.nav-menu-contact {
    display: none;
}

/* هدر موبایل: فشرده‌تر برای نمایش کامل */
@media (max-width: 700px) {
    .navbar {
        padding: 12px 16px;
    }

    .nav-actions {
        gap: 8px;
    }

    .nav-container {
        gap: 12px;
    }

    .nav-logo-img {
        height: 40px;
        max-width: 140px;
    }
}


@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 1;
    }

    .hero-visual {
        order: 2;
        margin-top: 30px;
    }

    .stats-row {
        justify-content: center;
    }

    .split-layout {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .why-grid {
        gap: 15px;
    }

    .why-card {
        min-width: 140px;
        padding: 20px;
    }

    .nav-links {
        gap: 15px;
    }
}

@media (max-width: 768px) {

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .hero-btns {
        flex-wrap: wrap;
        justify-content: center;
    }

    .faq-question {
        font-size: 0.95rem;
    }
}

/* ========== LIGHT THEME (Clean Solar Energy) - Matches main app templates/index.html ========== */
html:not(.dark) {
    --bg-dark: #f1f5f9;
    --bg-darker: #f8fafc;
    --primary: hsl(38, 90%, 45%);
    --secondary: hsl(172, 80%, 35%);
    --text-main: #0f172a;
    --text-muted: #475569;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-border-hover: rgba(13, 148, 136, 0.25);
    --grid-dot: rgba(13, 148, 136, 0.08);
    --grid-line: rgba(0, 0, 0, 0.015);
}

html:not(.dark) body {
    background-color: var(--bg-darker);
    background-image: none;
}

html:not(.dark) .bg-gradient {
    background: radial-gradient(circle at 20% 20%, rgba(13, 148, 136, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.12) 0%, transparent 50%);
}

html:not(.dark) .grid-overlay {
    background-image: 
        radial-gradient(var(--grid-dot) 1px, transparent 1px),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
}

html:not(.dark) .navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

html:not(.dark) .nav-logo { color: var(--text-main); }
html:not(.dark) .nav-logo-icon { color: var(--primary); }
html:not(.dark) .nav-menu a { color: var(--text-muted); }
html:not(.dark) .nav-menu a:hover {
    color: var(--text-main);
    background: rgba(0,0,0,0.04);
}
html:not(.dark) .nav-menu a.active {
    color: var(--primary);
    background: rgba(245, 158, 11, 0.15);
}
html:not(.dark) .nav-mobile-toggle {
    color: var(--text-main);
    background: rgba(255,255,255,0.6);
    border-color: rgba(0,0,0,0.1);
}

html:not(.dark) .nav-btn {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--primary);
}
html:not(.dark) .nav-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--primary);
}

html:not(.dark) .badge {
    background: rgba(13, 148, 136, 0.15);
    color: var(--secondary);
    border-color: rgba(13, 148, 136, 0.35);
}

html:not(.dark) .btn-secondary {
    color: var(--text-main);
    border-color: rgba(0, 0, 0, 0.15);
}
html:not(.dark) .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--secondary);
}

html:not(.dark) .glass-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

html:not(.dark) .floating-card {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.08);
}

html:not(.dark) .solar-info-card,
html:not(.dark) .feature-card,
html:not(.dark) .use-case-card,
html:not(.dark) .about-card,
html:not(.dark) .why-card,
html:not(.dark) .owner-card,
html:not(.dark) .showcase-card {
    border-color: rgba(0, 0, 0, 0.06);
}

html:not(.dark) .feature-card-img {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(245, 158, 11, 0.1));
}

html:not(.dark) .feature-guide-close {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
}
html:not(.dark) .feature-guide-close:hover {
    background: rgba(245, 158, 11, 0.2);
    color: var(--primary);
}

html:not(.dark) .lang-btn {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}
html:not(.dark) .lang-menu {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
html:not(.dark) .lang-menu button {
    color: var(--text-main);
}
html:not(.dark) .lang-menu button:hover {
    background: rgba(13, 148, 136, 0.1);
}

html:not(.dark) .demo-request-form.glass-card {
    background: rgba(255, 255, 255, 0.9);
}

html:not(.dark) .form-group input,
html:not(.dark) .form-group select,
html:not(.dark) .form-group textarea {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--text-main);
}

html:not(.dark) .footer {
    background: rgba(255, 255, 255, 0.6);
    border-top-color: rgba(0, 0, 0, 0.08);
}

html:not(.dark) .footer-bottom {
    border-top-color: rgba(0, 0, 0, 0.08);
}

html:not(.dark) .social-links a {
    background: rgba(13, 148, 136, 0.1);
    color: var(--secondary);
}
html:not(.dark) .social-links a:hover {
    background: var(--primary);
    color: white;
}

@media (max-width: 1150px) {
    html:not(.dark) .nav-menu.active {
        background: rgba(255, 255, 255, 0.98);
        border-color: rgba(0, 0, 0, 0.08);
        box-shadow: 0 20px 50px rgba(0,0,0,0.12);
    }
}

/* ========== پایگاه دانش / وبلاگ ========== */
.blog-hero {
    padding: 100px 0 50px;
    text-align: center;
}
.blog-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}
.blog-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}
.blog-main {
    padding-bottom: 80px;
}
.blog-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}
.blog-sidebar {
    position: sticky;
    top: 100px;
}
.sidebar-widget {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}
.sidebar-widget h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-widget h3 i {
    color: var(--secondary);
}
.category-list {
    list-style: none;
}
.category-list li { margin-bottom: 6px; }
.category-list a {
    display: block;
    padding: 10px 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}
.category-list a:hover,
.category-list a.active {
    background: rgba(6, 182, 212, 0.15);
    color: var(--secondary);
}
.category-list a i { margin-left: 8px; }
.recent-posts { list-style: none; }
.recent-posts li {
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}
.recent-posts li:last-child { border-bottom: none; }
.recent-posts a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
}
.recent-posts a:hover { color: var(--primary); }
.recent-posts .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-cloud a.tag,
.post-tags .tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(6, 182, 212, 0.15);
    color: var(--secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}
.tag-cloud a.tag:hover {
    background: var(--secondary);
    color: white;
}
.post-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.posts-header h2 { font-size: 1.5rem; }
.posts-count { color: var(--text-muted); font-size: 0.95rem; }
.posts-grid { display: block; }
.posts-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.post-card {
    overflow: hidden;
    transition: var(--transition);
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}
.post-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}
.post-card-img {
    height: 180px;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
}
.post-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-card-body { padding: 20px; }
.post-card-cat {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--secondary);
    margin-bottom: 10px;
}
.post-card-cat i { margin-left: 6px; }
.post-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    line-height: 1.4;
}
.post-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-meta {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.posts-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.posts-empty i { font-size: 3rem; opacity: 0.5; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
    text-decoration: none;
    margin-bottom: 24px;
    font-size: 0.95rem;
}
.back-link:hover { color: var(--primary); }
.single-post .post-header { margin-bottom: 24px; }
.single-post .post-category-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(6, 182, 212, 0.2);
    color: var(--secondary);
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.single-post .post-category-badge i { margin-left: 6px; }
.single-post h1 {
    font-size: 2rem;
    margin-bottom: 16px;
    line-height: 1.4;
}
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.post-meta span { display: flex; align-items: center; gap: 8px; }
.post-meta i { color: var(--secondary); }
.post-thumbnail {
    margin-bottom: 28px;
    border-radius: 12px;
    overflow: hidden;
}
.post-thumbnail img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}
.post-body {
    font-size: 1.05rem;
    line-height: 1.8;
}
.post-body h3 {
    font-size: 1.3rem;
    margin: 28px 0 12px;
    color: var(--text-main);
}
.post-body p { margin-bottom: 16px; color: var(--text-muted); }
.post-body ul {
    margin: 16px 0;
    padding-right: 24px;
}
.post-body li {
    margin-bottom: 8px;
    color: var(--text-muted);
}
.post-body li strong { color: var(--text-main); }
.post-body .post-figure {
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}
.post-body .post-figure img {
    width: 100%;
    display: block;
}
.post-body .post-figure figcaption {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}
.post-body a {
    color: var(--secondary);
    text-decoration: underline;
}
.post-body a:hover { color: var(--primary); }

@media (max-width: 900px) {
    .blog-container { grid-template-columns: 1fr; }
    .blog-sidebar { position: static; }
    .blog-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}
@media (max-width: 600px) {
    .blog-sidebar { grid-template-columns: 1fr; }
    .posts-cards { grid-template-columns: 1fr; }
    .blog-hero h1 { font-size: 1.8rem; }
}

/* Responsive adjustments for large and mobile monitors */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}
@media (min-width: 1600px) {
    .container {
        max-width: 1480px;
    }
}
@media (max-width: 768px) {
    .floating-card {
        padding: 8px 12px;
        gap: 8px;
    }
    .floating-card i {
        font-size: 1.1rem;
    }
    .floating-card span {
        font-size: 0.75rem;
    }
    .floating-card strong {
        font-size: 0.85rem;
    }
    .floating-card.c1 {
        top: -10px;
        right: -10px;
    }
    .floating-card.c2 {
        bottom: -10px;
        left: -10px;
    }
}
@media (max-width: 480px) {
    .floating-card {
        display: none !important;
    }
    .carousel-indicators {
        bottom: 55px;
    }
    .carousel-caption {
        padding: 10px 15px;
    }
    .carousel-caption h4 {
        font-size: 0.95rem;
    }
    .carousel-caption p {
        font-size: 0.75rem;
    }
}

/* --- Tech Sun Background Animation --- */
.tech-sun-container {
    position: fixed;
    width: 350px;
    height: 350px;
    pointer-events: none;
    z-index: -1;
    /* We animate left and top along a realistic solar arc */
    animation: sun-drift 140s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@media (prefers-reduced-motion: reduce) {
    .tech-sun-container {
        animation: none;
        left: 20%;
        top: 25vh;
    }
}

/* Realistic parabolic path simulating sunset/sunrise and zenith */
@keyframes sun-drift {
    0% {
        left: -350px;
        top: 85vh;
        opacity: 0;
    }
    12% {
        opacity: 1; /* Soft sunrise fade-in */
    }
    50% {
        left: 50vw;
        top: 10vh; /* Zenith (noon) */
        opacity: 1;
    }
    88% {
        opacity: 1; /* Soft sunset fade-out start */
    }
    100% {
        left: 100vw;
        top: 85vh; /* Sunset */
        opacity: 0;
    }
}

.tech-sun {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dual-layer real solar ambient lighting overlays */
.tech-sun-glow-inner {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.22) 0%, rgba(245, 158, 11, 0.05) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -2; /* Render behind sun lines */
    transform: translate3d(0, 0, 0);
    animation: glow-pulse 8s ease-in-out infinite alternate;
}

.tech-sun-glow-outer {
    position: absolute;
    width: 1200px;
    height: 1200px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, rgba(6, 182, 212, 0.03) 45%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -3; /* Behind grid overlay entirely */
    transform: translate3d(0, 0, 0);
    animation: glow-pulse-wide 12s ease-in-out infinite alternate;
}

html:not(.dark) .tech-sun-glow-inner {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.09) 0%, transparent 60%);
}

html:not(.dark) .tech-sun-glow-outer {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.03) 0%, transparent 75%);
}

@keyframes glow-pulse {
    0% { transform: scale(0.95); opacity: 0.9; }
    100% { transform: scale(1.05); opacity: 1; }
}

@keyframes glow-pulse-wide {
    0% { transform: scale(0.93); opacity: 0.8; }
    100% { transform: scale(1.07); opacity: 1; }
}

/* Rotating Circular Brand Label */
.tech-sun-circular-text {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2; /* Sits over the rotating rings but behind the central pulsing core */
    animation: rotate-cw 60s linear infinite; /* Slower, more elegant rotation */
    transform-origin: center;
    transform-origin: 50% 50%;
    opacity: 0.65;
    direction: ltr !important; /* Force LTR direction on the SVG container */
}

.tech-sun-circular-text text {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 9.2px;
    font-weight: 700;
    letter-spacing: 3.9px;
    fill: var(--primary);
    text-transform: uppercase;
    direction: ltr !important; /* Force LTR rendering for the circular text */
    unicode-bidi: bidi-override !important;
}

/* Glowing central core */
.tech-sun-core {
    position: absolute;
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, var(--primary) 20%, transparent 70%);
    border-radius: 50%;
    box-shadow: 0 0 35px var(--primary);
    animation: sun-pulse 6s ease-in-out infinite alternate;
    opacity: 0.85;
}

@keyframes sun-pulse {
    0% {
        transform: scale(0.92);
        box-shadow: 0 0 25px var(--primary);
        opacity: 0.75;
    }
    100% {
        transform: scale(1.08);
        box-shadow: 0 0 45px var(--primary);
        opacity: 0.95;
    }
}

/* Rotating rings with subtle opacities for text legibility */
.tech-sun-ring {
    position: absolute;
    border-radius: 50%;
    box-sizing: border-box;
}

.tech-sun-ring.ring-1 {
    width: 140px;
    height: 140px;
    border: 1.5px dashed var(--secondary);
    animation: rotate-cw 28s linear infinite;
    opacity: 0.45;
}

.tech-sun-ring.ring-2 {
    width: 210px;
    height: 210px;
    border: 1px dotted var(--primary);
    animation: rotate-ccw 38s linear infinite;
    opacity: 0.35;
}

.tech-sun-ring.ring-3 {
    width: 280px;
    height: 280px;
    border: 2px dashed var(--secondary);
    border-dasharray: 4px 14px;
    animation: rotate-cw 48s linear infinite;
    opacity: 0.3;
}

.tech-sun-ring.ring-outer {
    width: 320px;
    height: 320px;
    border: 1px double var(--primary);
    animation: rotate-ccw 90s linear infinite;
    opacity: 0.2;
}

.tech-sun-crosshair-h {
    position: absolute;
    width: 330px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary) 25%, var(--secondary) 75%, transparent);
    opacity: 0.2;
}

.tech-sun-crosshair-v {
    position: absolute;
    height: 330px;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--secondary) 25%, var(--secondary) 75%, transparent);
    opacity: 0.2;
}

@keyframes rotate-cw {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate-ccw {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}


/* --- Live Telemetry Widget --- */
.live-telemetry-widget {
    position: fixed;
    top: 95px;
    left: 24px; /* Left corner for Persian RTL by default */
    width: 250px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 999; /* Below main nav mobile overlay but above other standard sections */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.live-telemetry-widget:hover {
    transform: translateY(-2px);
    border-color: var(--secondary);
    box-shadow: 0 12px 35px rgba(6, 182, 212, 0.2);
}

[dir="ltr"] .live-telemetry-widget {
    left: auto;
    right: 24px; /* Right corner for English LTR */
}

/* Corner brackets decoration for telemetry widget */
.live-telemetry-widget::before,
.live-telemetry-widget::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    opacity: 0.4;
    transition: var(--transition);
    pointer-events: none;
}
.live-telemetry-widget::before {
    top: 0;
    left: 0;
    border-top: 1.5px solid var(--secondary);
    border-left: 1.5px solid var(--secondary);
}
.live-telemetry-widget::after {
    bottom: 0;
    right: 0;
    border-bottom: 1.5px solid var(--primary);
    border-right: 1.5px solid var(--primary);
}

.telemetry-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html:not(.dark) .telemetry-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.telemetry-status-led {
    width: 7px;
    height: 7px;
    background-color: #22c55e; /* Cyber Green */
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
    animation: led-pulse 1.5s ease-in-out infinite alternate;
}

@keyframes led-pulse {
    0% {
        opacity: 0.4;
        box-shadow: 0 0 2px #22c55e;
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 10px #22c55e;
    }
}

.telemetry-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: uppercase;
}

[dir="rtl"] .telemetry-title {
    letter-spacing: 0;
    font-size: 0.8rem;
}

.telemetry-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.telemetry-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.telemetry-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.telemetry-label i {
    color: var(--secondary);
    font-size: 0.8rem;
}

.telemetry-value {
    font-family: 'Consolas', 'Courier New', Courier, monospace, 'Vazirmatn';
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.telemetry-unit {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* Collapsible Floating Action Button (FAB) layout on mobile viewports */
@media (max-width: 900px) {
    .live-telemetry-widget {
        display: flex !important; /* Force show */
        position: fixed;
        bottom: 20px;
        left: 20px; /* Floating at bottom-left corner */
        top: auto;
        right: auto;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        padding: 0;
        overflow: hidden;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
        z-index: 1001; /* Float over mobile footer/nav */
        background: var(--glass-bg);
        border: 1.5px solid var(--secondary);
        transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                    height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                    border-radius 0.4s ease, 
                    padding 0.3s ease,
                    border-color 0.3s ease,
                    box-shadow 0.3s ease;
    }

    [dir="ltr"] .live-telemetry-widget {
        left: auto;
        right: 20px; /* bottom-right for LTR */
    }

    /* Center the LED inside the circular button when collapsed */
    .live-telemetry-widget .telemetry-header {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        transition: var(--transition);
    }

    /* Small technical sun icon overlay inside the collapsed circle */
    .live-telemetry-widget .telemetry-header::before {
        content: '\f185'; /* FontAwesome Sun Icon */
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 1.15rem;
        color: var(--primary);
        position: absolute;
        animation: rotate-cw 20s linear infinite;
        display: block !important;
    }

    .live-telemetry-widget .telemetry-title,
    .live-telemetry-widget .telemetry-body {
        display: none !important;
    }

    /* Expanded state on mobile click */
    .live-telemetry-widget.mobile-expanded {
        width: 260px;
        height: auto;
        border-radius: 14px;
        padding: 14px;
        display: block !important;
        overflow: visible;
        border-color: var(--glass-border);
    }

    .live-telemetry-widget.mobile-expanded .telemetry-header {
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        justify-content: flex-start;
        gap: 8px;
        height: auto;
    }
    
    html:not(.dark) .live-telemetry-widget.mobile-expanded .telemetry-header {
        border-bottom-color: rgba(0, 0, 0, 0.06);
    }

    .live-telemetry-widget.mobile-expanded .telemetry-header::before {
        display: none !important; /* Hide sun icon when expanded */
    }

    .live-telemetry-widget.mobile-expanded .telemetry-title,
    .live-telemetry-widget.mobile-expanded .telemetry-body {
        display: block !important;
    }
    
    .live-telemetry-widget.mobile-expanded .telemetry-body {
        display: flex !important; /* Restore flex layout for rows */
    }
}

/* --- Centered Premium Brand Title --- */
.hero-brand-header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 30px;
    position: relative;
    z-index: 10;
}

.hero-brand-name {
    font-size: clamp(2rem, 5vw, 4.2rem);
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--secondary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 6s linear infinite;
    filter: drop-shadow(0 2px 10px rgba(6, 182, 212, 0.3));
    font-family: 'Outfit', 'Inter', sans-serif;
}

[dir="rtl"] .hero-brand-name {
    letter-spacing: 0.15em; /* Keep letter spacing for English brand name even in RTL */
}

.hero-brand-tagline {
    font-size: clamp(0.8rem, 2vw, 1.05rem);
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

[dir="rtl"] .hero-brand-tagline {
    letter-spacing: 0; /* No letter spacing for Persian tagline */
    font-family: 'Vazirmatn', sans-serif;
}

.hero-brand-header::after {
    content: '';
    display: block;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary), var(--primary), var(--secondary), transparent);
    margin: 14px auto 0;
    box-shadow: 0 0 10px var(--secondary);
    opacity: 0.8;
}

@keyframes shine {
    to { background-position: 200% center; }
}

@media (max-width: 768px) {
    .hero-brand-header {
        margin-bottom: 24px;
        padding-top: 15px;
    }
}

/* --- Use Case Card Inline Details --- */
.use-case-card {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.use-case-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    margin-top: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0;
    line-height: 1.6;
    text-align: justify;
}

html:not(.dark) .use-case-details {
    border-top-color: rgba(0, 0, 0, 0.05);
}

.use-case-card.expanded .use-case-details {
    max-height: 250px; /* Safe bounds to display 3-4 lines of text */
    opacity: 1;
    margin-top: 16px;
    padding-top: 12px;
}

.use-case-expand-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
}

.use-case-card:hover .use-case-expand-hint {
    color: var(--primary);
}

.use-case-card.expanded .use-case-expand-hint i {
    transform: rotate(180deg);
}

.use-case-expand-hint i {
    transition: transform 0.3s ease;
}

/* --- Live SCADA Alarm Ticker --- */
.scada-alarm-ticker {
    display: flex;
    align-items: center;
    background: rgba(7, 13, 25, 0.9);
    border-top: 1px solid rgba(6, 182, 212, 0.12);
    border-bottom: 1px solid rgba(6, 182, 212, 0.12);
    height: 38px;
    overflow: hidden;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    font-family: var(--font-main);
    font-size: 0.8rem;
    pointer-events: auto;
}

/* Light theme overrides */
html:not(.dark) .scada-alarm-ticker {
    background: rgba(241, 245, 249, 0.95);
    border-top-color: rgba(13, 148, 136, 0.15);
    border-bottom-color: rgba(13, 148, 136, 0.15);
}

.ticker-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-darker);
    border-right: 1px solid rgba(6, 182, 212, 0.12);
    padding: 0 16px;
    height: 100%;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 10px 0 20px rgba(0, 0, 0, 0.4);
}

[dir="ltr"] .ticker-badge {
    border-right: none;
    border-left: 1px solid rgba(6, 182, 212, 0.12);
    box-shadow: -10px 0 20px rgba(0, 0, 0, 0.4);
}

html:not(.dark) .ticker-badge {
    border-color: rgba(13, 148, 136, 0.15);
}

.ticker-dot {
    width: 6px;
    height: 6px;
    background-color: #ef4444; /* Alert Red */
    border-radius: 50%;
    box-shadow: 0 0 8px #ef4444;
    animation: led-pulse-red 1.2s ease-in-out infinite alternate;
}

@keyframes led-pulse-red {
    0% { opacity: 0.4; box-shadow: 0 0 2px #ef4444; }
    100% { opacity: 1; box-shadow: 0 0 10px #ef4444; }
}

.ticker-wrap {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
    height: 100%;
}

.ticker-content {
    display: flex;
    align-items: center;
    gap: 50px;
    white-space: nowrap;
    animation: marquee-scroll 45s linear infinite;
}

@keyframes marquee-scroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* Pause scroll on hover */
.scada-alarm-ticker:hover .ticker-content {
    animation-play-state: paused;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.ticker-item .t-time {
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    opacity: 0.5;
    font-size: 0.75rem;
}

.ticker-item.info { color: var(--secondary); }
.ticker-item.ok { color: #22c55e; }
.ticker-item.warn { color: #f59e0b; }
.ticker-item.alarm { color: #ef4444; }

/* Show alarm ticker on mobile with adjusted sizing */
@media (max-width: 768px) {
    .scada-alarm-ticker {
        display: flex !important; /* Force show */
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1002; /* Float above everything including telemetry widget */
        height: 34px;
        font-size: 0.72rem;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    }
    .live-telemetry-widget {
        bottom: 50px !important; /* Move FAB up to clear the fixed bottom ticker */
    }
    .ticker-badge {
        padding: 0 10px;
        font-size: 0.68rem;
    }
    .ticker-content {
        gap: 30px;
        animation-duration: 35s; /* Speed up slightly since text size is smaller */
    }
}