/*
Theme Name: חדשות היום
Theme URI: https://example.com/hadashot-hayom
Author: BPC
Author URI: https://example.com
Description: תבנית וורדפרס מודרנית בעברית לאתר חדשות בעיצוב Google Stitch נקי ומקצועי. תמיכה מלאה ב-RTL, תפריט נגישות מובנה, תבניות מותאמות לעמוד ראשי, קטגוריות ופוסטים.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hadashot-hayom
Tags: rtl-language-support, right-to-left, news, blog, custom-menu, featured-images, accessibility-ready
*/

/* =============================================
   1. RESET & BASE LAYOUT
   ============================================= */
*, ::before, ::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: 'Rubik', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: #fbf8ff;
    color: #181a2e;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    direction: rtl;
    text-align: right;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font: inherit;
}

/* =============================================
   2. STITCH CONTAINER & SPACING TOKENS
   ============================================= */
.max-w-container-max {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.px-gutter {
    padding-left: 24px;
    padding-right: 24px;
}

.py-section-gap {
    padding-top: 48px;
    padding-bottom: 48px;
}

.my-section-gap {
    margin-top: 48px;
    margin-bottom: 48px;
}

.mt-section-gap {
    margin-top: 48px;
}

.mb-section-gap {
    margin-bottom: 48px;
}

.py-stack-sm {
    padding-top: 12px;
    padding-bottom: 12px;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pt-6 { padding-top: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

/* =============================================
   3. FLEXBOX & GRID SYSTEM
   ============================================= */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow { flex-grow: 1; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-stretch { align-items: stretch; }

.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-stack-sm { gap: 12px; }
.gap-stack-md { gap: 24px; }

/* Grid Layouts */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-x-gutter { column-gap: 24px; }
.gap-y-8 { row-gap: 2rem; }
.gap-y-12 { row-gap: 3rem; }

@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row; }
    .md\:flex-row-reverse { flex-direction: row-reverse; }
    .md\:block { display: block !important; }
    .md\:hidden { display: none !important; }
    .md\:inline { display: inline !important; }
    
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    
    .md\:col-span-8 { grid-column: span 8 / span 8; }
    .md\:col-span-4 { grid-column: span 4 / span 4; }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
    
    .md\:text-right { text-align: right; }
    .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
    .md\:p-8 { padding: 2rem; }
}

@media (min-width: 1024px) {
    .lg\:block { display: block !important; }
    .lg\:hidden { display: none !important; }
    .lg\:w-52 { width: 13rem; }
}

/* =============================================
   4. COLOR SYSTEM & BACKGROUNDS
   ============================================= */
.bg-surface { background-color: #fbf8ff; }
.bg-surface-dim { background-color: #d7d8f4; }
.bg-surface-container { background-color: #edecff; }
.bg-surface-container-low { background-color: #f4f2ff; }
.bg-surface-container-lowest { background-color: #ffffff; }
.bg-surface-container-high { background-color: #e6e6ff; }
.bg-surface-container-highest { background-color: #e0e0fc; }

.bg-primary { background-color: #003453; }
.bg-primary-container { background-color: #1a4b6e; }
.bg-secondary { background-color: #b7102a; }
.bg-secondary-container { background-color: #db313f; }
.bg-tertiary { background-color: #003832; }
.bg-surface-tint { background-color: #356286; }

.text-primary { color: #003453; }
.text-primary-container { color: #1a4b6e; }
.text-on-primary { color: #ffffff; }
.text-on-primary-container { color: #8fbbe3; }
.text-primary-fixed { color: #cde5ff; }

.text-secondary { color: #b7102a; }
.text-on-secondary { color: #ffffff; }

.text-on-surface { color: #181a2e; }
.text-on-surface-variant { color: #42474e; }
.text-on-tertiary { color: #ffffff; }
.text-white { color: #ffffff; }

/* Gradients */
.bg-gradient-to-t {
    background-image: linear-gradient(to top, rgba(45, 47, 68, 0.9) 0%, rgba(45, 47, 68, 0.4) 50%, transparent 100%);
}
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, #003453, #1a4b6e, #003832);
}
.bg-gradient-to-r {
    background-image: linear-gradient(to right, #003453, #1a4b6e, #356286);
}

/* =============================================
   5. TYPOGRAPHY & FONT TOKENS
   ============================================= */
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.font-display-lg { font-size: 48px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
.font-display-lg-mobile { font-size: 32px; line-height: 1.2; font-weight: 700; }
.font-headline-md { font-size: 24px; line-height: 1.3; font-weight: 600; }
.font-headline-sm { font-size: 20px; line-height: 1.4; font-weight: 600; }
.font-body-lg { font-size: 18px; line-height: 1.6; font-weight: 400; }
.font-body-md { font-size: 16px; line-height: 1.5; font-weight: 400; }
.font-label-caps { font-size: 12px; line-height: 1.2; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-7xl { font-size: 4.5rem; line-height: 1; }
.text-8xl { font-size: 6rem; line-height: 1; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================
   6. BORDERS & SHAPES
   ============================================= */
.border { border: 1px solid #c2c7cf; }
.border-b { border-bottom: 1px solid #c2c7cf; }
.border-b-2 { border-bottom: 2px solid #003453; }
.border-t { border-top: 1px solid #c2c7cf; }

.border-outline-variant { border-color: #c2c7cf; }
.border-primary { border-color: #003453; }

.rounded { border-radius: 0.125rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }

/* Custom Logo in Header */
.custom-logo-link {
    display: inline-flex;
    align-items: center;
    max-height: 52px;
}
.custom-logo {
    max-height: 52px;
    max-width: 240px;
    height: auto;
    width: auto;
    object-fit: contain;
}

/* =============================================
   7. DIMENSIONS & ASPECT RATIOS
   ============================================= */
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-8 { width: 2rem; }
.h-1 { height: 0.25rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }
.w-44 { width: 11rem; }
.w-48 { width: 12rem; }
.w-52 { width: 13rem; }

.aspect-\[16\/9\], .aspect-16-9 { aspect-ratio: 16 / 9; width: 100%; }
.aspect-\[4\/3\], .aspect-4-3 { aspect-ratio: 4 / 3; width: 100%; }
.aspect-video { aspect-ratio: 16 / 9; width: 100%; }

.object-cover { object-fit: cover; }
.overflow-hidden { overflow: hidden; }

.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.bottom-0 { bottom: 0; }
.right-0 { right: 0; }
.left-0 { left: 0; }

.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }

/* =============================================
   8. HOVER & ANIMATIONS
   ============================================= */
.transition-all { transition: all 0.2s ease; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.transition-transform { transition: transform 0.3s ease; }
.scale-95 { transform: scale(0.95); }

.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group:hover .group-hover\:text-primary { color: #003453; }
.group:hover.-translate-y-1 { transform: translateY(-4px); }

.hover\:bg-primary-container:hover { background-color: #1a4b6e; }
.hover\:bg-surface-container:hover { background-color: #edecff; }
.hover\:opacity-90:hover { opacity: 0.9; }
.hover\:underline:hover { text-decoration: underline; }

/* =============================================
   9. PROSE & ARTICLE TYPOGRAPHY
   ============================================= */
.prose {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #181a2e;
}
.prose p {
    margin-bottom: 1.5rem;
}
.prose h1 {
    font-size: 2.25rem;
    line-height: 1.25;
    font-weight: 800;
    color: #003453;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}
.prose h2 {
    font-size: 1.75rem;
    line-height: 1.35;
    font-weight: 700;
    color: #003453;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #edecff;
    padding-bottom: 0.5rem;
}
.prose h3 {
    font-size: 1.35rem;
    line-height: 1.4;
    font-weight: 700;
    color: #003453;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.prose h4 {
    font-size: 1.15rem;
    line-height: 1.45;
    font-weight: 600;
    color: #003453;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.prose a {
    color: #003453;
    font-weight: 700;
    background-color: #edecff;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    border-bottom: 2px solid #003453;
    text-decoration: none;
    transition: all 0.15s ease;
    display: inline-block;
    margin: 0 0.1rem;
}
.prose a:hover {
    background-color: #003453;
    color: #ffffff;
    border-bottom-color: #003453;
    text-decoration: none;
}
.prose blockquote {
    border-right: 4px solid #003453;
    padding-right: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    background-color: #f4f2ff;
    padding: 1.25rem 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
    color: #1a4b6e;
    font-size: 1.15rem;
}

/* Reading Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #003453, #356286);
    width: 0%;
    z-index: 100;
    transition: width 0.1s ease-out;
}

/* =============================================
   10. MOBILE MENU PANEL
   ============================================= */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100%;
    background: #fbf8ff;
    z-index: 100;
    transition: right 0.3s ease;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
    overflow-y: auto;
}
.mobile-menu-panel.active {
    right: 0;
}
.mobile-menu-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mobile-menu-panel .menu-item a {
    display: block;
    padding: 0.85rem 0;
    color: #181a2e;
    font-size: 1.125rem;
    font-weight: 500;
    border-bottom: 1px solid #c2c7cf;
    text-decoration: none;
}

/* =============================================
   11. NAVIGATION & MENU STYLING (DESKTOP & MOBILE)
   ============================================= */
.desktop-nav {
    display: flex;
    align-items: center;
}

.nav-menu-list {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu-list li, .nav-item {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-block;
}

.nav-menu-list li a, .nav-link {
    color: #42474e;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    padding: 0.25rem 0;
    transition: color 0.15s ease, border-color 0.15s ease;
    display: inline-block;
}

.nav-menu-list li a:hover, .nav-link:hover {
    color: #003453;
}

.nav-menu-list li.current-menu-item a,
.nav-menu-list li.current-post-ancestor a,
.nav-menu-list li.current-menu-parent a,
.nav-link.active {
    color: #003453;
    font-weight: 700;
    border-bottom: 2px solid #003453;
}

/* Mobile Toggle Button */
.mobile-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: #003453;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 767px) {
    .desktop-nav {
        display: none !important;
    }
    .mobile-toggle-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex !important;
    }
    .mobile-toggle-btn {
        display: none !important;
    }
}
