/*!
Theme Name: Kadence
Theme URI: https://www.kadencewp.com/kadence-theme/
Author: Kadence WP
Author URI: https://www.kadencewp.com/
Description: Kadence Theme is a lightweight yet full featured WordPress theme for creating beautiful fast loading and accessible websites.
Version: 1.4.3
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: kadence
*/

/* 1. TABLE OF CONTENTS */
#eztoc-container {
    background-color: #f9f9f9 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    padding: 25px !important;
    margin: 2em auto !important;
    width: fit-content !important;
    max-width: 95% !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07) !important;
    transition: all 0.3s ease;
    overflow: hidden;
}

.ez-toc-title {
    font-weight: 700 !important;
    font-size: 1.5em !important;
    margin: 0 0 20px 0 !important;
    padding-bottom: 15px !important;
    color: #1A202C !important;
    text-align: center !important;
    border-bottom: 2px solid #ffc107 !important;
}

#eztoc-container ul.eztoc-list {
    list-style: none !important;
    padding-right: 0 !important;
    margin: 0 !important;
    counter-reset: toc-counter;
}

#eztoc-container ul.eztoc-list li {
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1.6 !important;
}

#eztoc-container ul.eztoc-list li::before {
    counter-increment: toc-counter;
    content: counter(toc-counter);
    background-color: #005a9e !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.9em !important;
    border-radius: 50% !important;
    min-width: 28px;
    height: 28px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 15px !important;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

#eztoc-container ul.eztoc-list li a {
    text-decoration: none !important;
    color: #2D3748 !important;
    font-weight: 500 !important;
    transition: color 0.3s ease;
}

#eztoc-container ul.eztoc-list li:hover a {
    color: #d9232d !important;
}

#eztoc-container ul.eztoc-list li:hover::before {
    background-color: #d9232d !important;
    transform: scale(1.1);
}

#eztoc-container ul.eztoc-list li.eztoc-level-3 {
    padding-right: 30px !important;
}

#eztoc-container ul.eztoc-list li.eztoc-level-3::before {
    background-color: #718096 !important;
    transform: scale(0.9);
}

/* 2. VARIABLES */
:root {
    --primary-color: #007bff;
    --primary-color-light: #4dabf7;
    --button-bg-light: #f1f5f9;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --dropdown-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --main-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glow-color: rgba(0, 123, 255, 0.7);
    --section-bg: #f4f7fa;
    --card-bg: #ffffff;
    --text-meta: #4a5568;
    --card-shadow: 0 7px 20px rgba(0, 0, 0, 0.06); 
    --card-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 3. NAVIGATION MENU */
#primary-menu > .menu-item {
    margin: 0 4px;
}

#primary-menu > .menu-item > a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background-color: var(--button-bg-light);
    color: var(--text-dark);
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--main-transition);
    border: 1px solid transparent;
}

#primary-menu .menu-item-has-children > a .dropdown-nav-toggle {
    display: flex;
    align-items: center;
    margin-right: 8px;
}

#primary-menu .kadence-arrow-down-svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

#primary-menu > .menu-item:hover > a,
#primary-menu > .menu-item.current-menu-item > a {
    background-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
    transform: translateY(-3px);
}

#primary-menu > .menu-item:hover .kadence-arrow-down-svg {
    transform: rotate(180deg);
}

.main-navigation ul .sub-menu {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: var(--dropdown-shadow);
    border: 1px solid #f0f0f0;
    padding: 8px;
    margin-top: 5px;
    padding-top: 12px;
    min-width: 260px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    transform-origin: top center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-navigation ul .menu-item:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.main-navigation ul .sub-menu li a {
    display: block;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    text-align: right;
    border-right: 4px solid transparent;
    transition: var(--main-transition);
}

.main-navigation ul .sub-menu li a:hover,
.main-navigation ul .sub-menu li.current-menu-item a {
    color: var(--text-light);
    background-image: linear-gradient(to left, var(--primary-color), var(--primary-color-light));
    border-right-color: var(--primary-color-light);
    transform: translateX(-5px);
}

/* 4. WIDGETS */
.widget {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: var(--dropdown-shadow);
    padding: 25px;
    margin-bottom: 30px;
    overflow: visible;
    text-align: center;
}

.widget-title, .widget h1, .widget h2, .widget h3, .widget h4 {
    display: inline-block;
    padding: 12px 35px;
    margin: 0 0 25px 0;
    background-color: var(--primary-color);
    color: var(--text-light) !important;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.25);
    transition: all 0.3s ease-out;
}

