/*
Theme Name: Haytham Heritage (Arabic RTL)
Author: Haytham
Description: Arabic-first RTL WordPress theme converted from uploaded static site.
Version: 2.0
Text Domain: haytham-heritage
*/

/* ===== Global RTL Layout ===== */
html { direction: rtl; }
body {
    background:#f7f7f7;
    direction: rtl;
    text-align: right;
    font-family: "Tajawal", "Amiri",  sans-serif;
	line-height: 1.85;
    margin:0;
    padding:0;
}

/* ===== Homepage Full Width ===== */
body.home .site,
body.home .site-main,
body.home .content-area,
body.home .entry-content,
body.home #primary {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===== Banner/Header ===== */
.site-banner {
    background: linear-gradient(to right, #082032, #2C394B);
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    border-bottom: 4px solid #F6C90E;
}
.site-banner .site-title {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.site-banner .site-title a { color:#fff; text-decoration:none; }
.site-banner .site-tagline {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 500;
}
/* RTL Comments */
.comment-body {
  text-align:right;
}
.comment-author {
  font-weight:bold;
  color:#082032;
}
/* === Menu Gold Underline Hover + Active Style === */
.nav-menu a {
    position: relative;
    padding-bottom: 4px;
	text-transform: capitalize;
}

.nav-menu a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 3px;
    background-color: #F6C90E;
    transition: width .3s ease;
    border-radius: 2px;
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item a::after,
.nav-menu .current_page_item a::after {
    width: 100%;
}

/* ===== Navigation ===== */
.nav-menu {
    list-style:none;
    display:flex;
    gap:22px;
    justify-content:center;
    padding:12px 0;
    margin:0;
    flex-wrap:wrap;
    background:#e8eef3;
}
.nav-menu li { display:inline-block; }

.home .nav-menu li:first-child { 
	display: none; 
}
.nav-menu a {
    text-decoration:none;
    color:#0f2f4a;
    font-weight:600;
    font-size:18px;
}
.nav-menu a:hover { opacity:.75; }

/* Highlight active menu item */
.nav-menu .current-menu-item a {
  font-weight:800;
  border-bottom:3px solid #F6C90E;
}
/* ===== Footer ===== */
.site-footer {
    background:#082032;
    color:#fff;
    text-align:center;
    padding:35px 15px;
    font-size:16px;
	pointer-events: none;
	font-weight: 800;
	opacity: .6;
    border-top: 4px solid #F6C90E;
	border-bottom: 2px solid #F6C90E;
    margin-top:30px;
}
.site-footer a { color:#F6C90E; text-decoration:none; }

/* ===== Homepage Section ===== */
.home-sections {
    padding-top:40px;
	padding-bottom: 40px;
}

.home-sections h2,
.entry-title {
	font-size: 26px;
    font-weight:800;
	color: #082032;
	border-right: 5px solid #F6C90E;
    padding-right:10px;
	margin-bottom: 25px;
}
/* ===== Homepage Grid ===== */
.home-grid {
    display:grid !important;
    grid-template-columns: repeat(3,1fr) !important;
    gap:40px !important;
    width:100% !important;
    max-width:1200px !important;
    margin:0 auto !important;
    padding: 30px 20px !important;
}

/* ===== Card Container ===== */
.home-card {
	cursor: pointer;
    background:#fff;
    border:1px solid rgba(8, 32, 50, 0.12);
    border-radius:12px;
    box-shadow:0 2px 10px rgba(0,0,0,.12);
    width:100% !important;
    padding:20px !important;
    text-align:center;
    transition: all .25s ease;
}
.home-card:hover {
 	transform: translateY(-8px);
	border-color: #F6C90E;
	box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
/* ===== Small Image on Homepage Card ===== */
.home-card img {
    width:160px !important;
    height:160px !important;
    object-fit:cover;
    border-radius:12px;
    margin: 0 auto 16px auto;
    display:block;
    border:2px solid #ccc;
}

/* ===== Card Title ===== */
.home-card-content h3 {
    font-size:20px;
    font-weight:700;
    color:#082032;
    margin-bottom:8px;
}

/* ===== Card Paragraph ===== */
.home-card-content {
    text-align:center;
}

.home-card a.read-more {
    pointer-events: auto;
}

.home-card * {
    pointer-events: none;
}

.home-card a {
    pointer-events: auto;
}
.home-card-content p {
    font-size:15px;
    line-height:1.7;
    color:#333;
    margin-bottom:12px;
}
 h1, h2, h3, h4 {
	font-family: 'Tajawal', sans-serif;
	font-weight: 700;
}
p {
	font-size: 17px;
}
/* ===== Read More Button ===== */
.read-more {
    display:inline-block;
    padding:8px 14px;
    background:#082032;
    color:#fff !important;
    border-radius:8px;
    text-decoration:none;
    transition:background .2s ease, transform .2s ease;
    font-size:14px;
}
.read-more:hover {
    background:#F6C90E;
    color:#082032 !important;
    transform:translateY(-3px);
}

/* Hover lift effect */
.home-card:hover {
    transform:translateY(-6px);
    box-shadow:0 6px 16px rgba(0,0,0,.18);
}
/* ===== Single Post Content Images (Half Width) ===== */
.post img,
.entry-content img,
.wp-block-image img,
img[class*="wp-image"],
figure img {
    width:50% !important;
    max-width:450px !important;
    min-width:260px !important;
    height:auto !important;
    margin:0 auto 20px auto !important;
    display:block !important;
    object-fit:contain !important;
}

/* Default image safety */
img { max-width:100%; height:auto; }

/* Block images center */
.wp-block-image,
figure.wp-block-image { text-align:center !important; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .home-grid {
        grid-template-columns:1fr !important;
        gap:22px !important;
        padding: 15px !important;
    }
    .home-card img { height:140px !important; width:140px !important; }
	.nav-menu { gap: 12px;}
}

.entry-content {
	  font-size: 19px;
	  line-height: 2.1;
	  letter-spacing: 0.2px;
	  word-spacing: 2px;
}
/* === FORCE HOMEPAGE TO BE FULL WIDTH === */
body.home .site,
body.home .site-main,
body.home .content-area,
body.home .entry-content,
body.home .page,
body.home #primary,
body.home #main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* === FORCE 3-COLUMN HOMEPAGE GRID === */
body.home .home-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px 40px !important;
}

/* === Make each card fill its column === */
body.home .home-card {
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}
.separator {
	width: 60px;
    height: 4px;
    background:#F6C90E;
    margin: 25px auto;
    border-radius: 2px;
}