/* IndexCMS 2.0 Premium Design System */
@import url('vazir.css');

:root {
    --primary: #0e1b4d;
    --accent: #d32f2f;
    --bg: #f4f6f8;
    --white: #ffffff;
    --text-dark: #333;
    --text-light: #666;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Vazirmatn', sans-serif; background: var(--bg); color: var(--text-dark); line-height: 1.7; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* Header */
header { background: linear-gradient(135deg, #1a3a8a 0%, #2d5dcc 40%, #e87d2f 100%); padding: 15px 0; position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo-box h1 { font-size: 1.8rem; font-weight: 900; color: #fff; }
.logo-box span { color: #ffd580; }

/* Slider */
.hero-slider { margin: 25px 0; border-radius: var(--radius); overflow: hidden; height: 450px; position: relative; box-shadow: var(--shadow); }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center; display: flex; align-items: flex-end; opacity: 0; animation: sliderFade 25s infinite; }
.slide-overlay { background: linear-gradient(transparent, rgba(0,0,0,0.8)); width: 100%; padding: 40px; color: white; }
.slide-title { font-size: 1.8rem; font-weight: bold; margin-bottom: 10px; }

/* Simple CSS Slider Animation (for 5 slides) */
@keyframes sliderFade {
    0%, 20% { opacity: 1; z-index: 10; }
    25%, 100% { opacity: 0; z-index: 0; }
}

.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 5s; }
.slide:nth-child(3) { animation-delay: 10s; }
.slide:nth-child(4) { animation-delay: 15s; }
.slide:nth-child(5) { animation-delay: 20s; }

/* Main Grid */
.main-layout { display: grid; grid-template-columns: 1fr 350px; gap: 30px; margin-bottom: 50px; }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 25px; }

.cat-box { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid #eee; }
.cat-head { background: var(--primary); color: white; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; }
.cat-body { padding: 15px; }
.news-item { display: flex; gap: 10px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed #eee; align-items: flex-start; }
.news-item:last-child { border-bottom: none; }
.news-item i { color: var(--accent); margin-top: 5px; font-size: 0.8rem; }
.news-item h4 { font-size: 0.95rem; font-weight: 500; }

/* Sidebar */
.sidebar-box { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.sidebar-box h3 { font-size: 1.1rem; margin-bottom: 20px; color: var(--primary); border-bottom: 2px solid #eee; padding-bottom: 10px; }

/* Footer Styling */
footer { background: #07102e; color: #fff; padding: 60px 0 30px; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 40px; }
.footer-col h3 { font-size: 1.2rem; margin-bottom: 20px; color: var(--accent); position: relative; padding-bottom: 10px; }
.footer-col h3::after { content: ''; position: absolute; right: 0; bottom: 0; width: 30px; height: 2px; background: var(--accent); }
.footer-col p { line-height: 1.8; opacity: 0.8; font-size: 0.95rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #fff; opacity: 0.7; transition: 0.3s; }
.footer-col ul li a:hover { opacity: 1; padding-right: 5px; color: var(--accent); }
.social-links { display: flex; gap: 15px; }
.social-links a { width: 40px; height: 40px; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-size: 1.2rem; transition: 0.3s; }
.social-links a:hover { background: var(--accent); transform: translateY(-3px); }
.footer-bottom { text-align: center; opacity: 0.6; font-size: 0.9rem; }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-col h3::after { right: 50%; transform: translateX(50%); }
    .social-links { justify-content: center; }
}
.footer-logo { font-size: 2rem; font-weight: 900; margin-bottom: 20px; }

@media (max-width: 992px) {
    .main-layout { grid-template-columns: 1fr; }
    .hero-slider { height: 300px; }
}
