html, body {
    width: 100%;
    overflow-x: hidden; /* This stays, it's correct for preventing horizontal bugs */
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
body {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}


/* Define the primary color */
:root {
    --primary-color: #38bdf8;
    /* Sky Blue */
    --primary-color-rgb: 56, 189, 248;
}

/* Style for the main body */
body {
    background-color: #000;
    color: #e0e0e0;
    font-family: 'Vazirmatn', 'Inter', 'Noto Sans SC', sans-serif;
    scroll-behavior: smooth;
}

#matrix-canvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.3;
}
.glass-effect {
    background: rgba(10, 25, 47, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.accordion-button:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
}
.text-glow {
    text-shadow: 0 0 8px rgba(var(--primary-color-rgb), 0.7), 0 0 10px rgba(var(--primary-color-rgb), 0.5);
}
.cyber-button {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.cyber-button:before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(var(--primary-color-rgb), 0.4), transparent);
    transition: all 0.5s ease; z-index: -1;
}
.cyber-button:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    color: #fff;
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.5);
}
.cyber-button:hover:before { left: 100%; }

.accordion-content {
    max-height: 0; overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    padding: 0 1.5rem;
}
.accordion-content.open { max-height: 1000px; padding: 1.5rem; }
.accordion-icon { transition: transform 0.3s ease; }
.accordion-button[aria-expanded="true"] .accordion-icon { transform: rotate(45deg); }
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transform: translateY(20px);
}
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
@keyframes heroWordIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-word {
    display: inline-block; opacity: 0;
    animation: heroWordIn 0.6s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}
.equation-container { font-family: 'Inter', sans-serif; color: var(--primary-color); min-height: 10rem; }
.equation-parts-wrapper { display: flex; align-items: center; justify-content: center; position: absolute; width: 100%; height: 100%; }
.equation-part, .equation-result { opacity: 0; }
.animate-on-scroll.is-visible .equation-part { animation: eq-fade-in 0.8s forwards, eq-fade-out 0.8s 3s forwards; }
.animate-on-scroll.is-visible .part-ai { animation-delay: 0.2s, 3s; }
.animate-on-scroll.is-visible .part-plus { animation-delay: 0.7s, 3s; }
.animate-on-scroll.is-visible .part-shield { animation-delay: 1.2s, 3s; }
.animate-on-scroll.is-visible .equation-result {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: eq-result-in 1.2s 3.8s forwards;
}
@keyframes eq-fade-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes eq-fade-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.5); } }
@keyframes eq-result-in { from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.dropdown-menu {
    opacity: 0; visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}
.dropdown-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.flag-icon { width: 24px; height: 18px; border-radius: 3px; object-fit: cover; }
#mobile-menu {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}
#mobile-menu.open { transform: translateY(0); }

/* ===== NEW STYLES ADDED HERE ===== */
/* Blog Card Styles (for main page and blog page consistency) */
.blog-card {
    transition: border-color 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    border-color: rgba(var(--primary-color-rgb), 0.5);
    transform: translateY(-5px);
}

.blog-card img {
    height: 200px; /* A balanced height for the main page 3-column layout */
    object-fit: cover;
}

.blog-card p {
    text-align: justify;
    line-height: 1.6;
}