/* --- Variables & Reset --- */
:root {
    --bg-color: #FAFAFA; /* Modern Light Background */
    --text-primary: #111111;
    --text-secondary: #666666;
    --accent-color: #FF4500; /* Subtle reference to fire */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --spacing-standard: 2rem;
    --border-radius: 12px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-soft: 0 10px 40px rgba(0,0,0,0.04);
    --shadow-hover: 0 20px 60px rgba(0,0,0,0.08);
}

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

body {
    font-family: --font-main;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

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

.text-center { text-align: center; }

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(250, 250, 250, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.03);
    padding: 20px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.main-nav ul {
    display: flex;
    gap: 40px;
}

.main-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--text-primary);
}

/* --- Hero Section --- */
.hero-section {
    padding-top: 20px;
    padding-bottom: 16px;
}

h1 {
    font-size: 7rem; /* Big Minimal Title */
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.counter-wrapper {
    font-size: 8.5rem;
    font-weight: 300;
    line-height: 1;
    margin: 10px 0;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums; /* Prevents jumping */
}

.subtitle {
    font-size: 3.2rem;
    color: #d0581d;
    max-width: 600px;
    margin: -45px auto 0;
    font-weight: 400;
}

/* --- Fire Visualization (Vertical Tank) --- */
.visualization-section {
    display: flex;
    justify-content: center;
    padding: 30px 0;
    position: relative;
}

.fire-gauge-wrapper {
    position: relative;
    width: 200px;
    height: 400px;
    background: #e0e0e0;
    border-radius: 100px; /* Pill shape */
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

.fire-tank {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* The magic happens here: absolute positioning from bottom */
.fire-level {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #000; /* Fallback */
    border-bottom-left-radius: 100px;
    border-bottom-right-radius: 100px;
}

/* Video covers the full tank size, but is clipped by .fire-level */
#fire-video {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 400px; /* Must match wrapper height to keep aspect ratio fixed */
    object-fit: cover;
    opacity: 0.9;
    filter: contrast(1.2) saturation(1.2);
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
    transition: opacity 0.3s;
}

@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* --- Cards Section --- */
.cards-section {
    padding: 80px 0 120px;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.info-card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    cursor: pointer;
}

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

.card-image {
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.info-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.card-content h3 a::after {
    content: ' →';
    opacity: 0;
    transition: opacity 0.3s;
}

.info-card:hover .card-content h3 a::after {
    opacity: 1;
}

/* --- Footer --- */
.site-footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* --- Animations & Utilities --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive */
.mobile-toggle { display: none; }

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .counter-wrapper { font-size: 5rem; }
    
    .mobile-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
    }
    .mobile-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background: var(--text-primary);
        margin: 5px 0;
    }
    
    .main-nav {
        display: none; /* Simplification for code brevity, typically requires JS toggle */
    }
    
     .main-nav.nav-open {
        clip-path: circle(150% at 100% 0); /* باز شدن دایره‌ای */
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .main-nav a {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--text-primary);
    }

    /* انیمیشن دکمه همبرگری به ضربدر */
    .mobile-toggle {
        position: relative;
        z-index: 1001; /* باید روی منوی باز شده باشد */
    }

    .mobile-toggle.toggle-active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-toggle.toggle-active span:nth-child(2) {
        transform: rotate(-45deg) translate(0px, 0px); /* خط دوم مخفی یا ترکیب شود */
        margin-top: -7px; 
    }
}