/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Roboto', sans-serif;
    background: #f4f7fc;
    color: #1e293b;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* ===== Header ===== */
.header {
    background: linear-gradient(135deg, #0b3d5f, #1a7a8a);
    color: #fff;
    padding: 0.8rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
}

.logo i {
    color: #2ecc71;
    font-size: 2rem;
}

.logo span {
    background: linear-gradient(to right, #2ecc71, #f1c40f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    transition: 0.25s ease;
    font-size: 0.95rem;
    position: relative;
}

.nav a:hover {
    color: #fff;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: #2ecc71;
    transition: 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}

.auth-buttons {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.btn-outline-light {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 0.4rem 1.2rem;
    border-radius: 60px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.25s ease;
    font-family: 'Vazirmatn', 'Roboto', sans-serif;
    text-decoration: none;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.btn-light {
    background: #fff;
    color: #0b3d5f;
    border: none;
    padding: 0.4rem 1.2rem;
    border-radius: 60px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.25s ease;
    font-family: 'Vazirmatn', 'Roboto', sans-serif;
    text-decoration: none;
}

.btn-light:hover {
    background: #e2e8f0;
    transform: scale(1.03);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== Hero (صفحه اصلی) ===== */
.hero {
    padding: 4rem 0 3rem;
    background: linear-gradient(145deg, #f4f7fc, #e6edf5);
    border-bottom: 1px solid #dce4ec;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 900;
    color: #0b3d5f;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.hero-content h1 span {
    background: linear-gradient(135deg, #1a7a8a, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.15rem;
    color: #475569;
    margin-bottom: 1.8rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: #0b3d5f;
    color: #fff;
    padding: 0.8rem 2.2rem;
    border-radius: 60px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-family: 'Vazirmatn', 'Roboto', sans-serif;
    font-size: 1rem;
}

.btn-primary:hover {
    background: #1a7a8a;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(11, 61, 95, 0.25);
}

.btn-success {
    background: #2ecc71;
    color: #0b3d5f;
    padding: 0.8rem 2.2rem;
    border-radius: 60px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-family: 'Vazirmatn', 'Roboto', sans-serif;
    font-size: 1rem;
}

.btn-success:hover {
    background: #27ae60;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.3);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image i {
    font-size: 12rem;
    color: #1a7a8a;
    opacity: 0.15;
    background: #fff;
    padding: 2rem;
    border-radius: 50%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

/* ===== Features (صفحه اصلی) ===== */
.features {
    padding: 4rem 0;
    background: #fff;
}

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

.section-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #0b3d5f;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #64748b;
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-grid-bottom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: #f8fafc;
    padding: 2rem 1rem;
    border-radius: 2rem;
    transition: 0.3s ease;
    border: 1px solid #edf2f7;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: block;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: #2ecc71;
}

.feature-card i {
    font-size: 2.8rem;
    color: #1a7a8a;
    background: #e3f0f0;
    padding: 1rem;
    border-radius: 50%;
    margin-bottom: 0.8rem;
    display: inline-block;
}

.feature-card h3 {
    font-size: 1.1rem;
    color: #0b3d5f;
    margin-bottom: 0.3rem;
}

.feature-card p {
    color: #64748b;
    font-size: 0.9rem;
}

/* ===== Latest Posts (صفحه اصلی) ===== */
.latest-posts {
    padding: 4rem 0;
    background: #f4f7fc;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
    margin-bottom: 1.8rem;
}

.post-grid-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.post-card {
    background: #fff;
    border-radius: 1.8rem;
    padding: 1.8rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    border: 1px solid #edf2f7;
    transition: 0.25s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    border-color: #2ecc71;
}

.post-card .badge-cat {
    display: inline-block;
    background: #1a7a8a;
    color: #fff;
    padding: 0.1rem 1.2rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: 0.3px;
}

.post-card h4 {
    font-size: 1.1rem;
    color: #0b3d5f;
    margin-bottom: 0.3rem;
}

.post-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.post-card .meta {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== Page Hero (صفحات داخلی) ===== */
.page-hero {
    padding: 3rem 0 2.5rem;
    background: linear-gradient(145deg, #f4f7fc, #e6edf5);
    border-bottom: 1px solid #dce4ec;
}

.page-hero .container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.page-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #0b3d5f;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.page-hero-content h1 i {
    color: #2ecc71;
}

.page-hero-content p {
    font-size: 1.1rem;
    color: #475569;
    max-width: 90%;
}

.page-hero-image i {
    font-size: 6rem;
    color: #1a7a8a;
    opacity: 0.15;
}

/* ===== Category Grid (صفحات داخلی) ===== */
.category-section {
    padding: 3rem 0;
    background: #fff;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.category-card {
    background: #f8fafc;
    padding: 1.8rem 1rem;
    border-radius: 1.8rem;
    transition: 0.3s ease;
    border: 1px solid #edf2f7;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: #2ecc71;
}

.category-card i {
    font-size: 2.5rem;
    color: #1a7a8a;
    background: #e3f0f0;
    padding: 0.8rem;
    border-radius: 50%;
    margin-bottom: 0.6rem;
    display: inline-block;
}

.category-card h3 {
    font-size: 1rem;
    color: #0b3d5f;
}

.category-card p {
    color: #64748b;
    font-size: 0.85rem;
}

/* ===== Content Grid (صفحات داخلی) ===== */
.content-section {
    padding: 3rem 0;
    background: #f4f7fc;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.content-card {
    background: #fff;
    border-radius: 1.8rem;
    padding: 1.8rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    border: 1px solid #edf2f7;
    transition: 0.25s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    border-color: #2ecc71;
}

.content-card .badge {
    display: inline-block;
    background: #1a7a8a;
    color: #fff;
    padding: 0.1rem 1.2rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: 0.3px;
}

.content-card .badge.orange {
    background: #f39c12;
}

.content-card h4 {
    font-size: 1.1rem;
    color: #0b3d5f;
    margin-bottom: 0.3rem;
}

.content-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.content-card .meta {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== Footer ===== */
.footer {
    background: #0b3d5f;
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer .container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
}

.footer h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer p {
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: 0.2s ease;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.4rem;
}

.footer a:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.footer-social a {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-social a:hover {
    color: #fff;
}

.footer-bottom {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content p {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image i {
        font-size: 8rem;
    }

    .feature-grid,
    .feature-grid-bottom,
    .post-grid,
    .post-grid-bottom,
    .category-grid,
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .page-hero-content p {
        max-width: 100%;
    }

    .page-hero-image i {
        font-size: 4rem;
    }

    .footer .container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 1rem 0;
        gap: 0.8rem;
    }

    .nav.open {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
    }

    .auth-buttons .btn-outline-light,
    .auth-buttons .btn-light {
        width: 100%;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .page-hero-content h1 {
        font-size: 2rem;
    }

    .feature-grid,
    .feature-grid-bottom,
    .post-grid,
    .post-grid-bottom,
    .category-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .footer .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: 1.7rem;
    }

    .page-hero-content h1 {
        font-size: 1.8rem;
    }
}