/* ==============================================
   Shay Har-Zvi Child Theme — custom.css v3
   Aggressive !important overrides for Elementor
   ============================================== */

/* ---- Global direction & fonts ---- */
html, body {
    direction: rtl !important;
    text-align: right !important;
}

body, p, li, td, th,
.elementor-widget-text-editor,
.elementor-text-editor,
.elementor-widget-text-editor p {
    font-family: 'Heebo', sans-serif !important;
    font-size: 16px;
    line-height: 1.7;
    color: #1A1A1A;
}

h1, h2, h3, h4, h5, h6,
.elementor-heading-title,
.elementor-widget-heading .elementor-heading-title {
    font-family: 'Frank Ruhl Libre', serif !important;
    direction: rtl !important;
    text-align: right !important;
}

/* ---- Header / Navigation ---- */
header,
.site-header,
#site-header,
.elementor-location-header,
nav,
.elementor-nav-menu,
.e-n-menu,
[data-elementor-type="header"],
[data-elementor-type="header"] .elementor-section,
[data-elementor-type="header"] .e-con,
[data-elementor-type="header"] .elementor-container {
    background-color: #0C1B2E !important;
    border-bottom: 1px solid #1A3550 !important;
}

/* Sticky header */
[data-elementor-type="header"] {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    width: 100% !important;
}

/* Nav links */
.elementor-nav-menu a,
.elementor-nav-menu--main .elementor-item,
.e-n-menu-item a,
.e-n-menu-item-title,
[data-elementor-type="header"] a,
[data-elementor-type="header"] .elementor-item {
    color: #E8EFF6 !important;
    font-family: 'Heebo', sans-serif !important;
    font-weight: 400 !important;
    transition: color 0.25s ease !important;
}

[data-elementor-type="header"] a:hover,
.elementor-nav-menu--main .elementor-item:hover,
.elementor-nav-menu--main .elementor-item:focus,
.elementor-nav-menu--main .elementor-item.elementor-item-active,
.e-n-menu-item a:hover,
.e-n-menu-item-title:hover {
    color: #C9A84C !important;
}

/* Mobile hamburger */
.elementor-menu-toggle,
.elementor-menu-toggle i,
[data-elementor-type="header"] .elementor-menu-toggle {
    color: #E8EFF6 !important;
}

/* Mobile dropdown */
.elementor-nav-menu--dropdown,
.elementor-nav-menu--dropdown .elementor-item,
.e-n-menu--dropdown {
    background-color: #0C1B2E !important;
}

.elementor-nav-menu--dropdown a,
.elementor-nav-menu--dropdown .elementor-item,
.e-n-menu--dropdown a {
    color: #E8EFF6 !important;
}

/* ---- Hero / First Section ---- */
[data-elementor-type="single"] .elementor-section:first-of-type,
[data-elementor-type="single"] .e-con:first-of-type,
.elementor-section.elementor-section-boxed:first-child,
body > .elementor > .elementor-section:first-child,
body > .elementor > .e-con:first-child {
    background-color: #0C1B2E !important;
}

/* Hero H1 */
[data-elementor-type="single"] h1,
.elementor-widget-heading h1,
.elementor-heading-title.elementor-size-xxl,
.elementor-heading-title.elementor-size-xl {
    font-family: 'Frank Ruhl Libre', serif !important;
    font-weight: 700 !important;
    color: #E8EFF6 !important;
}

/* Gold line under XXL/XL headings */
.elementor-heading-title.elementor-size-xxl::after,
.elementor-heading-title.elementor-size-xl::after {
    content: '';
    display: block;
    margin-top: 14px;
    width: 60px;
    height: 3px;
    background-color: #C9A84C;
    margin-right: 0;
}

/* Hero H2 / subtitle */
.elementor-widget-heading h2,
.elementor-heading-title.elementor-size-large {
    font-family: 'Heebo', sans-serif !important;
    font-weight: 300 !important;
    color: #8BA7C4 !important;
}

