.mag-page {
    min-height: 100vh;
    padding: 60px 0 80px;
    background: radial-gradient(circle at top, #fff5f8 0%, #f9fbff 45%, #ffffff 100%);
    font-family: 'Vazirmatn', sans-serif;
    color: #1f1f2b;
}

.mag-page section {
    width: min(1200px, 90%);
    margin: 0 auto 64px;
}

.mag-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    align-items: stretch;
}

.hero-content {
    background: linear-gradient(135deg, #1c1c4b, #f26a30);
    color: #fff;
    border-radius: 32px;
    padding: 48px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.hero-content::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='400' height='400'%3E%3Ccircle cx='200' cy='200' r='150' stroke='rgba(255,255,255,0.08)' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content > * {
    position: relative;
    z-index: 1;
}

.hero-tagline,
.section-tagline {
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 12px;
    opacity: 0.75;
    margin-bottom: 12px;
    display: inline-block;
}

.hero-content h1 {
    font-size: clamp(32px, 4vw, 46px);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 16px;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.btn-mag-primary,
.btn-mag-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-mag-primary {
    background: #fff;
    color: #1c1c4b;
}

.btn-mag-ghost {
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
}

.btn-mag-primary:hover,
.btn-mag-ghost:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.hero-featured .featured-card {
    display: block;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    min-height: 100%;
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-overlay {
    position: absolute;
    inset: 0;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.75) 100%);
    color: #fff;
}

.featured-label {
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 13px;
    margin-bottom: 12px;
}

.featured-overlay h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.featured-overlay p {
    margin: 0 0 16px;
    line-height: 1.6;
    opacity: 0.9;
}

.featured-read {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.mag-highlight {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.highlight-card {
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(23, 23, 37, 0.08);
    box-shadow: 0 15px 30px rgba(23, 23, 37, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.highlight-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 40px rgba(242, 106, 48, 0.12);
}

.highlight-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.highlight-body {
    padding: 20px 22px 24px;
}

.highlight-date {
    font-size: 13px;
    color: #9da2b9;
    display: block;
    margin-bottom: 8px;
}

.highlight-body h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.highlight-body p {
    margin: 0 0 12px;
    color: #505064;
    line-height: 1.7;
}

.highlight-link {
    font-weight: 600;
    color: #f26a30;
}

.mag-latest {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 32px;
    padding: 48px;
    box-shadow: 0 25px 60px rgba(23, 23, 37, 0.08);
    border: 1px solid rgba(23, 23, 37, 0.06);
}

.section-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.section-header h2 {
    margin: 6px 0 0;
    font-size: clamp(26px, 3vw, 32px);
}

.section-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.chip {
    border-radius: 20px;
    border: 1px solid rgba(23, 23, 37, 0.2);
    background: transparent;
    padding: 8px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #505064;
    transition: all 0.2s ease;
}

.chip.active,
.chip:hover {
    border-color: transparent;
    background: rgba(242, 106, 48, 0.1);
    color: #f26a30;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.article-card {
    border: 1px solid rgba(23, 23, 37, 0.08);
    border-radius: 24px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 45px rgba(242, 106, 48, 0.2);
}

.article-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-image {
    position: relative;
}

.article-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.article-date {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #fff;
    padding: 6px 12px;
    border-radius: 14px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.article-date strong {
    display: block;
    font-size: 16px;
    color: #f26a30;
}

.article-date small {
    font-size: 11px;
    color: #505064;
}

.article-body {
    padding: 22px 24px 26px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-body h3 {
    margin: 0;
    font-size: 18px;
}

.article-body p {
    margin: 0;
    color: #505064;
    line-height: 1.7;
}

.article-link {
    margin-top: auto;
    font-weight: 600;
    color: #f26a30;
}

.mag-pagination {
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-weight: 600;
}

.mag-pagination .page-btn {
    padding: 8px 18px;
    border-radius: 16px;
    border: 1px solid rgba(23, 23, 37, 0.15);
    text-decoration: none;
    color: #505064;
}

.mag-newsletter {
    background: linear-gradient(135deg, #ffe3ed, #e1ecff);
    border-radius: 32px;
    padding: 48px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    align-items: center;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.newsletter-form input {
    flex: 1 1 220px;
    padding: 14px 18px;
    border-radius: 18px;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    font-size: 15px;
}

.newsletter-form button {
    padding: 14px 24px;
    border-radius: 18px;
    border: none;
    background: #1c1c4b;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.newsletter-form button:hover {
    opacity: 0.85;
}

@media (max-width: 768px) {
    .mag-page section {
        width: 92%;
    }

    .hero-content {
        padding: 32px;
    }

    .mag-latest {
        padding: 32px 24px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button,
    .newsletter-form input {
        width: 100%;
    }
}

