/* ==========================================================================
   WordPress + Elementor compatibility for the Pasban design.
   site.css is the untouched design stylesheet; this file only adapts
   WordPress/Elementor markup so pages look exactly like the original.
   ========================================================================== */

/* ---- Elementor layout mapping -------------------------------------------
   Imported pages use Elementor sections with these classes:
   pb-full   full-bleed block (heroes)
   pb-sec    contained block (= .wrap)          pb-pt / pb-pb = section padding
   pb-layout two columns: content + 300px sidebar (= .page-layout)
   pb-plain  no wrapper styling (article bodies inside the news template)
   Elementor's own flex/gap/spacing is neutralised so the design CSS applies. */
.elementor-section.pb-full,
.elementor-section.pb-sec,
.elementor-section.pb-plain { padding: 0 !important; margin: 0; background: none; }

.elementor-section.pb-full > .elementor-container,
.elementor-section.pb-plain > .elementor-container {
  display: block !important; max-width: none !important; width: auto !important; padding: 0 !important; margin: 0 !important;
}
.elementor-section.pb-sec > .elementor-container {
  display: block !important; width: 100% !important; max-width: var(--wrap) !important;
  margin: 0 auto !important; padding: 0 var(--gutter) !important;
}
.elementor-section.pb-sec.pb-pt > .elementor-container { padding-top: 56px !important; }
.elementor-section.pb-sec.pb-pb > .elementor-container { padding-bottom: 56px !important; }
@media (min-width: 768px) {
  .elementor-section.pb-sec.pb-pt > .elementor-container { padding-top: 72px !important; }
  .elementor-section.pb-sec.pb-pb > .elementor-container { padding-bottom: 72px !important; }
}
.elementor-section.pb-mt-2 { margin-top: 2rem !important; }

.elementor-section.pb-layout > .elementor-container {
  display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 40px;
}
@media (min-width: 1024px) {
  .elementor-section.pb-layout > .elementor-container { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
}

:is(.pb-full, .pb-sec, .pb-plain) .elementor-column {
  width: auto !important; max-width: none; display: block !important; min-height: 0 !important; min-width: 0;
}
:is(.pb-full, .pb-sec, .pb-plain) .elementor-column.prose { max-width: 760px; }
:is(.pb-full, .pb-sec, .pb-plain) .elementor-column.narrow { max-width: 820px; }
:is(.pb-full, .pb-sec, .pb-plain) .elementor-column.mw-none { max-width: none !important; }
:is(.pb-full, .pb-sec, .pb-plain) .elementor-widget-wrap,
:is(.pb-full, .pb-sec, .pb-plain) .elementor-element-populated { display: block !important; padding: 0 !important; margin: 0 !important; }
/* align-content on a block box creates a new formatting context (blocks margin collapsing) — reset it */
.elementor-section:is(.pb-full, .pb-sec, .pb-plain),
:is(.pb-full, .pb-sec, .pb-plain) :is(.elementor-container, .elementor-column, .elementor-widget-wrap, .elementor-element) { align-content: normal !important; }
:is(.pb-full, .pb-sec, .pb-plain) .elementor-widget,
:is(.pb-full, .pb-sec, .pb-plain) .elementor-widget:not(:last-child) { margin: 0 !important; margin-block: 0 !important; }
:is(.pb-full, .pb-sec, .pb-plain) .elementor-widget-container { padding: 0; margin: 0; }
:is(.pb-full, .pb-sec, .pb-plain) .elementor-widget.mt-2 { margin-top: 2rem !important; }
:is(.pb-full, .pb-sec, .pb-plain) .elementor-widget.mt-1 { margin-top: 1rem !important; }
.elementor-widget.prose { max-width: 760px; }
.elementor-widget.mw-none { max-width: none; }

/* First block in a prose column starts flush, as in the original article layout */
.elementor-column.prose > .elementor-widget-wrap > .elementor-element:first-child :is(.elementor-widget-container, .elementor-text-editor) > :first-child,
.elementor-column.prose > .elementor-widget-wrap > .elementor-element:first-child > :first-child:not(.elementor-widget-container) { margin-top: 0; }

/* Elementor removes underlines from every link; restore the design's link styling */
.elementor a { text-decoration: underline; }
.elementor :is(.btn, .text-link, .card-link, .country-card, .upd-list a, .quick-links a, .article-card h3 a, .logo) { text-decoration: none; }
.elementor .article-card h3 a:hover, .elementor .upd-list a:hover span { text-decoration: underline; }
.elementor .card-more { text-decoration: underline; }

/* Elementor shortcode widget wrapper */
.elementor-shortcode > .tool, .elementor-shortcode > .wpcf7 { margin: 0; }

/* ---- WordPress core ------------------------------------------------------ */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.screen-reader-text:focus { clip: auto; width: auto; height: auto; padding: 10px 14px; background: #fff; z-index: 200; }
.custom-logo { width: auto; max-height: 46px; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin: 0 auto 1em; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); }
.featured-img img { width: 100%; height: auto; }

/* Pagination */
.navigation.pagination { margin-top: 32px; }
.navigation.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.navigation.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--green-800); background: #fff; font-weight: 600;
}
.navigation.pagination .page-numbers.current { background: var(--green-700); color: #fff; border-color: var(--green-700); }

/* ---- Contact Form 7 (same look as the original form) ---------------------- */
.wpcf7 .wpcf7-form-control-wrap { display: block; }
.wpcf7 .wpcf7-form-control:not(.btn) { width: 100%; }
.wpcf7 .wpcf7-not-valid-tip { color: var(--danger-700); font-size: .85rem; margin-top: 4px; }
.wpcf7 form .wpcf7-response-output { margin: 16px 0 0; padding: 12px 14px; border-radius: 8px; border-width: 1px; font-size: .95rem; }
.wpcf7 form.sent .wpcf7-response-output { border-color: #c4dccf; background: var(--green-50); }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output { border-color: var(--danger-200); background: var(--danger-50); }
.wpcf7-spinner { vertical-align: middle; margin: 16px 0 0 12px; }
.wpcf7 input[type="submit"].btn { width: auto; }

/* Keep Elementor's default global colours/fonts (if enabled in Elementor settings) from overriding the design */
:is(.pb-full, .pb-sec, .pb-plain) :is(.elementor-widget-text-editor, .elementor-widget-html, .elementor-widget-shortcode) {
  color: inherit; font-family: inherit; font-weight: inherit; font-size: inherit; line-height: inherit;
}
:is(.pb-full, .pb-sec, .pb-plain) .elementor-widget-text-editor p:last-child { margin-bottom: 1em; }
:is(.pb-full, .pb-sec, .pb-plain) .elementor-widget-text-editor .callout p:last-child { margin-bottom: 0; }
