/* ==========================================================================
   vokaweb – WordPress & Elementor additions
   (the design itself lives in style.css; this file only adds what WordPress,
   Elementor and form plugins need)
   ========================================================================== */

/* ---------- Icons printed by vokaweb_icon() get a sensible size by default ---------- */
:where(.vk-icon) { width: 1.25em; height: 1.25em; flex-shrink: 0; }
.hero__burst { color: var(--primary); }
.review__stars svg.is-off { opacity: .35; }
.socials i { font-size: 17px; line-height: 1; }
.feature__icon i, .fact__icon i { font-size: 20px; line-height: 1; }
/* Project facts: any number of rows (exactly three keep the design's columns) */
@media (min-width: 861px) {
  .facts:not(:has(> .fact:nth-child(3):last-child)) { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); row-gap: 20px; }
}
/* Image logo (height from Theme Settings), with an optional second image for dark mode */
.logo--image { display: inline-flex; align-items: center; }
.logo__img { height: var(--logo-h, 40px); width: auto; max-width: 220px; object-fit: contain; }
.logo__img--dark { display: none; }
[data-theme="dark"] .logo__img--light { display: none; }
[data-theme="dark"] .logo__img--dark { display: block; }

/* ---------- Footer: the grid follows the parts that are switched on ----------
   cols-N = logo/text/socials block (if on) + widget columns that have widgets. */
.footer { background: var(--bg-soft); }
.footer__grid--cols-1 { grid-template-columns: 1fr; }
.footer__grid--cols-2 { grid-template-columns: 1.4fr 1fr; }
.footer__grid--cols-3 { grid-template-columns: 1.4fr 1fr 1fr; }
.footer__grid--cols-4 { grid-template-columns: 1.4fr 1.2fr .8fr .8fr; }
.footer__grid--no-brand.footer__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.footer__grid--no-brand.footer__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.footer__grid--no-brand.footer__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
/* Only the logo / text / social links: centred, e.g. a footer with just the social icons */
.footer__grid--brand-only { justify-items: center; text-align: center; }
.footer__grid--brand-only .footer__brand p { max-width: 560px; margin-inline: auto; }
.footer__grid--brand-only .socials { justify-content: center; }
.footer__brand > :first-child { margin-top: 0; }
/* Nothing on top, only the copyright line */
.footer--bottom-only { padding-top: 0; }
.footer--bottom-only .footer__bottom { margin-top: 0; border-top: 0; }
/* Widgets inside the columns */
.footer__widget + .footer__widget { margin-top: 32px; }
.footer__col .wp-block-heading { margin-bottom: 20px; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.footer__col p { color: var(--muted); font-size: 15px; }
.footer__col p + p { margin-top: 10px; }
.footer__col .sub-menu { margin-top: 12px; padding-left: 14px; }
@media (max-width: 1100px) {
  .footer__grid--cols-3, .footer__grid--cols-4,
  .footer__grid--no-brand.footer__grid--cols-3,
  .footer__grid--no-brand.footer__grid--cols-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer__grid[class*="footer__grid--cols-"] { grid-template-columns: 1fr; }
}

/* ---------- Accessibility ---------- */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed !important; top: 12px; left: 12px; z-index: 100; width: auto; height: auto; margin: 0; clip: auto;
  padding: 12px 18px; border-radius: 8px; background: var(--surface); color: var(--primary);
  box-shadow: var(--shadow-card); font-weight: 600;
}

/* ---------- Admin bar (logged-in users) ---------- */
.admin-bar .header, .admin-bar .read-progress { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .header, .admin-bar .read-progress { top: 46px; }
}

/* ---------- Elementor ----------
   Containers / sections that hold a vokaweb widget become full width without
   padding, so each widget looks exactly like the design. */
.e-con:has(> .elementor-widget[class*="elementor-widget-vokaweb-"]),
.e-con:has(> .e-con-inner > .elementor-widget[class*="elementor-widget-vokaweb-"]) {
  --content-width: 100%;
  --padding-top: 0; --padding-right: 0; --padding-bottom: 0; --padding-left: 0;
  --gap: 0; --row-gap: 0; --column-gap: 0;
}
.elementor-section:has(.elementor-widget[class*="elementor-widget-vokaweb-"]) > .elementor-container { max-width: none; }
.elementor-section:has(.elementor-widget[class*="elementor-widget-vokaweb-"]) .elementor-widget-wrap { padding: 0 !important; }
.elementor-widget[class*="elementor-widget-vokaweb-"] { width: 100%; margin-bottom: 0 !important; }
.elementor-widget[class*="elementor-widget-vokaweb-"] > .elementor-widget-container { margin: 0; padding: 0; }

