/* ===== متغیرهای رنگ ===== */
:root {
    --primary: #52005c;
    --primary-light: #7a2a8a;
    --secondary: #fcb900;
    --secondary-light: #ffd54f;
    --bg-body: #f8f6fc;
    --bg-card: #ffffff;
    --text-dark: #1a0a1f;
    --text-muted: #6b5a70;
    --shadow: 0 8px 32px rgba(82, 0, 92, 0.10);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Estedad', 'Tahoma', sans-serif;
    background: var(--bg-body);
    color: var(--text-dark);
    padding: 20px;
    direction: rtl;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== هدر ===== */
.main-header {
    background: #ffffff;
    padding: 16px 30px;
    border-radius: var(--radius);
    box-shadow: 0 2px 16px rgba(82, 0, 92, 0.06);
    margin-bottom: 30px;
    border: 1px solid rgba(82, 0, 92, 0.06);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-link {
    flex-shrink: 0;
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 200px;
    display: block;
}

.header-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.header-title h1::before {
    content: '📰 ';
}

@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .header-title h1 {
        font-size: 20px;
    }
    .logo-img {
        height: 40px;
    }
}

/* ===== بخش هیرو (۵ خبر - ۳ ستونه) ===== */
.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.hero-col-main {
    grid-column: 1 / 2;
}

.hero-col-small {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #000;
}

.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-main:hover img {
    transform: scale(1.04);
}

.hero-small {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #000;
}

.hero-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-small:hover img {
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 22px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
    color: #fff;
}

.hero-main .hero-overlay {
    padding: 30px 28px;
}

.hero-overlay h2 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.hero-overlay h2 a {
    color: #fff;
    transition: color 0.2s;
}

.hero-overlay h2 a:hover {
    color: var(--secondary);
}

.hero-overlay h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.hero-overlay h3 a {
    color: #fff;
    transition: color 0.2s;
}

.hero-overlay h3 a:hover {
    color: var(--secondary);
}

.hero-overlay p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.hero-source {
    display: inline-block;
    background: rgba(252, 185, 0, 0.25);
    padding: 2px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(4px);
}

@media (max-width: 992px) {
    .hero-section {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }
    .hero-col-main {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }
    .hero-col-small {
        grid-row: 2 / 3;
    }
}

@media (max-width: 600px) {
    .hero-section {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .hero-col-main {
        grid-column: 1;
        grid-row: 1;
    }
    .hero-col-small {
        grid-row: auto;
    }
    .hero-main .hero-overlay {
        padding: 16px;
    }
    .hero-overlay h2 {
        font-size: 1.2rem;
    }
    .hero-overlay p {
        font-size: 0.8rem;
        -webkit-line-clamp: 1;
    }
    .hero-overlay h3 {
        font-size: 0.9rem;
    }
}

/* ===== بخش جدید (دو ستون با گرافیک جذاب) ===== */
.new-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 320px;
    gap: 25px;
    margin: 30px 0;
    align-items: start;
}

.new-col {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px 20px 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(82, 0, 92, 0.06);
}

.new-col-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    padding-bottom: 12px;
    border-bottom: 3px solid var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.new-col-title .icon {
    font-size: 24px;
}

.new-news-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.new-news-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    background: var(--bg-body);
    border-radius: 14px;
    overflow: hidden;
    padding: 12px;
    transition: var(--transition);
    border: 1px solid rgba(82, 0, 92, 0.05);
}

.new-news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(82, 0, 92, 0.12);
    border-color: var(--secondary);
}

.new-card-image {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #e8e0ee, #d5cadd);
}

.new-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.new-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.new-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.new-card-title a:hover {
    color: var(--primary);
}

.new-card-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.new-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.new-source {
    background: rgba(82, 0, 92, 0.08);
    color: var(--primary);
    padding: 2px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
}

.new-date {
    font-size: 12px;
    opacity: 0.8;
}

/* ===== سایدبار ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(82, 0, 92, 0.06);
    transition: var(--transition);
}

.sidebar-widget:hover {
    border-color: var(--secondary);
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar img {
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}

/* ===== هواشناسی ===== */
.weather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.weather-day {
    background: rgba(82, 0, 92, 0.04);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    transition: var(--transition);
}

.weather-day:hover {
    background: rgba(252, 185, 0, 0.12);
}

.weather-day .day-name {
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
}

.weather-day .emoji {
    font-size: 26px;
    display: block;
    margin: 4px 0;
}

.weather-day .temp {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.weather-day .temp small {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
}

.weather-day .detail {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

.update-time {
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

/* ===== اوقات شرعی ===== */
.prayer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    font-size: 14px;
}

.prayer-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(82, 0, 92, 0.06);
}

.prayer-item .label {
    color: var(--text-muted);
}

.prayer-item .value {
    font-weight: 600;
    color: var(--primary);
}

.no-data {
    color: var(--text-muted);
    text-align: center;
    padding: 10px 0;
}

/* ===== لینک‌های کاربردی ===== */
.utility-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.util-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: linear-gradient(135deg, var(--bg-body), #f0ecf5);
    border-radius: 12px;
    border: 1px solid rgba(82, 0, 92, 0.08);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 500;
}

.util-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(82, 0, 92, 0.12);
    border-color: var(--secondary);
    background: linear-gradient(135deg, #ffffff, #f8f0ff);
}

.util-btn .util-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(82, 0, 92, 0.06);
    border-radius: 8px;
    transition: var(--transition);
}

