/* 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 !important; background: var(--bg); color: var(--text-dark); line-height: 1.7; }
input, button, select, textarea, a { font-family: 'Vazirmatn', sans-serif !important; }

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: 10px 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; min-height: 80px; }
.header-right { display: flex; align-items: center; gap: 20px; }
.header-left { display: flex; align-items: center; gap: 15px; }

.logo-box h1 { font-size: 1.8rem; font-weight: 900; color: #fff; margin: 0; }
.logo-box span { color: #ffd580; }
.site-logo { height: 80px; width: auto; max-width: 100%; object-fit: contain; display: block; }

/* Search in Header */
.search-box-header { position: relative; }
.search-box-header input { padding: 10px 15px 10px 45px; border-radius: 25px; border: none; background: rgba(255,255,255,0.15); color: white; width: 250px; outline: none; transition: 0.3s; }
.search-box-header input::placeholder { color: rgba(255,255,255,0.6); }
.search-box-header input:focus { background: white; color: #333; width: 300px; }
.search-box-header button { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: white; cursor: pointer; }
.search-box-header input:focus + button { color: #333; }

/* Menu & Hamburger */
.menu-btn { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 8px 20px; border-radius: 25px; color: white; transition: 0.3s; }
.menu-btn:hover { background: rgba(255,255,255,0.2); }
.menu-text { font-weight: bold; font-size: 0.9rem; }

.ham-box { width: 20px; height: 14px; position: relative; }
.ham-inner, .ham-inner::before, .ham-inner::after { width: 20px; height: 2px; background: white; border-radius: 2px; position: absolute; transition: 0.3s; }
.ham-inner { top: 50%; transform: translateY(-50%); }
.ham-inner::before { content: ""; top: -6px; }
.ham-inner::after { content: ""; bottom: -6px; }

.whats-new-btn { background: #e87d2f; color: white; border: none; padding: 8px 22px; border-radius: 25px; font-weight: bold; font-size: 0.85rem; cursor: pointer; box-shadow: 0 4px 10px rgba(232,125,47,0.3); transition: 0.3s; display: flex; align-items: center; gap: 8px; animation: pulse-orange 2s infinite; }
.whats-new-btn:hover { background: white; color: #e87d2f; transform: scale(1.05); }

@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(232,125,47, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(232,125,47, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232,125,47, 0); }
}

/* Side Menu */
.side-menu { position: fixed; top: 0; right: -100%; width: 100%; height: 100%; z-index: 2000; transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1); pointer-events: none; }
.side-menu.active { right: 0; pointer-events: all; }
.side-menu-overlay { position: absolute; top: 0; right: 0; width: 100%; height: 100%; background: rgba(7, 16, 46, 0.6); backdrop-filter: blur(5px); opacity: 0; transition: 0.5s; }
.side-menu.active .side-menu-overlay { opacity: 1; }
.side-menu-content { position: absolute; top: 0; right: -450px; width: 450px; height: 100%; background: white; box-shadow: -10px 0 30px rgba(0,0,0,0.1); transition: 0.5s; display: flex; flex-direction: column; }
.side-menu.active .side-menu-content { right: 0; }

.side-menu-header { padding: 30px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.side-logo { font-size: 1.5rem; font-weight: 900; color: var(--primary); }
.menu-close { background: none; border: none; font-size: 1.5rem; color: #888; cursor: pointer; transition: 0.3s; }
.menu-close:hover { color: var(--accent); transform: rotate(90deg); }

.side-nav { list-style: none; padding: 20px 0; margin: 0; flex: 1; overflow-y: auto; text-align: right; display: grid; grid-template-columns: 1fr 1fr; }
.side-nav li { border-bottom: 1px solid #f9f9f9; }
.side-nav li a { display: flex; align-items: center; gap: 12px; padding: 15px 30px; color: #444; text-decoration: none; font-weight: 600; transition: 0.3s; font-size: 0.95rem; }
.side-nav li a:hover { background: #f8faff; color: var(--accent); padding-right: 40px; }
.side-nav li i { color: var(--primary); width: 20px; text-align: center; font-size: 1.1rem; opacity: 0.7; }
.side-nav li.full-width { grid-column: span 2; background: #f4f6f8; }
.side-menu-footer { padding: 30px; border-top: 1px solid #f0f0f0; font-size: 0.8rem; color: #888; }

/* What's New Panel */
.whats-new-panel { position: fixed; top: 120px; left: -450px; width: 400px; background: white; z-index: 1500; border-radius: 0 15px 15px 0; box-shadow: 10px 10px 40px rgba(0,0,0,0.2); transition: 0.5s; overflow: hidden; }
.whats-new-panel.active { left: 0; }
.wn-header { background: #e87d2f; color: white; padding: 18px 25px; display: flex; justify-content: space-between; align-items: center; }
.wn-header h4 { margin: 0; font-size: 1rem; font-weight: 900; }
.wn-header button { background: none; border: none; color: white; cursor: pointer; font-size: 1.2rem; }
.wn-body { padding: 25px; max-height: 500px; overflow-y: auto; text-align: right; }
.wn-item { margin-bottom: 25px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.wn-item:last-child { border-bottom: none; }
.wn-item h5 { margin: 0 0 10px; color: var(--primary); font-size: 1rem; font-weight: bold; }
.wn-item p { font-size: 0.9rem; line-height: 1.8; color: #555; margin-bottom: 12px; }
.wn-item a { color: #e87d2f; font-size: 0.85rem; font-weight: bold; text-decoration: none; border-bottom: 1px dashed; }

/* Article Layout */
.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.85)); width: 100%; padding: 40px; color: white; text-align: right; }
.slide-title { font-size: 2rem; font-weight: bold; margin-bottom: 10px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

@keyframes sliderFade {
    0%, 20% { opacity: 1; z-index: 10; }
    25%, 100% { opacity: 0; z-index: 0; }
}

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

/* Boxes */
.cat-box { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid #eee; margin-bottom: 30px; }
.cat-head { background: var(--primary); color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; font-weight: bold; }

.sidebar-box { background: var(--white); border-radius: var(--radius); padding: 25px; box-shadow: var(--shadow); border-top: 4px solid var(--accent); margin-bottom: 30px; }
.sidebar-box h3 { font-size: 1.15rem; margin-bottom: 20px; color: var(--primary); border-bottom: 2px solid #f0f0f0; padding-bottom: 12px; font-weight: 900; text-align: right; }

.news-item { display: flex; flex-direction: column; gap: 5px; margin-bottom: 15px; padding: 0 15px 12px 15px; border-bottom: 1px dashed #eee; align-items: flex-start; text-align: right; }
.news-item:last-child { border-bottom: none; }
.news-item a { font-size: 0.95rem; font-weight: 500; line-height: 1.5; color: #333; }
.news-item a:hover { color: var(--accent); }

/* Reactions */
.article-reactions { display: flex; gap: 15px; margin: 30px 0; padding: 20px; background: #f8faff; border-radius: 12px; align-items: center; justify-content: center; }
.reaction-btn { background: white; border: 1px solid #e1e8f5; padding: 10px 25px; border-radius: 25px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: 0.3s; font-size: 1rem; font-weight: bold; }
.reaction-btn:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.reaction-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.reaction-btn.btn-like i { color: #2ecc71; }
.reaction-btn.btn-dislike i { color: #e74c3c; }
.reaction-btn.active i { color: white !important; }

/* Footer */
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.3rem; margin-bottom: 25px; color: var(--accent); position: relative; padding-bottom: 10px; text-align: right; font-weight: 900; }
.footer-col h3::after { content: ''; position: absolute; right: 0; bottom: 0; width: 40px; height: 3px; background: var(--accent); }
.footer-col p { line-height: 2; opacity: 0.8; font-size: 0.95rem; text-align: right; }
.footer-col ul { list-style: none; padding: 0; text-align: right; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: #fff; opacity: 0.8; font-size: 0.95rem; }
.footer-col ul li a:hover { color: var(--accent); opacity: 1; padding-right: 8px; }
.social-links { display: flex; gap: 15px; justify-content: flex-end; }
.social-links a { width: 45px; height: 45px; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-size: 1.3rem; transition: 0.3s; }
.social-links a:hover { background: var(--accent); transform: translateY(-5px); }

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

@media (max-width: 768px) {
    .header-flex { height: 70px; min-height: 70px; }
    .site-logo { height: 50px; }
    .menu-text { display: none; }
    .whats-new-panel { width: 95%; top: 90px; border-radius: 0; }
    .side-menu-content { width: 100%; }
    .side-nav { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-col h3, .footer-col p, .footer-col ul { text-align: center; }
    .footer-col h3::after { right: 50%; transform: translateX(50%); }
    .social-links { justify-content: center; }
    .search-box-header { display: none; }
}