.widget-title:hover, .widget h1:hover, .widget h2:hover, .widget h3:hover, .widget h4:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
    background-image: linear-gradient(to right, var(--primary-color), var(--primary-color-light));
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.widget ul li {
    margin-bottom: 5px;
}

.widget ul li a {
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    border-right: 4px solid transparent;
    transition: var(--main-transition);
}

.widget ul li a:hover,
.widget ul li.current-menu-item a {
    color: var(--text-light);
    background-image: linear-gradient(to left, var(--primary-color), var(--primary-color-light));
    border-right-color: var(--primary-color-light);
    transform: translateX(-5px);
}

/* 5. RELATED POSTS */
.entry-related-inner-content {
    background-color: var(--section-bg);
    padding: 50px 30px;
    border-radius: 20px;
    margin-top: 50px;
    border: 1px solid #eef2f7;
}

.entry-related-title {
  display: block;
  width: max-content;
  margin: 0 auto 40px;
  padding: 12px 35px;
  background-color: #0056b3; /* WCAG AA: 7.0:1 contrast with white — overrides --primary-color (#007bff = 3.98:1) */
  color: var(--text-light) !important;
  font-size: 20px;
  font-weight: 600;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.entry-related-title:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.entry-related-inner-content article.loop-entry {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.entry-related-inner-content article.loop-entry:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.entry-related-inner-content article.loop-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    box-shadow: 0 0 20px 5px var(--glow-color);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.entry-related-inner-content article.loop-entry:hover::before {
    opacity: 1;
}

.entry-related-inner-content .post-thumbnail {
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.entry-related-inner-content .post-thumbnail img {
    transition: transform 0.3s ease;
}

.entry-related-inner-content article.loop-entry:hover .post-thumbnail img {
    transform: scale(1.05);
}

.entry-related-inner-content .entry-content-wrap {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.entry-related-inner-content .entry-title a {
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.entry-related-inner-content .entry-title a:hover {
    color: var(--primary-color);
}

.entry-related-inner-content .entry-meta {
    font-size: 0.8rem;
    color: var(--text-meta);
    margin-top: 10px;
}

.entry-related-inner-content .entry-footer {
    display: none;
}

.entry-related-carousel .splide__arrow {
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.entry-related-carousel .splide__arrow:hover {
    background: var(--primary-color);
}

.entry-related-carousel .splide__arrow svg {
    fill: var(--primary-color);
}

.entry-related-carousel .splide__arrow:hover svg {
    fill: var(--text-light);
}

.splide__pagination__page {
    background: #d1d5db;
}

.splide__pagination__page.is-active {
    background: var(--primary-color);
}

/* 6. ARCHIVE AND HOME */
.site-container, main#inner-wrap {
    background-color: var(--section-bg) !important;
}

#archive-container .entry-list-item article.loop-entry {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none;
}

#archive-container .entry-list-item article.loop-entry:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

#archive-container .entry-list-item article.loop-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    box-shadow: 0 0 20px 5px var(--glow-color);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

#archive-container .entry-list-item article.loop-entry:hover::before {
    opacity: 1;
}

#archive-container .post-thumbnail {
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

#archive-container .entry-content-wrap {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

#archive-container .entry-title a {
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

#archive-container .entry-title a:hover {
    color: var(--primary-color);
}

#archive-container .entry-meta {
    font-size: 0.8rem;
    color: var(--text-meta);
    margin-bottom: 15px;
}

#archive-container .entry-footer {
    margin-top: auto;
    padding-top: 15px;
}