/* Section heading widget + the section widget under it read as one section:
   the heading keeps the top padding, the next widget drops its own. */
/* flow-root keeps the heading's bottom margin inside the block, so a grey background
   has no white strip between the heading and the section under it. */
.section--head { padding-bottom: 0; display: flow-root; }
.elementor-widget-vokaweb-heading + .elementor-element .section { padding-top: 0; }
.elementor-widget-vokaweb-heading:last-child .section--head { padding-bottom: 56px; } /* + 64px heading margin = 120px */
@media (max-width: 860px) {
  .elementor-widget-vokaweb-heading:last-child .section--head { padding-bottom: 44px; } /* + 44px = 88px */
}
.section-head--left { text-align: left; }
.section-head--left .section-sub { margin-left: 0; }

/* "Light grey background" (widget → Style → Background): a Section heading set to "Auto"
   turns grey when the widget under it is grey, so the heading and its section read as one block. */
.elementor-widget-vokaweb-heading:has(+ .elementor-element .section--soft) .section--head:not(.section--plain) { background-color: var(--bg-soft); }

/* Icons chosen with Elementor's icon picker in the Services widget */
.service-card__icon i, .service-card__icon .vki { font-size: 40px; line-height: 1; }

/* Pages built with Elementor have no page header: keep content clear of the fixed header,
   unless the page starts with the Hero widget or a page header. */
.vk-elementor #main { padding-top: var(--header-h); }
.vk-elementor #main:has(.hero, .page-hero) { padding-top: 0; }

/* Notices shown only inside the Elementor editor */
.vk-editor-notice {
  margin: 24px auto; max-width: 720px; padding: 16px 20px; border-radius: 12px;
  border: 1.5px dashed var(--primary-light); background: var(--card-tint); color: var(--primary);
  font-size: 14px; text-align: center;
}

/* ---------- Pages & content from the editor ---------- */
.page-content { padding: 64px 0 110px; }
.project-content { padding-top: 90px; padding-bottom: 90px; }
.full-width-content > *:first-child { margin-top: 0; }
.prose a:not(.btn) { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 16px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; }
.prose pre { overflow-x: auto; padding: 18px 20px; border-radius: 12px; background: var(--bg-soft); font-size: 14px; }
.prose code { font-size: .9em; }
.prose hr { border: 0; height: 1px; background: var(--line); }
.prose .wp-block-image figcaption, .prose .wp-caption-text { margin-top: 10px; text-align: center; font-size: 14px; color: var(--muted); }
.prose .wp-block-quote, .prose blockquote:not(:has(svg)) { padding: 20px 24px; border-left: 4px solid var(--primary); border-radius: 0 12px 12px 0; background: var(--bg-soft); }

.alignleft { float: left; margin: 6px 24px 16px 0; }
.alignright { float: right; margin: 6px 0 16px 24px; }
.aligncenter { margin-inline: auto; }
.wp-caption { max-width: 100%; }
.gallery-caption { font-size: 14px; color: var(--muted); }
.sticky .post__title a::before { content: "★ "; color: var(--primary); }
.bypostauthor { }

.page-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 32px; font-weight: 600; }
.page-links a, .page-links > span:not(:first-child) { min-width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 8px; border: 1.5px solid var(--line); }

.tags li a { color: inherit; }

/* Pages without a sidebar */
.article-layout--full { grid-template-columns: minmax(0, 1fr); max-width: 860px; margin-inline: auto; }
.features-split--single { grid-template-columns: 1fr; }

/* ---------- Comments (WordPress markup) ---------- */
.comment-list .comment-respond { margin-top: 16px; }
.comment-respond__title small { font-size: inherit; }
#cancel-comment-reply-link.comment-respond__cancel { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: #e5484d; }
.comment-respond .logged-in-as a { color: var(--primary); }
.comment-form .form-submit { margin: 0; }
.comment__moderation { margin-top: 6px; font-size: 14px; color: var(--muted); }
.comment__content > p + p { margin-top: 10px; }
.comment__edit { margin-left: 14px; font-size: 13px; }
.comment__edit a { color: var(--muted); }
.comment__edit a:hover { color: var(--primary); }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; font-weight: 600; color: var(--primary); }
.no-comments { margin-top: 24px; color: var(--muted); }

