/* ============================================================
   BSKL — WORDPRESS THEME ADDITIONS
   WordPress content, blog, forms, mega menu, a11y, mobile CTA
   ============================================================ */

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  z-index: 99999;
  background: var(--bskl-teal); color: #fff;
  padding: 14px 22px; border-radius: 0 0 12px 0;
  font-family: var(--bskl-font-ui); font-weight: 600; font-size: 0.9rem;
}
.skip-link:focus { left: 0; }

/* ===== FOCUS VISIBLE (a11y) ===== */
:focus-visible {
  outline: 3px solid var(--bskl-teal-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== WORD-PRESS ALIGNMENTS ===== */
.entry-content { font-size: 1.05rem; line-height: 1.75; color: var(--bskl-text); }
.entry-content > * { max-width: var(--bskl-container-narrow); margin-left: auto; margin-right: auto; }
.entry-content > * + * { margin-top: 1.4em; }
.entry-content > .alignwide { max-width: var(--bskl-container-wide); }
.entry-content > .alignfull { max-width: none; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.entry-content .alignleft { float: left; margin: 0.5em 1.6em 1em 0; }
.entry-content .alignright { float: right; margin: 0.5em 0 1em 1.6em; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content img.alignleft, .entry-content img.alignright { max-width: 50%; height: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-size: 0.85rem; color: var(--bskl-muted); margin-top: 8px; }
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; word-wrap: normal !important; }
.screen-reader-text:focus { clip: auto !important; clip-path: none; background: #fff; color: #000; display: block; height: auto; width: auto; left: 8px; top: 8px; padding: 12px 18px; z-index: 99999; text-decoration: none; border-radius: 6px; box-shadow: var(--bskl-shadow-md); }

/* ===== WORDPRESS BLOCK EDITOR STYLES ===== */
.editor-styles-wrapper { font-family: var(--bskl-font-body); }
.wp-block-heading h1, .wp-block-heading h2, .wp-block-heading h3, .entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 1.4em; }
.entry-content h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
.entry-content h3 { font-size: clamp(1.25rem, 2vw, 1.7rem); }
.entry-content ul:not(.wp-block-social-links):not(.blocks-gallery-grid) { list-style: none; }
.entry-content ul li { position: relative; padding-left: 26px; margin-bottom: 0.6em; }
.entry-content ul li::before { content: ''; position: absolute; left: 4px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--bskl-teal); }
.entry-content ol { padding-left: 24px; }
.entry-content li > ul, .entry-content li > ol { margin-top: 0.6em; }
.wp-block-button__link { display: inline-flex; align-items: center; gap: 10px; padding: 15px 32px; border-radius: 100px; background: var(--bskl-teal); color: #fff; font-weight: 600; text-decoration: none; }
.wp-block-button__link:hover { background: var(--bskl-teal) !important; color: #fff; transform: translateY(-2px); }

/* ===== GALLERY / FIGURE ===== */
.blocks-gallery-grid, .wp-block-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.wp-block-gallery img { border-radius: var(--bskl-radius-sm); }

/* ===== SEARCH FORM ===== */
.search-form { display: flex; gap: 12px; max-width: 640px; margin: 0 auto; }
.search-form .search-field { flex: 1; }
.search-form .search-submit { }
.bskl-search-heading { text-align: center; margin-bottom: 8px; }
.bskl-result-count { text-align: center; color: var(--bskl-muted); margin-bottom: 40px; }

/* ===== POST NAV / PAGINATION ===== */
.navigation.pagination .nav-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.navigation.pagination .page-numbers { min-width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--bskl-white); border: 1px solid var(--bskl-border); color: var(--bskl-navy); font-weight: 600; font-family: var(--bskl-font-ui); font-size: 0.95rem; }
.navigation.pagination .page-numbers.current { background: var(--bskl-teal); border-color: var(--bskl-teal); color: #fff; }
.navigation.pagination a.page-numbers:hover { border-color: var(--bskl-teal); color: var(--bskl-teal); }

/* ===== BLOG CARDS ===== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.5vw, 32px); }
@media (max-width: 1024px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { background: var(--bskl-white); border: 1px solid var(--bskl-border-light, #EDF2F4); border-radius: var(--bskl-radius-md); overflow: hidden; box-shadow: var(--bskl-shadow-sm); transition: transform 0.35s var(--bskl-ease), box-shadow 0.35s var(--bskl-ease); display: flex; flex-direction: column; position: relative; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--bskl-shadow-md); }
.blog-card .post-thumb { display: block; aspect-ratio: 16/10; overflow: hidden; }
.blog-card .post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--bskl-ease); }
.blog-card:hover .post-thumb img { transform: scale(1.05); }
.blog-card .card-body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.blog-card .post-meta { font-family: var(--bskl-font-ui); font-size: 0.78rem; color: var(--bskl-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.blog-card .post-meta a { color: var(--bskl-teal); }
.blog-card h3, .blog-card .post-title { font-size: clamp(1.05rem, 1.4vw, 1.3rem); margin-bottom: 10px; }
.blog-card h3 a, .blog-card .post-title a { color: var(--bskl-navy); }
.blog-card h3 a:hover, .blog-card .post-title a:hover { color: var(--bskl-teal); }
.blog-card .post-excerpt { color: var(--bskl-muted); font-size: 0.95rem; margin-bottom: 20px; flex: 1; }
.read-more { color: var(--bskl-teal); font-weight: 600; font-family: var(--bskl-font-ui); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 8px; }
.read-more i { font-size: 0.75rem; }
.read-more:hover { gap: 12px; }

/* ===== SINGLE POST ===== */
.single-article .entry-header { text-align: center; padding: clamp(60px, 8vw, 110px) 0 clamp(40px, 5vw, 70px); }
.single-article .entry-header h1 { max-width: 20ch; margin: 0 auto; }
.single-article .post-thumbnail { border-radius: var(--bskl-radius-lg); overflow: hidden; margin-bottom: 48px; }
.single-article .entry-meta { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; font-family: var(--bskl-font-ui); font-size: 0.85rem; color: var(--bskl-muted); }
.single-article .entry-meta a { color: var(--bskl-teal); }
.single-article .entry-content { margin-bottom: 48px; }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 36px 0; }
.post-tags a { background: var(--bskl-ice); color: var(--bskl-navy); padding: 8px 16px; border-radius: 100px; font-family: var(--bskl-font-ui); font-size: 0.8rem; }
.post-navigation { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--bskl-border); padding-top: 32px; margin: 48px 0; }
.post-navigation a { color: var(--bskl-navy); font-weight: 600; }
.post-navigation a:hover { color: var(--bskl-teal); }

/* ===== COMMENTS ===== */
.comments-area { max-width: var(--bskl-container-narrow); margin: 64px auto; }
.comment-list { list-style: none; }
.comment-list .comment-body { background: var(--bskl-white); border: 1px solid var(--bskl-border-light, #EDF2F4); border-radius: var(--bskl-radius-sm); padding: 24px; margin-bottom: 16px; }
.comment-list .children { list-style: none; margin-left: 40px; }
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-author .avatar { border-radius: 50%; margin-right: 10px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-family: var(--bskl-font-ui); font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--bskl-navy); }
.form-control {
  width: 100%; padding: 15px 18px;
  border: 1.5px solid var(--bskl-border);
  border-radius: var(--bskl-radius-sm);
  background: var(--bskl-white);
  color: var(--bskl-text);
  font-family: var(--bskl-font-body);
  font-size: 1rem;
  transition: border-color 0.25s var(--bskl-ease), box-shadow 0.25s var(--bskl-ease);
}
.form-control:focus { outline: none; border-color: var(--bskl-teal); box-shadow: 0 0 0 4px rgba(14,143,139,0.12); }
.form-control::placeholder { color: var(--bskl-muted-2, #8FA3AE); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667785' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; padding-right: 46px; }
.form-status { display: none; padding: 16px 20px; border-radius: var(--bskl-radius-sm); margin-top: 18px; font-family: var(--bskl-font-ui); font-size: 0.92rem; }
.form-status.success { display: block; background: rgba(14,143,139,0.1); border: 1px solid var(--bskl-teal); color: #075e5b; }
.form-status.error { display: block; background: rgba(190,50,50,0.08); border: 1px solid #be3232; color: #7a1f1f; }
.hp-field { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }

/* ===== MOBILE STICKY CTA ===== */
.mobile-cta-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  display: none;
  grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(6, 26, 43, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.08);
  transform: translateY(0);
  transition: transform 0.35s var(--bskl-ease);
}
.mobile-cta-bar.hidden-up { transform: translateY(110%); }
.mobile-cta-bar .btn { width: 100%; min-height: 48px; padding: 14px 18px; font-size: 0.9rem; }
.mobile-cta-bar .btn-glass { background: rgba(255,255,255,0.06); }
@media (max-width: 820px) {
  .mobile-cta-bar { display: grid; }
  body.has-mobile-cta { padding-bottom: 84px; }
}

/* ===== MEGA MENU GRID (WordPress walker output) ===== */
.mega-menu .mega-grid { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 6px 14px; padding: 8px; }
@media (min-width: 1025px) { .has-dropdown-wide .mega-menu { min-width: 760px; } }
.mega-menu .mega-cat { grid-column: span 2; }
.mega-menu .mega-cat.full { grid-column: 1 / -1; }

/* ===== 404 ===== */
.error404-body { text-align: center; padding: clamp(90px, 12vw, 180px) 0; }
.error404-body .err-code { font-family: var(--bskl-font-head); font-size: clamp(6rem, 18vw, 13rem); font-weight: 800; line-height: 1; color: transparent; -webkit-background-clip: text; background-clip: text; background-image: linear-gradient(120deg, var(--bskl-teal), var(--bskl-teal-bright)); }
.error404-body h1 { margin: 8px 0 18px; }
.error404-body .btn-primary, .error404-body .btn-outline { margin: 6px 8px; }

/* ===== BREADCRUMB SCHEMA ===== */
.breadcrumb[aria-label="Breadcrumb"] a { color: rgba(255,255,255,0.65); }
.breadcrumb[aria-label="Breadcrumb"] a:hover { color: #fff; }

/* ===== POSTION: sticky CTA bottom padding safe ===== */
@media (max-width: 820px) { .section:last-of-type { margin-bottom: 0; } }

/* ===== TABLE RESPONSIVE ===== */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-visual:hover img, .card:hover .media img { transform: none !important; }
}