#archive-container .post-more-link {
    display: inline-block;
    /* #0060df passes WCAG AA: contrast ratio 5.56:1 with white (#007bff was 3.98:1 — failing) */
    background-color: #0060df;
    color: var(--text-light) !important;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--main-transition);
    box-shadow: 0 4px 10px rgba(0, 96, 223, 0.25);
}

#archive-container .post-more-link:hover {
    background-color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(44, 62, 80, 0.3);
}

#archive-container .post-more-link .kadence-svg-icon {
    display: none;
}

.navigation.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.navigation.pagination .page-numbers {
    background-color: #ffffff;
    color: var(--text-dark);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    box-shadow: var(--card-shadow);
    transition: var(--main-transition);
}

.navigation.pagination .page-numbers:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.navigation.pagination .page-numbers.current {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

/* 7. SOCIAL SHARE */
.entry-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.methaly-social-share {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0;
}

.methaly-social-share a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    min-width: 42px; /* CLS: reserve space before styles apply */
    aspect-ratio: 1; /* CLS: maintain 1:1 ratio always */
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
}

.methaly-social-share a svg {
    width: 22px;
    height: 22px;
    fill: #ffffff;
}

.methaly-social-share a.whatsapp-icon  { background-color: #25D366; }
.methaly-social-share a.x-icon         { background-color: #000000; }
.methaly-social-share a.facebook-icon  { background-color: #1877F2; }
.methaly-social-share a.instagram-icon { background-color: #C13584; }
.methaly-social-share a.tiktok-icon    { background-color: #000000; }

.methaly-social-share a:hover {
    transform: translateY(-4px);
    filter: brightness(0.9);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.methaly-share-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.methaly-share-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    animation: bounce-right 2s infinite;
}

.methaly-share-title svg {
    width: 20px;
    height: 20px;
    fill: white;
}

@keyframes bounce-right {
    0%, 20%, 50%, 80%, 100% { transform: translateX(0); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(2px); }
}

.entry-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.entry-actions .methaly-share-container {
    display: block;
    margin: 0;
}

.entry-actions .methaly-social-share {
    display: flex;
    align-items: center;
    gap: 8px;
}

.entry-actions .more-link-wrap {
    margin: 0;
}

.entry-actions .methaly-social-share a svg {
    width: 28px;
    height: 28px;
}

/* 8. SERVICES BLOCK */
.methaly-services-block {
    background-color: #f7f7f7;
    padding: 40px 15px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.methaly-container {
    max-width: 1200px;
    margin: 0 auto;
}

.methaly-main-h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1A202C;
    margin-bottom: 30px;
}

.methaly-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.methaly-service-box {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    border-top: 5px solid;
}

.methaly-service-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.methaly-box-header {
    margin-bottom: 20px;
}

.methaly-icon {
    font-size: 3rem;
    line-height: 1;
}

.methaly-box-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-top: 10px;
}

.methaly-city-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
}

.methaly-city-list li {
    margin-bottom: 0; 
}

.methaly-city-list li a {
    text-decoration: none;
    color: #005a9e;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #f4f4f4;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
}

.methaly-city-list li a:hover {
    background-color: #d9232d;
    color: #ffffff;
    border-color: #d9232d;
    text-decoration: none;
}

.methaly-city-list li a .city-icon {
    width: 16px;
    height: 16px;
}

.methaly-service-box.box-1 { border-color: #dc3545; }
.methaly-service-box.box-2 { border-color: #007bff; }
.methaly-service-box.box-3 { border-color: #ffc107; }
.methaly-service-box.box-4 { border-color: #28a745; }

/* ═══════════════════════════════════════════════════════════════════════════
   SAME-CITY RELATED POSTS — styles are inline in entry_related.php
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   POST HEADER TYPOGRAPHY — professional single-post header
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   POST HEADER — Modern Hero Style
═══════════════════════════════════════════════════════════ */

/* Hero wrapper */
.single-post .entry-header {
    position: relative;
    text-align: center;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem) clamp(1.75rem, 4vw, 2.75rem);
    margin-bottom: 2.5rem;
    background: linear-gradient(150deg, #eef4ff 0%, #f8faff 55%, #f3eeff 100%);
    border-radius: 0 0 2rem 2rem;
    overflow: hidden;
    isolation: isolate;
}

/* Subtle radial accents */
.single-post .entry-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 15% 90%, rgba(0, 123, 255, .09) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 85% 10%, rgba(102, 16, 242, .07) 0%, transparent 55%);
    z-index: -1;
    pointer-events: none;
}

/* ── Breadcrumbs — pill style ─────────────────────────────── */
.single-post .entry-header .kadence-breadcrumbs,
.post-hero-section .kadence-breadcrumbs,
.entry-content-wrap .kadence-breadcrumbs {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, .07);
    padding: 0.35rem 1.1rem;
    border-radius: 99px;
    font-size: 0.78rem;
    color: #6b7280;
    margin-bottom: 1.25rem;
    letter-spacing: 0.01em;
}

/* ── Title card ───────────────────────────────────────────── */
.single-post .entry-header .entry-title {
    position: relative;
    font-size: clamp(1.45rem, 3.8vw, 2.15rem);
    font-weight: 900;
    line-height: 1.45;
    color: #1a202c;
    max-width: 840px;
    margin-inline: auto;
    padding: 1.1rem 1.75rem 1.25rem;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, .06),
        0 4px 20px rgba(0, 0, 0, .07);
    border-top: 4px solid var(--primary-color, #007bff);
}

/* Remove old decorative underline */
.single-post .entry-header .entry-title::after {
    display: none;
}

/* ── Meta row — glass pill ────────────────────────────────── */
.single-post .entry-header .entry-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0.75rem;
    margin-top: 1rem;
    padding: 0.45rem 1.4rem;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 99px;
    font-size: 0.82rem;
    color: #4b5563;
}
.single-post .entry-header .entry-meta a {
    color: #374151;
    text-decoration: none;
    font-weight: 600;
}
.single-post .entry-header .entry-meta a:hover {
    color: var(--primary-color, #007bff);
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .single-post .entry-header {
        border-radius: 0 0 1.25rem 1.25rem;
    }
    .single-post .entry-header .entry-title {
        padding: 0.9rem 1rem 1rem;
        border-radius: 0.75rem;
    }
}

/* ── Share Container ───────────────────────────────────────── */
.methaly-share-container {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}
.methaly-share-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #2d3748;
}


/* ═══════════════════════════════════════════════════════════
   CONTENT TYPOGRAPHY & ELEMENTS
   applies to: .entry-content inside single posts
═══════════════════════════════════════════════════════════ */

/* ── Shared scope ──────────────────────────────────────────── */
.entry-content {
    --ct-radius:    0.6rem;
    --ct-primary:   #007bff;
    --ct-secondary: #6c5ce7;
    --ct-green:     #00b894;
    --ct-red:       #d63031;
    --ct-border:    #e2e8f0;
    --ct-bg-soft:   #f8faff;
    --ct-shadow:    0 2px 12px rgba(0,0,0,.07);
}

/* ═══════════════════════════════════════════════════════════
   PARAGRAPHS — subtle card effect (text paragraphs only)
═══════════════════════════════════════════════════════════ */

.entry-content > p {
    line-height: 1.95;
    color: #2d3748;
    padding: 0.85rem 1.2rem;
    background: #fff;
    border-radius: var(--ct-radius);
    border: 1px solid #edf2f7;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
    margin-bottom: 0.85rem;
}
/* Image frame card for image-only paragraphs */
.entry-content > p:has(> img),
.entry-content > p:has(> a > img) {
    background: #fff;
    border: 1px solid #dbeafe;
    border-top: 4px solid var(--ct-primary, #007bff);
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(37,99,235,0.13), 0 1px 4px rgba(0,0,0,0.06);
    padding: 0.85rem 0.85rem 0.65rem;
    text-align: center;
    margin-block: 1.75rem;
    transition: box-shadow 0.3s ease;
}
.entry-content > p:has(> img):hover,
.entry-content > p:has(> a > img):hover {
    box-shadow: 0 8px 36px rgba(37,99,235,0.20), 0 2px 8px rgba(0,0,0,0.08);
}

/* ═══════════════════════════════════════════════════════════
   HEADINGS
═══════════════════════════════════════════════════════════ */

/* ── Headings: display:table = shrinks to text width, stays block ── */

/* H2 — blue card */
.entry-content h2 {
    display: table;
    max-width: 100%;
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: 800;
    color: #1a202c;
    margin-block: 2rem 1rem;
    padding: 0.65rem 1.3rem;
    background: #fff;
    border-radius: var(--ct-radius);
    border-top: 4px solid var(--ct-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 14px rgba(0,123,255,.09);
}

/* H3 — purple card */
.entry-content h3:not(.sp-faq-q) {
    display: table;
    max-width: 100%;
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    font-weight: 700;
    color: #3d2b7a;
    margin-block: 1.75rem 0.85rem;
    padding: 0.6rem 1.1rem;
    background: linear-gradient(135deg, #f5f0ff 0%, #ede7ff 100%);
    border-radius: var(--ct-radius);
    border-top: 3px solid var(--ct-secondary);
    box-shadow: 0 1px 6px rgba(108,92,231,.1);
}

/* H4 — green card */
.entry-content h4 {
    display: table;
    max-width: 100%;
    font-size: clamp(1rem, 2vw, 1.13rem);
    font-weight: 700;
    color: #065f46;
    margin-block: 1.5rem 0.7rem;
    padding: 0.5rem 1rem;
    background: #ecfdf5;
    border-radius: var(--ct-radius);
    border-top: 3px solid var(--ct-green);
    box-shadow: 0 1px 4px rgba(0,184,148,.1);
}

/* H5 — orange pill */
.entry-content h5 {
    display: table;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    margin-block: 1.25rem 0.6rem;
    padding: 0.35rem 1.1rem;
    background: linear-gradient(135deg, #e17055, #d63031);
    border-radius: 99px;
    letter-spacing: 0.02em;
}

/* H6 — gray pill */
.entry-content h6 {
    display: table;
    font-size: 0.87rem;
    font-weight: 700;
    color: #475569;
    margin-block: 1rem 0.4rem;
    padding: 0.3rem 0.9rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 99px;
}

/* ═══════════════════════════════════════════════════════════
   TABLES — Bold, colorful, clear design
═══════════════════════════════════════════════════════════ */

/* Responsive wrapper */
.entry-content .sp-table-wrap {
    display: block;
    width: max-content !important;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-block: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(37,99,235,.18);
    border: 2px solid #2563eb;
    border-bottom: 5px solid #1e3a8a;
}

/* Table inside wrapper: auto width breaks circular dependency */
.entry-content .sp-table-wrap table {
    width: auto !important;
    border-collapse: collapse;
    font-size: 0.92rem;
    margin-block: 0;
    overflow: hidden;
    border-radius: calc(1rem - 2px);
}

/* Standalone table (not in wrapper) */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    margin-block: 0;
    overflow: hidden;
    border-radius: 1rem;
}

/* thead — strong gradient header */
.entry-content table thead tr {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}
.entry-content table thead th {
    padding: 1rem 1.25rem;
    font-weight: 800;
    color: #fff;
    text-align: inherit;
    border: none;
    letter-spacing: 0.03em;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,.2);
}

/* tbody — alternating with strong label column */
.entry-content table tbody tr {
    border-bottom: 2px solid #e2e8f0;
    transition: all 0.15s;
}
.entry-content table tbody tr:last-child { border-bottom: none; }
.entry-content table tbody tr:hover td   { filter: brightness(0.95); }

/* First td = label column — bold dark background */
.entry-content table td:first-child {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    color: #fff;
    font-weight: 700;
    padding: 0.9rem 1.25rem;
    white-space: nowrap;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,.15);
    width: 25%;
    min-width: 120px;
}

/* Even rows: slightly different label shade */
.entry-content table tbody tr:nth-child(even) td:first-child {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
}

/* Second td = value column */
.entry-content table td + td {
    background: #fff;
    color: #1e293b;
    font-weight: 500;
    padding: 0.9rem 1.25rem;
    border: none;
    border-inline-start: 3px solid #2563eb;
    line-height: 1.6;
}
.entry-content table tbody tr:nth-child(even) td + td {
    background: #f0f6ff;
}

/* Third+ columns */
.entry-content table td + td + td {
    border-inline-start: 1px solid #e2e8f0;
    color: #374151;
    font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════
   UNORDERED LISTS (ul)
═══════════════════════════════════════════════════════════ */

.entry-content ul:not([class]) {
    list-style: none;
    padding-inline-start: 0;
    margin-block: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.entry-content ul:not([class]) li {
    position: relative;
    padding: 0.6rem 2.6rem 0.6rem 0.9rem; /* right padding = space for bullet */
    background: #fff;
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius);
    font-size: 0.93rem;
    color: #374151;
    line-height: 1.75;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.entry-content ul:not([class]) li:hover {
    border-color: #b3d1ff;
    box-shadow: 0 2px 8px rgba(0,123,255,.09);
}
.entry-content ul:not([class]) li::before {
    content: '';
    position: absolute;
    right: 0.9rem;   /* explicit right — RTL site */
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--ct-primary);
    border-radius: 50%;
}
/* Nested ul */
.entry-content ul:not([class]) ul:not([class]) {
    margin-block: 0.4rem 0;
    gap: 0.3rem;
}
.entry-content ul:not([class]) ul:not([class]) li {
    background: var(--ct-bg-soft);
    font-size: 0.88rem;
}
.entry-content ul:not([class]) ul:not([class]) li::before {
    background: var(--ct-secondary);
    width: 6px;
    height: 6px;
}

/* ═══════════════════════════════════════════════════════════
   ORDERED LISTS (ol)
═══════════════════════════════════════════════════════════ */

.entry-content ol:not([class]) {
    list-style: none;
    padding-inline-start: 0;
    margin-block: 1.25rem;
    counter-reset: ol-counter;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.entry-content ol:not([class]) li {
    counter-increment: ol-counter;
    position: relative;
    padding: 0.6rem 3.2rem 0.6rem 0.9rem; /* right padding = space for number */
    background: #fff;
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius);
    font-size: 0.93rem;
    color: #374151;
    line-height: 1.75;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.entry-content ol:not([class]) li:hover {
    border-color: #b3d1ff;
    box-shadow: 0 2px 8px rgba(0,123,255,.09);
}
.entry-content ol:not([class]) li::before {
    content: counter(ol-counter);
    position: absolute;
    right: 0;    /* explicit right — RTL site */
    left: auto;
    top: 0;
    bottom: 0;
    width: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ct-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: var(--ct-radius) 0 0 var(--ct-radius); /* rounded on right corners (RTL) */
}

/* ═══════════════════════════════════════════════════════════
   BLOCKQUOTES
═══════════════════════════════════════════════════════════ */

.entry-content blockquote {
    position: relative;
    margin-block: 1.75rem;
    padding: 1.1rem 1.5rem 1.1rem 1rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #faf5ff 100%);
    border-inline-end: 5px solid var(--ct-secondary);
    border-radius: var(--ct-radius);
    font-size: 1rem;
    color: #374151;
    font-style: italic;
}
.entry-content blockquote::before {
    content: '\201C';
    position: absolute;
    top: -0.25rem;
    inset-inline-end: 1rem;
    font-size: 4rem;
    color: var(--ct-secondary);
    opacity: 0.2;
    font-style: normal;
    line-height: 1;
    font-family: Georgia, serif;
}

/* ═══════════════════════════════════════════════════════════
   INLINE CODE & CODE BLOCKS
═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   FAQ — Always Visible Q&A Cards
═══════════════════════════════════════════════════════════ */

/* Wrapper: groups all FAQ items */
.entry-content .sp-faq-wrap {
    margin-block: 2rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    border: 2px solid #e0e7ff;
}
/* Header label above FAQ section */
.entry-content .sp-faq-wrap::before {
    content: '💬 الأسئلة الشائعة';
    display: block;
    background: linear-gradient(135deg, #1e3a8a 0%, #6c5ce7 100%);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
    letter-spacing: 0.02em;
}

/* Each FAQ item */
.entry-content .sp-faq-item {
    border-bottom: 1px solid #e0e7ff;
}
.entry-content .sp-faq-item:last-child { border-bottom: none; }

/* Question row — "س" from user's own text, styled via row background */
.entry-content .sp-faq-q {
    display: block;
    padding: 0.85rem 1.2rem;
    font-weight: 700;
    font-size: 0.97rem;
    color: #1e3a8a;
    background: linear-gradient(to left, #eef4ff 0%, #ede7ff 100%);
    line-height: 1.65;
    border-right: 4px solid #2563eb;
}

/* Answer row — "ج" from user's own text, styled via row background */
.entry-content .sp-faq-a {
    padding: 0.85rem 1.2rem;
    font-size: 0.93rem;
    color: #374151;
    line-height: 1.85;
    background: #fff;
    border-right: 4px solid #059669;
}
/* Reset paragraph styles inside answer */
.entry-content .sp-faq-a > p {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-block: 0 0.4rem;
}
.entry-content .sp-faq-a > p:last-child { margin-bottom: 0; }

/* Prevent OL/UL counter from bleeding into FAQ items */
.entry-content .sp-faq-wrap,
.entry-content .sp-faq-item,
.entry-content .sp-faq-q,
.entry-content .sp-faq-a {
    counter-increment: none;
    list-style: none;
}
.entry-content .sp-faq-wrap li { list-style: none; }

.entry-content code:not(pre code) {
    background: #eef4ff;
    color: #d63031;
    padding: 0.15em 0.45em;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: 'Courier New', monospace;
}
.entry-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem 1.5rem;
    border-radius: var(--ct-radius);
    overflow-x: auto;
    font-size: 0.88rem;
    line-height: 1.7;
    margin-block: 1.75rem;
}

/* ═══════════════════════════════════════════════════════════
   HORIZONTAL RULE
═══════════════════════════════════════════════════════════ */

.entry-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to left, transparent, var(--ct-primary) 30%, var(--ct-secondary) 70%, transparent);
    margin-block: 2rem;
    border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════
   ARTICLE IMAGES — Frame applied directly on <img>
═══════════════════════════════════════════════════════════ */

/* Base frame: white padding + blue border + shadow — works on ANY img tag */
.entry-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-inline: auto;
    /* Photo-frame effect */
    padding: 6px;
    background: #ffffff;
    border: 2px solid #2563eb;
    border-radius: 0.85rem;
    box-shadow:
        0 4px 6px rgba(37, 99, 235, 0.12),
        0 8px 28px rgba(37, 99, 235, 0.16);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover: gentle zoom + deeper glow */
.entry-content img:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow:
        0 6px 10px rgba(37, 99, 235, 0.18),
        0 14px 40px rgba(37, 99, 235, 0.22);
}

/* Cap width for inline images — 768px matches WordPress medium_large srcset entry exactly */
.entry-content > p > img,
.entry-content > p > a > img,
.entry-content figure.wp-block-image img,
.entry-content .aligncenter img {
    max-width: min(100%, 768px);
}

/* Figure wrapper: center + cap */
.entry-content figure.wp-block-image,
.entry-content figure.aligncenter,
.entry-content .wp-caption.aligncenter {
    display: block;
    margin-inline: auto;
    max-width: min(100%, 840px);
    text-align: center;
}

/* Caption text */
.entry-content figcaption,
.entry-content .wp-caption-text {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 0.5rem;
    text-align: center;
    font-style: italic;
    line-height: 1.5;
}

/* Float left */
.entry-content figure.alignleft,
.entry-content .wp-caption.alignleft,
.entry-content img.alignleft {
    float: left;
    margin: 0.25rem 1.5rem 1rem 0;
    max-width: 45%;
}

/* Float right */
.entry-content figure.alignright,
.entry-content .wp-caption.alignright,
.entry-content img.alignright {
    float: right;
    margin: 0.25rem 0 1rem 1.5rem;
    max-width: 45%;
}

/* Full-width: remove frame */
.entry-content .wp-block-image.alignfull img,
.entry-content .alignfull > img {
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
}

/* Clearfix after floated images */
.entry-content p::after {
    content: '';
    display: table;
    clear: both;
}

/* PHP-wrapped frame (sp_wrap_inline_images) — extra styling for p>img case */
.entry-content .sp-img-frame {
    margin-block: 1.75rem;
    text-align: center;
    max-width: min(100%, 840px);
    margin-inline: auto;
}

/* ============================================================
   Professional Footer — sp-footer-pro
   ============================================================ */

.sp-footer-pro {
    background: linear-gradient(160deg, #0d1b2a 0%, #1a2e45 100%) !important;
    --sp-foot-bg: #1a2e45;
    color: #c8d8e8 !important;
    padding-block: 3.5rem 0;
    font-size: 0.9rem;
    line-height: 1.7;
    border-top: 3px solid var(--primary-color, #007bff) !important;
    width: 100%;
}

/* ── Grid ─────────────────────────────────────────────────── */
.sp-ftp-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

@media (max-width: 900px) {
    .sp-ftp-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .sp-ftp-inner { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* ── Column headings ─────────────────────────────────────── */
.sp-ftp-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-block: 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--primary-color, #007bff);
    display: inline-block;
}

/* ── About column ────────────────────────────────────────── */
.sp-ftp-about p {
    color: #94afc8;
    margin-block: 0;
    font-size: 0.88rem;
}

/* ── Social icons ────────────────────────────────────────── */
.sp-ftp-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.25rem;
}

.sp-ftp-slink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #c8d8e8;
    transition: background 0.25s, transform 0.25s;
    text-decoration: none;
}

.sp-ftp-slink:hover {
    background: var(--primary-color, #007bff);
    color: #fff;
    transform: translateY(-3px);
}

.sp-ftp-slink svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

/* Brand colors on hover — matches sp-soc-{key} classes from PHP */
.sp-soc-facebook:hover  { background: #1877f2 !important; }
.sp-soc-twitter:hover   { background: #000000 !important; }
.sp-soc-instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important; }
.sp-soc-youtube:hover   { background: #ff0000 !important; }
.sp-soc-tiktok:hover    { background: #010101 !important; }
.sp-soc-snapchat:hover  { background: #fffc00 !important; color: #000 !important; }

/* ── Quick Links ─────────────────────────────────────────── */
.sp-ftp-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sp-ftp-links ul li {
    padding-block: 0.28rem;
}

.sp-ftp-links ul li a {
    color: #94afc8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s, gap 0.2s;
}

.sp-ftp-links ul li a::before {
    content: '›';
    font-size: 1.1em;
    color: var(--primary-color, #007bff);
    line-height: 1;
}

.sp-ftp-links ul li a:hover {
    color: #ffffff;
    gap: 0.65rem;
}

/* ── Contact list ────────────────────────────────────────── */
.sp-ftp-clist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.sp-ftp-clist li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: #94afc8;
    font-size: 0.88rem;
}

.sp-ftp-clist li svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--primary-color, #007bff);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    margin-top: 0.15em;
}

.sp-ftp-clist li a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.sp-ftp-clist li a:hover { color: #ffffff; }

/* ── Sitemap column ──────────────────────────────────────── */
.sp-ftp-sitemap ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sp-ftp-sitemap ul li {
    padding-block: 0.28rem;
}

.sp-ftp-sitemap ul li a {
    color: #94afc8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s, gap 0.2s;
}

.sp-ftp-sitemap ul li a::before {
    content: '›';
    font-size: 1.1em;
    color: var(--primary-color, #007bff);
    line-height: 1;
}

.sp-ftp-sitemap ul li a:hover {
    color: #ffffff;
    gap: 0.65rem;
}

/* ── Bottom bar (copyright) ──────────────────────────────── */
.sp-ftp-bottom {
    margin-top: 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-block: 1.1rem;
    text-align: center;
    font-size: 0.82rem;
    color: #6a8aaa;
}

.sp-ftp-bottom a {
    color: #94afc8;
    text-decoration: none;
    transition: color 0.2s;
}

.sp-ftp-bottom a:hover { color: #fff; }
