/* /usr/local/www/alnatik/public_html/style.css */

:root {
    --primary: #003366;    /* Deep Alnatik Blue */
    --accent: #004a99;
    --text: #333333;
    --light: #f4f4f4;
    --white: #ffffff;
    --border: #dddddd;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    direction: rtl;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Header & Nav --- */
header {
    background: var(--primary);
    color: var(--white);
    padding: 20px 0;
    text-align: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

nav {
    background: var(--accent);
    padding: 10px 0;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

nav li a {
    padding: 10px 15px;
    display: block;
    font-weight: bold;
    font-size: 0.9rem;
    color: #FFF;
    font-weight: 300;
}
/* --- Hero Section & 80/20 Layout --- */
.hero-section {
    margin-top: 20px;
    margin-bottom: 30px;
}
.hero-row {
    display: flex;
    gap: 20px;
    align-items: stretch;
}/* --- Hero Side Panel (30%) --- */
.hero-side {
    width: 30%;
    background-color: #000000;
    border: 1px dashed #00ff00;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 400px;
}

.side-panel p {
    color: #00ff00;
    font-family: monospace, sans-serif;
    font-size: 1.2rem;
    margin: 0;
}

.side-panel span {
    opacity: 0.6;
    font-size: 0.9rem;
}

/* Ensure mobile stacking still applies */
@media (max-width: 992px) {
    .hero-side { 
        width: 100%; 
        min-height: 250px; 
    }
}
.hero-slider {
    width: 68%; /* Changed from 80% */
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    background: #000;
    min-height: 400px;
}
.slider-container {
    width: 100%;
    height: 100%;
    position: absolute;
}
.hero-ad {
    width: 28%; /* Changed from 20% */
    background: #f4f4f4;
    border: 1px dashed #ccc;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #888;
    min-height: 400px;
}
.hero-side {
    width: 30%;
    background: #f4f4f4;
    border: 1px dashed #ccc;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #888;
    min-height: 400px;
}
/* --- Pure CSS Slider Animation (5 Slides = 25s Total) --- */
/* --- Vanilla Slider Mechanics --- */
.slide {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    /* Default to visible so it never stays black if animation fails */
    opacity: 1; 
    z-index: 1;
    animation: cssFade 25s infinite; 
}

/* Hide all slides by default EXCEPT the first one before animation kicks in */
.slide:not(:first-child) {
    opacity: 0;
}

@keyframes cssFade {
    0%   { opacity: 0; z-index: 2; }
    4%   { opacity: 1; z-index: 2; }
    16%  { opacity: 1; z-index: 2; }
    20%  { opacity: 0; z-index: 1; }
    100% { opacity: 0; z-index: 1; }
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.65;
}
.slide-caption {
    position: absolute;
    bottom: 30px;
    right: 30px;
    left: 30px;
    color: #fff;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.9);
}
.slide-caption a {
    color: #fff;
    text-decoration: none;
    font-size: 1.8rem;
    line-height: 1.4;
}
.slide-caption a:hover {
    text-decoration: underline;
}
.category-badge {
    background: #d32f2f;
    color: #fff;
    padding: 4px 10px;
    font-size: 0.9rem;
    border-radius: 3px;
    margin-bottom: 12px;
    display: inline-block;
    font-weight: bold;
}
/* --- Most Read (J-1) Widget --- */
.popular-widget {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.category-title {
    font-size: 1.4rem;
    color: #111;

    margin-bottom: 20px;
}
nav.breadcrumb {
    background: transparent;
}
nav.breadcrumb a {
    color: var(--primary);
}

.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.popular-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.rank-number {
    font-size: 2.2rem;
    font-weight: 900;
    color: #f4f4f4; /* Very light gray so it doesn't distract from the image */
    -webkit-text-stroke: 1px #ccc; /* Gives it an outline effect */
    min-width: 35px;
    text-align: center;
    font-family: sans-serif;
}

.popular-thumb img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
}

.popular-info a {
    color: #222;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limits title to 3 lines max */
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.popular-info a:hover {
    color: #d32f2f;
}
/* --- Mobile Responsiveness --- */
@media (max-width: 992px) {
.hero-row { flex-direction: column; }
    .hero-slider, .hero-side { width: 100%; }
    .hero-slider { min-height: 350px; }
    .hero-side { min-height: 250px; }
}
/* --- Layout Grids --- */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px; /* Sidebar is fixed 300px */
    gap: 30px;
    margin-top: 30px;
}

.category-block {
    margin-bottom: 40px;
}
.popular-thumb img {
    width: 100%;
    height: auto;
}
.category-title {
    border-bottom: 3px solid var(--primary);
    margin-bottom: 20px;
    padding-bottom: 5px;
    display: inline-block;
}
/* --- Sidebar Vertical Block --- */
/* --- Sidebar Vertical Placeholder --- */
.sidebar-testing-space {
    margin-top: 30px;
    background-color: #000000;
    border: 1px dashed #00ff00;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 598px; /* Breaks heuristic adblock rules */
}

.dev-filler p {
    color: #00ff00;
    font-family: monospace, sans-serif;
    font-size: 1.2rem;
    margin: 0;
}
.sidebar-box {
    margin-top: 30px;
    background-color: #000000;
    border: 1px dashed #00ff00;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 600px; 
}

.dev-placeholder-vertical p {
    color: #00ff00;
    font-family: monospace, sans-serif;
    font-size: 1.2rem;
    margin: 0;
}

.dev-placeholder-vertical span {
    opacity: 0.6;
    font-size: 0.9rem;
}
/* 2x2 Grid for Categories */
.grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.card {
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 15px;
}

/* Line Clamping for Titles */
.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.2em; /* Ensures fixed height even if 1 line */
}

.card-meta {
    font-size: 0.8rem;
    color: #777;
}

/* --- Article Page Specifics --- */
.article-container {
    display: grid;
    grid-template-columns: 80% 20%;
    gap: 20px;
}

.article-hero {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    margin-bottom: 20px;
}

.article-body {
    font-size: 1.2rem;
    text-align: justify;
}

.adsense-sidebar {
    background: var(--light);
    min-height: 600px;
    border: 1px dashed var(--border);
}

/* --- Footer --- */
footer {
    margin-top: 50px;
    padding: 40px 0;
    background: var(--light);
    text-align: center;
    border-top: 1px solid var(--border);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .main-layout, .grid-2x2, .article-container {
        grid-template-columns: 1fr;
    }
    .logo { font-size: 1.8rem; }
}
/* --- 4-Column Grid for Category Pages --- */
.category_page .grid-4-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .category_page  .grid-4-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .category_page  .grid-4-cols {
        grid-template-columns: 1fr;
    }
}
.card {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
/* Ensure the article page uses the same 2-column split as home */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px; /* 300px for sidebar, rest for content */
    gap: 30px;
}

@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr; /* Stack on mobile */
    }
}

.article-body {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden; /* Prevents long links from breaking the box */
}

.entry-content {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #222;
}

.entry-content a {
    color: #0056b3;
    text-decoration: underline;
    word-break: break-all; /* Important: stops long URLs from pushing the sidebar off-screen */
}

.entry-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}