/* ---------- Search & empty states ---------- */
.search-form { position: relative; display: flex; max-width: 480px; margin-inline: auto; }
.search-form__input {
  width: 100%; height: 54px; padding: 0 58px 0 18px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--heading); outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.search-form__input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(91, 143, 249, .18); }
.search-form__btn { position: absolute; right: 6px; top: 6px; width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--gradient); }
.search-form__btn svg { width: 18px; height: 18px; }
.no-results { max-width: 560px; margin-inline: auto; text-align: center; }
.no-results h2 { font-size: 28px; }
.no-results p { margin: 10px 0 28px; }
.page-hero--404 .search-form { margin-top: 32px; }
.error-404__code {
  display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(90px, 16vw, 160px); line-height: 1;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-404__actions { margin-top: 32px; display: flex; justify-content: center; }

/* ---------- Sidebar: WordPress widgets ---------- */
.sidebar .widget ul:not(.mini-posts):not(.cat-list) li + li { margin-top: 10px; }
.sidebar .widget a:not(.btn):hover { color: var(--primary); }
.sidebar .widget select { width: 100%; height: 46px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--heading); }
.sidebar .wp-block-search__input { height: 46px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); }
.sidebar .wp-block-search__button { border-radius: 10px; background: var(--gradient); color: #fff; padding: 0 16px; border: 0; }
.sidebar .wp-block-heading, .sidebar .widget h2 { margin-bottom: 16px; font-size: 17px; }

/* ---------- Built-in contact form ---------- */
.contact-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form { position: relative; }
.contact-form__status.is-error { color: #e5484d; }

/* ---------- Contact Form 7 (and similar plugins) inside the Contact widget ---------- */
.contact-form--plugin { display: block; }
.contact-form--plugin form { display: grid; gap: 18px; }
.contact-form--plugin form > p { margin: 0; }
.contact-form--plugin label { display: block; font-size: 14px; color: var(--text-strong); }
.contact-form--plugin .wpcf7-form-control-wrap { display: block; margin-top: 6px; }
.contact-form--plugin input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.contact-form--plugin textarea,
.contact-form--plugin select {
  width: 100%; border: 1.5px solid transparent; background: var(--surface); border-radius: 10px;
  padding: 16px 18px; font-size: 15px; color: var(--heading); outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-form--plugin textarea { resize: vertical; min-height: 140px; }
.contact-form--plugin input::placeholder, .contact-form--plugin textarea::placeholder { color: var(--muted); }
.contact-form--plugin input:focus, .contact-form--plugin textarea:focus, .contact-form--plugin select:focus {
  border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(91, 143, 249, .18);
}
.contact-form--plugin input[type="submit"], .contact-form--plugin button[type="submit"] {
  width: 100%; height: 56px; margin-top: 10px; border: 0; border-radius: 8px; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 17px; color: #fff;
  background: var(--gradient); box-shadow: 0 14px 26px -12px rgba(26, 75, 214, .55);
  transition: transform .3s ease, box-shadow .3s ease;
}
.contact-form--plugin input[type="submit"]:hover, .contact-form--plugin button[type="submit"]:hover { transform: translateY(-2px); }
.contact-form--plugin .hidden-fields-container { display: none; }
.contact-form--plugin .field .wpcf7-form-control-wrap { margin-top: 0; }
.contact-form--plugin .wpcf7-spinner { display: block; margin: 12px auto 0; }
.contact-form--plugin .wpcf7-not-valid { border-color: #e5484d !important; }
.contact-form--plugin .wpcf7-not-valid-tip { margin-top: 6px; font-size: 13px; color: #e5484d; }
.contact-form--plugin .wpcf7-response-output {
  margin: 4px 0 0 !important; padding: 12px 16px !important; border-radius: 10px; border-width: 1.5px !important;
  text-align: center; font-size: 15px;
}
.contact-form--plugin .wpcf7-list-item { margin: 0 16px 0 0; }
.contact-form--plugin .wpcf7-acceptance label, .contact-form--plugin .wpcf7-checkbox label { display: inline-flex; align-items: center; gap: 8px; }
.contact-form--plugin input[type="checkbox"], .contact-form--plugin input[type="radio"] { accent-color: var(--primary); width: 18px; height: 18px; }

/* ---------- Link-style category filters (projects page with several pages) ---------- */
a.filters__btn { display: inline-flex; align-items: center; }