/* Large heading on dark backgrounds inherits light color */
.elementor-section[data-settings*="\"background_color\":\"#0C1B2E\""] .elementor-heading-title,
.elementor-section[data-settings*="\"background_color\":\"#1A3550\""] .elementor-heading-title,
.e-con[data-settings*="\"background_color\":\"#0C1B2E\""] .elementor-heading-title {
    color: #E8EFF6 !important;
}

/* ---- Buttons ---- */
.elementor-button,
.elementor-button-wrapper a,
.elementor-button-wrapper .elementor-button,
a.elementor-button,
button.elementor-button,
.elementor-button-link {
    background-color: #C9A84C !important;
    color: #0C1B2E !important;
    font-family: 'Heebo', sans-serif !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 4px !important;
    transition: background-color 0.25s ease, transform 0.15s ease !important;
}

.elementor-button:hover,
.elementor-button-wrapper a:hover,
a.elementor-button:hover,
button.elementor-button:hover,
.elementor-button-link:hover {
    background-color: #B8962E !important;
    color: #0C1B2E !important;
    transform: translateY(-1px) !important;
}

/* Secondary button — outline style */
.elementor-button.e-btn-custom-secondary,
.elementor-button[class*="button-secondary"] {
    background-color: transparent !important;
    border: 1px solid #8BA7C4 !important;
    color: #E8EFF6 !important;
}

.elementor-button.e-btn-custom-secondary:hover {
    background-color: rgba(139, 167, 196, 0.1) !important;
    color: #E8EFF6 !important;
}

/* ---- Lecture / Topic Cards ---- */
.elementor-posts-container .elementor-post,
.elementor-widget-posts .elementor-post,
.elementor-widget-image-box .elementor-image-box-wrapper,
.e-loop-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-bottom 0.3s ease;
}

.elementor-posts-container .elementor-post:hover,
.elementor-widget-posts .elementor-post:hover,
.elementor-widget-image-box:hover .elementor-image-box-wrapper,
.e-loop-item:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3) !important;
    border-bottom: 3px solid #C9A84C !important;
}

/* Card title */
.elementor-post__title,
.elementor-post__title a,
.elementor-image-box-title {
    font-family: 'Frank Ruhl Libre', serif !important;
    color: #E8EFF6 !important;
}

/* Card excerpt */
.elementor-post__excerpt p {
    font-family: 'Heebo', sans-serif !important;
    color: #8BA7C4 !important;
}

/* ---- Contact Section ---- */
[data-elementor-type="footer"] ~ section,
.elementor-widget-form .elementor-field-group input,
.elementor-widget-form .elementor-field-group textarea,
.elementor-widget-form .elementor-field-group select,
.elementor-form .elementor-field-group .elementor-field,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
    background-color: #1A3550 !important;
    border: 1px solid #2A4D6E !important;
    color: #E8EFF6 !important;
    font-family: 'Heebo', sans-serif !important;
    border-radius: 4px !important;
    direction: rtl !important;
}

.elementor-form .elementor-field-group .elementor-field::placeholder,
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
    color: #8BA7C4 !important;
    opacity: 1 !important;
}

.elementor-form .elementor-field-group .elementor-field:focus,
.wpcf7 input:focus,
.wpcf7 textarea:focus {
    border-color: #C9A84C !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.2) !important;
}

.elementor-form .elementor-field-label,
.wpcf7 label {
    color: #8BA7C4 !important;
    font-family: 'Heebo', sans-serif !important;
    font-weight: 400 !important;
}

/* Contact form submit */
.elementor-form .elementor-button[type="submit"],
.wpcf7 input[type="submit"] {
    background-color: #C9A84C !important;
    color: #0C1B2E !important;
    font-family: 'Heebo', sans-serif !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.25s ease !important;
}

.elementor-form .elementor-button[type="submit"]:hover,
.wpcf7 input[type="submit"]:hover {
    background-color: #B8962E !important;
}

/* ---- Footer ---- */
footer,
.site-footer,
#site-footer,
[data-elementor-type="footer"],
[data-elementor-type="footer"] .elementor-section,
[data-elementor-type="footer"] .e-con,
[data-elementor-type="footer"] .elementor-container {
    background-color: #080F1A !important;
}