.util-btn:hover .util-icon {
    background: rgba(252, 185, 0, 0.15);
}

.util-btn .util-label {
    font-size: 14px;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .utility-links {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .util-btn {
        padding: 10px 12px;
        font-size: 12px;
    }
    .util-btn .util-icon {
        font-size: 18px;
        width: 28px;
        height: 28px;
    }
}

/* ===== بخش بیشتر بخوانید ===== */
.more-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--secondary);
}

.more-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 10px;
}

.more-col h4 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid rgba(82, 0, 92, 0.08);
}

.more-list {
    list-style: none;
    padding: 0;
}

.more-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(82, 0, 92, 0.05);
    font-size: 15px;
    line-height: 1.6;
}

.more-list li a:hover {
    color: var(--primary);
}

@media (max-width: 600px) {
    .more-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ===== فوتر ===== */
.main-footer {
    margin-top: 30px;
    text-align: center;
    padding: 20px 0 10px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid rgba(82, 0, 92, 0.10);
}

.main-footer span {
    color: var(--secondary);
}

/* ===== اسکرول بار ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ===== انیمیشن ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card,
.new-news-card {
    animation: fadeInUp 0.4s ease forwards;
}
.news-card:nth-child(2),
.new-news-card:nth-child(2) { animation-delay: 0.05s; }
.news-card:nth-child(3),
.new-news-card:nth-child(3) { animation-delay: 0.10s; }
.news-card:nth-child(4),
.new-news-card:nth-child(4) { animation-delay: 0.15s; }
.news-card:nth-child(5),
.new-news-card:nth-child(5) { animation-delay: 0.20s; }
.news-card:nth-child(6),
.new-news-card:nth-child(6) { animation-delay: 0.25s; }
.news-card:nth-child(7),
.new-news-card:nth-child(7) { animation-delay: 0.30s; }
.news-card:nth-child(8),
.new-news-card:nth-child(8) { animation-delay: 0.35s; }
.news-card:nth-child(9),
.new-news-card:nth-child(9) { animation-delay: 0.40s; }
.news-card:nth-child(10),
.new-news-card:nth-child(10) { animation-delay: 0.45s; }

/* ===== کلاس‌های کمکی ===== */
.no-news {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

/* ===== ریسپانسیو بخش جدید و سایدبار ===== */
@media (max-width: 1024px) {
    .new-main-grid {
        grid-template-columns: 1fr 1fr;
    }
    .sidebar {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .new-main-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        grid-template-columns: 1fr;
    }
    .new-news-card {
        grid-template-columns: 1fr;
        padding: 14px;
    }
    .new-card-image {
        width: 100%;
        height: 200px;
    }
}

/* ===== ریسپانسیو سایدبار ویجت‌ها ===== */
@media (max-width: 768px) {
    .weather-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .prayer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .weather-grid {
        grid-template-columns: 1fr 1fr;
    }
    .prayer-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== بخش تیکر اخبار متحرک و تاریخ ===== */
.ticker-section {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius);
    padding: 10px 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(82, 0, 92, 0.20);
    border: 1px solid rgba(252, 185, 0, 0.15);
    overflow: hidden;
    flex-wrap: wrap;
}

.ticker-date {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px 16px 6px 18px;
    border-radius: 30px;
    border: 1px solid rgba(252, 185, 0, 0.20);
    flex-shrink: 0;
}

.ticker-date .date-icon {
    font-size: 18px;
}

.ticker-date .date-text {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.ticker-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 12px;
}

.ticker-label {
    color: var(--secondary);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 4px 12px;
    background: rgba(252, 185, 0, 0.15);
    border-radius: 20px;
    border: 1px solid rgba(252, 185, 0, 0.20);
}

.ticker-track {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 32px;
}

.ticker-items {
    display: flex;
    gap: 40px;
    animation: tickerScroll 25s linear infinite;
    white-space: nowrap;
    position: absolute;
    top: 0;
    right: 0;
}

.ticker-items:hover {
    animation-play-state: paused;
}

.ticker-item {
    color: #fff;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ticker-item a {
    color: #fff;
    transition: color 0.2s;
}

.ticker-item a:hover {
    color: var(--secondary);
}

.ticker-item::before {
    content: "•";
    color: var(--secondary);
    font-size: 18px;
    margin-left: 6px;
}

/* انیمیشن حرکت تیکر */
@keyframes tickerScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ریسپانسیو تیکر */
@media (max-width: 768px) {
    .ticker-section {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
        gap: 10px;
    }
    .ticker-date {
        align-self: flex-start;
    }
    .ticker-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .ticker-label {
        align-self: flex-start;
    }
    .ticker-track {
        height: 28px;
    }
    .ticker-item {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .ticker-date .date-text {
        font-size: 13px;
    }
    .ticker-item {
        font-size: 12px;
    }
    .ticker-track {
        height: 24px;
    }
}