[data-elementor-type="footer"],
[data-elementor-type="footer"] p,
[data-elementor-type="footer"] span,
[data-elementor-type="footer"] li {
    color: #8BA7C4 !important;
    font-family: 'Heebo', sans-serif !important;
}

[data-elementor-type="footer"] a {
    color: #8BA7C4 !important;
    transition: color 0.25s ease !important;
}

[data-elementor-type="footer"] a:hover {
    color: #C9A84C !important;
}

/* ---- Dividers ---- */
.elementor-divider-separator {
    border-color: #C9A84C !important;
}

/* ---- Icon color on dark sections ---- */
.elementor-icon i,
.elementor-icon svg {
    color: #C9A84C;
    fill: #C9A84C;
    transition: color 0.25s ease;
}

/* ---- Global body background ---- */
body {
    background-color: #F5F5F3 !important;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0C1B2E; }
::-webkit-scrollbar-thumb { background: #2A4D6E; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #C9A84C; }

/* ---- Text selection ---- */
::selection {
    background-color: #C9A84C;
    color: #0C1B2E;
}

/* ============================================
   BUG FIXES v3
   ============================================ */

/* Bug 1 — Nav items stacking vertically */
.elementor-nav-menu--main .elementor-nav-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
}

.elementor-nav-menu--main .elementor-nav-menu > li {
    display: inline-block !important;
    float: none !important;
}

/* Bug 2 — Lecture card titles invisible (white-on-white) */
.elementor-posts-container .elementor-post__title a,
.elementor-posts-container .elementor-post__title,
.elementor-widget-posts .elementor-post__title a,
.elementor-posts .elementor-heading-title,
.e-loop-item .elementor-heading-title,
.elementor-section:not([data-settings*="0C1B2E"]) .elementor-heading-title,
.elementor-widget-heading h3,
.elementor-widget-heading h4 {
    color: #1A1A1A !important;
}

/* Keep hero H1/H2 and header titles light */
.elementor-section:first-of-type .elementor-heading-title,
[data-elementor-type="header"] .elementor-heading-title {
    color: #E8EFF6 !important;
}

/* Bug 3 — Footer text invisible */
.elementor-location-footer,
.elementor-location-footer *:not(a):not(.elementor-button) {
    color: #8BA7C4 !important;
}

.elementor-location-footer h1,
.elementor-location-footer h2,
.elementor-location-footer h3,
.elementor-location-footer h4,
.elementor-location-footer h5 {
    color: #E8EFF6 !important;
}

.elementor-location-footer a {
    color: #8BA7C4 !important;
}

.elementor-location-footer a:hover {
    color: #C9A84C !important;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    [data-elementor-type="header"] {
        position: sticky !important;
        top: 0 !important;
    }
}

@media (max-width: 768px) {
    body { font-size: 15px !important; }

    .elementor-heading-title.elementor-size-xxl {
        font-size: clamp(1.8rem, 6vw, 2.8rem) !important;
    }

    .elementor-nav-menu--dropdown,
    .elementor-nav-menu--dropdown .elementor-item,
    .e-n-menu--dropdown {
        background-color: #0C1B2E !important;
    }

    .elementor-nav-menu--dropdown .elementor-item,
    .e-n-menu--dropdown a {
        color: #E8EFF6 !important;
        border-bottom: 1px solid #1A3550 !important;
    }
}

/* ---- Lecture card titles — targeted by container data-id ---- */
/* Elementor renders containers as data-id="e3035ed", not #e3035ed */
[data-id="e3035ed"] .elementor-image-box-title,
[data-id="e3035ed"] .elementor-image-box-title a,
[data-id="e3035ed"] .elementor-heading-title {
    color: #1A1A1A !important;
    font-family: 'Frank Ruhl Libre', serif !important;
}

[data-id="e3035ed"] .elementor-image-box-description {
    color: #555555 !important;
    font-family: 'Heebo', sans-serif !important;
}
