/* ==== GLOBAL LAYOUT FIX (applies to ALL pages) ==== */

/* спираме WebBuilder clearfix да чупи grid/flex */
.row::before,
.row::after{
  content:none !important;
  display:none !important;
}

/* премахваме floating системата */
[class^="col-"]{
  float:none !important;
}

/* стабилизираме контейнера */
.row{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
}

/* всички карти */
.card,
#Cards .wb_Text,
#Catogories .wb_Text{
  background:#ffffff;
  border-radius:18px;
  box-shadow:0 10px 25px rgba(0,0,0,0.08);
}
/* Modern UI layer for the existing Web Builder markup
   (keeps your current HTML structure, but upgrades spacing, typography, and responsiveness) */

:root{
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --brand: #0080ff;
  --brand-2: #0073e6;
  --surface: #f8fafc;
  --border: rgba(15, 23, 42, 0.10);
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.10);
  --radius: 18px;
  --container: 1180px;
}

*,
*::before,
*::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: none; }

img{ max-width: 100%; height: auto; display: block; }

/* generic container behavior */
#Header, #Welcome, #Gallery, #Cards, #Catogories, #Equipment, #Whatsapp{
  max-width: var(--container);
  margin-inline: auto;
}

/* Top WhatsApp bar */
#wb_Whatsapp{
  background: linear-gradient(90deg, var(--brand), #00a3ff);
}
#wb_Text1{
  margin: 10px 0 !important;
  padding: 0 10px !important;
  font-size: 15px !important;
}
#wb_IconFont1{ margin: 8px 0 !important; }
#IconFont1{ width: 44px !important; height: 44px !important; }
#IconFont1 i{ font-size: 40px !important; line-height: 44px !important; }

/* Header */
#wb_Header{
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.06);
}
#Header{
  padding: 10px 16px !important;
}
#Header > .row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 24px !important;
}
#Header > .row > .col-1,
#Header > .row > .col-2{
  float:none !important;
  width:auto !important;
  padding: 0 !important;
}
#wb_Image1{ max-width: 280px; }
#Image1{ height:auto; width:100%; }

/* Menu polishing */
.ThemeableMenu1 .navbar-nav > li > a{
  border-radius: 12px;
}
@media (min-width: 1024px){
  .ThemeableMenu1 .navbar-nav > li > a{ padding: 12px 14px; }
}
@media (max-width: 1024px){
  .ThemeableMenu1 .navbar-nav{ border-top: 1px solid var(--border); }
  .ThemeableMenu1 .navbar-toggle{ border-radius: 12px; }
}

/* HERO */
#wb_Welcome{
  position: relative;
  min-height: 72vh;
  display:block !important;
}
#wb_Welcome::before{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(70% 60% at 20% 20%, rgba(255,255,255,0.92), rgba(255,255,255,0.65) 55%, rgba(255,255,255,0.15));
  pointer-events:none;
}
#Welcome{
  position:relative;
  padding: 64px 16px 56px !important;
}
#Welcome > .row{
  display:flex;
  align-items:center;
  gap: 26px;
}
#Welcome > .row > .col-1,
#Welcome > .row > .col-3{
  display:none;
}
#Welcome > .row > .col-2{
  float:none !important;
  width:100% !important;
  max-width: 680px;
}
#wb_Text3{ margin: 0 0 10px 0 !important; }
#wb_Text4{ margin: 0 0 10px 0 !important; }
#wb_Text5{ margin: 0 0 18px 0 !important; }
#wb_Text3 span{ font-size: clamp(18px, 2.2vw, 26px) !important; color: var(--text) !important; }
#wb_Text4 span{ font-size: clamp(26px, 3vw, 40px) !important; color: #dc143c !important; }
#wb_Text5 span{ font-size: 16px !important; color: var(--muted) !important; }

#Button1{
  width: auto !important;
  height: auto !important;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 14px 18px !important;
  border-radius: 999px;
  font-size: 16px !important;
  line-height: 1 !important;
  background: var(--brand) !important;
  box-shadow: var(--shadow);
  min-height: 48px;
}
#Button1:hover{ background: var(--brand-2) !important; }

/* Intro / Info section */
#wb_Info{ background: var(--surface) !important; }
#Info{
  max-width: var(--container);
  margin-inline:auto;
  padding: 44px 16px !important;
  gap: 0;
}
#Info > .col-1{ display:none; }
#Info > .col-2{
  flex-basis: 100% !important;
  max-width: 100% !important;
}
#wb_Text7{ margin: 0 0 10px 0 !important; }
#wb_Text8{ margin: 0 !important; }
#wb_Text7 span{ font-size: 20px !important; font-weight: 700 !important; font-family: "Open Sans" !important; }
#wb_Text8 span{ font-size: 16px !important; font-family: "Open Sans" !important; color: var(--muted) !important; }

/* Gallery */
#wb_Gallery{ background: var(--bg) !important; }
#Gallery{ padding: 18px 0 0 !important; }
#Subject{
  display:block !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 16px 42px !important;
}
#Subject .thumbnails{
  display:grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
}
#Subject .thumbnail{
  float:none !important;
  width: auto !important;
}
#Subject .thumbnail img{
  border-radius: var(--radius) !important;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.08);
  transform: translateZ(0);
}
@media (max-width: 740px){
  #Subject .thumbnails{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 520px){
  #Subject .thumbnails{ grid-template-columns: 1fr; }
}

/* Cards section (services/brands etc.) */
#wb_Cards{ background: var(--surface) !important; }
#Cards{
  padding: 56px 16px !important;
}
#Cards > .row{
  display:grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px;
  margin: 0 !important;
}
#Cards > .row > .col-1,
#Cards > .row > .col-4{ display:none; }
#Cards > .row > .col-2,
#Cards > .row > .col-3{
  float:none !important;
  width:auto !important;
  padding: 0 !important;
}
#wb_Card1, #wb_Card2, #wb_Card3, #wb_Card4{
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  background: #fff;
}
@media (max-width: 740px){
  #Cards > .row{ grid-template-columns: 1fr; }
}

/* Practice split section */
#wb_Practice{ background: linear-gradient(180deg, #0b4d92, #0b6bd1) !important; }
#Practice{
  max-width: var(--container);
  margin-inline:auto;
  padding: 0 !important;
}
#Practice > .col-1, #Practice > .col-2{
  padding: 0 !important;
}
#Practice > .col-2{
  padding: 44px 16px !important;
  color: white;
}
@media (max-width: 740px){
  #Practice > .col-1{ min-height: 260px; }
}

/* Categories */
#wb_Catogories{
  background: transparent !important;
  max-width: var(--container) !important;
}
#Catogories{
  padding: 56px 16px !important;
}
#Catogories > .row{
  display:grid !important;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  gap: 16px !important;
  margin: 0 !important;
}
#Catogories > .row > .col-1,
#Catogories > .row > .col-2,
#Catogories > .row > .col-3,
#Catogories > .row > .col-4{
  float:none !important;
  width:auto !important;
  padding: 22px 18px !important;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
}

/* Phone/tablet: stack nicely */
@media (max-width: 740px){
  #Catogories > .row{ grid-template-columns: 1fr !important; }
}


/* Equipment hero */
#wb_Equipment{
  position: relative;
  display:block !important;
}
#Equipment-overlay{
  opacity: 0.80 !important;
  background: radial-gradient(80% 80% at 20% 20%, rgba(0,128,255,0.90), rgba(0,64,160,0.90)) !important;
}
#Equipment{
  position:relative;
  padding: 72px 16px !important;
}
#Equipment h1, #Equipment h2, #Equipment h3,
#Equipment span, #Equipment p, #Equipment div{
  color:#fff !important;
}

/* Forms / inputs (if present) */
input, select, textarea{
  font: inherit;
}
input[type="text"], input[type="email"], input[type="tel"], textarea{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}
button, input[type="submit"], .btn{
  cursor:pointer;
  border:0;
  border-radius: 999px;
  padding: 12px 16px;
}

/* Better focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 3px solid rgba(0,128,255,0.35);
  outline-offset: 3px;
}

/* Small-screen header stacking */
@media (max-width: 720px){
  #Header > .row{ align-items:flex-start; }
  #wb_Image1{ max-width: 240px; }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ transition: none !important; }
}


/* WhatsApp icon fallback (works even if Font Awesome font files are missing) */
#IconFont1{ display:flex !important; align-items:center; justify-content:center; }
#IconFont1 .wa-icon{ width: 40px; height: 40px; fill: #ffffff; display:block; }


/* === FOLLOW US SVG ICONS (FontAwesome-independent) === */

#IconFont11, #IconFont13, #IconFont14 { color: #CECECE; }
#IconFont11 svg, #IconFont13 svg, #IconFont14 svg {
  width: 47px;
  height: 47px;
  display: block;
  fill: currentColor;
}
#wb_IconFont11:hover #IconFont11,
#wb_IconFont13:hover #IconFont13,
#wb_IconFont14:hover #IconFont14 { color: #FFFFFF; }


/* ===== Gallery thumbnails -> modern cards with CTA under each image ===== */
#Subject{
  display:block !important;
  width:100% !important;
  height:auto !important;
}

#Subject .thumbnails{
  display:grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (max-width: 960px){
  #Subject .thumbnails{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 640px){
  #Subject .thumbnails{
    grid-template-columns: 1fr !important;
  }
}

#Subject .thumbnail{
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 18px !important;
  display:flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-radius: var(--radius) !important;
  background: #fff !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  min-height: 340px;
  overflow: hidden;
}

#Subject .thumbnail > a{
  width:100%;
  display:block;
}

#Subject .thumbnail img{
  width:100% !important;
  height: 230px !important;
  object-fit: contain !important;
  border-radius: 14px !important;
  background: var(--surface);
  padding: 10px;
}

#Subject .thumbnail figcaption{
  width:100%;
  margin-top: 14px;
}

#Subject .thumbnail .thumb-cta{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.10);
}

#Subject .thumbnail .thumb-cta:hover{
  background: var(--brand-2);
}

/* remove legacy float clearing that can break the grid */
#Subject .thumbnails .thumbnail:nth-child(3n+1){
  clear: none !important;
}

/* ===== Fix: button text + desktop 3-column alignment ===== */
/* WB sets #Subject font-size:0; ensure readable text inside cards */
#Subject .thumbnail{ font-size: 16px !important; line-height: 1.3; }
#Subject .thumbnail .thumb-cta{ font-size: 16px !important; line-height: 1.2; }

/* Keep 3 columns on typical desktop widths (including 1024px) */
#Gallery{ max-width: var(--container) !important; margin-inline: auto !important; }
#Subject{ max-width: var(--container) !important; margin-inline: auto !important; }

/* override earlier breakpoints */
@media (max-width: 840px){
  #Subject .thumbnails{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 560px){
  #Subject .thumbnails{ grid-template-columns: 1fr !important; }
}

/* Reduce excessive blank space after gallery */
#wb_Gallery{ padding-bottom: 40px !important; }


/* === v8 FIXES === */

/* WebBuilder adds clearfix pseudo-elements to .thumbnails.
   When we switch to CSS Grid, those pseudo-elements become grid items
   and create "empty cells" -> looks like a 2nd row. Disable them. */
#Subject .thumbnails::before,
#Subject .thumbnails::after{
  content: none !important;
  display: none !important;
}

/* Ensure no legacy float/clear interferes */
#Subject .thumbnail{
  float: none !important;
  clear: none !important;
  margin: 0 !important;
}

/* Keep 3-in-a-row on desktop */
#Subject .thumbnails{
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Cards section: 2 cards centered and same container width as gallery */
#Cards{
  max-width: 1200px !important;
  margin: 0 auto !important;
}
#Cards > .row{
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  justify-content: center !important;
}
@media (max-width: 740px){
  #Cards > .row{ grid-template-columns: 1fr !important; }
}



/* ===== FIX: CATEGORIES - keep cards in one row on desktop (2 or 3 items) ===== */
#Catogories > .row{
  display:flex !important;
  flex-wrap:nowrap !important;
  justify-content:center !important;
  align-items:stretch !important;
  gap:30px !important;
  margin-left:0 !important;
  margin-right:0 !important;
}

/* neutralize WebBuilder float-based columns inside this section */
#Catogories > .row > .col-1,
#Catogories > .row > .col-2,
#Catogories > .row > .col-3,
#Catogories > .row > .col-4{
  float:none !important;
  width:auto !important;
  flex:1 1 0 !important;
  max-width:none !important;
}

/* keep headings/images from forcing overflow */
#Catogories *{ max-width:100%; }

/* stack on tablets/phones */
@media (max-width: 900px){
  #Catogories > .row{ flex-wrap:wrap !important; }
  #Catogories > .row > .col-1,
  #Catogories > .row > .col-2,
  #Catogories > .row > .col-3,
  #Catogories > .row > .col-4{
    flex:0 0 100% !important;
    width:100% !important;
  }
}

  #Catogories > .row > .col-1,
  #Catogories > .row > .col-2{
    flex:0 0 100% !important;
    width:100% !important;
  }
}
/* ===== HOME: #Cards (2 text cards in ONE row) ===== */

/* 1) махаме празните spacer колони на десктоп */
@media (min-width: 901px) {
  #Cards > .row > .col-1,
  #Cards > .row > .col-4 {
    display: none !important;
  }

  /* 2) правим реда flex и центрираме */
  #Cards > .row {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 30px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 3) двете карти да са 50/50 и без float */
  #Cards > .row > .col-2,
  #Cards > .row > .col-3 {
    float: none !important;
    flex: 0 0 calc(50% - 15px) !important;
    width: calc(50% - 15px) !important;
    max-width: calc(50% - 15px) !important;
  }
}

/* Mobile/Tablet: да се стакват */
@media (max-width: 900px) {
  #Cards > .row {
    display: block !important;
  }
  #Cards > .row > .col-1,
  #Cards > .row > .col-4 {
    display: none !important;
  }
  #Cards > .row > .col-2,
  #Cards > .row > .col-3 {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }
}
/* ===== technical-consult: 3 equal cards (Nobel/Altracore/Inspiro) ===== */
@media (min-width: 901px) {
  /* правим реда grid с 3 равни колони */
  #Catogories > .row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 30px !important;
    align-items: stretch !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* убиваме WebBuilder ширините */
  #Catogories > .row > .col-1,
  #Catogories > .row > .col-2,
  #Catogories > .row > .col-3 {
    float: none !important;
    width: auto !important;
    max-width: none !important;
  }
}

/* Tablet: 2 колони */
@media (max-width: 900px) and (min-width: 641px) {
  #Catogories > .row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px !important;
  }
}

/* Phone: 1 колона */
@media (max-width: 640px) {
  #Catogories > .row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
}
/* ===== technical-consult: Catogories -> 3 cards in ONE row ===== */

/* махаме clearfix псевдо-елементите (те правят 2+1) */
#Catogories > .row::before,
#Catogories > .row::after {
  content: none !important;
  display: none !important;
}

@media (min-width: 901px) {
  #Catogories > .row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 30px !important;
    align-items: stretch !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #Catogories > .row > .col-1,
  #Catogories > .row > .col-2,
  #Catogories > .row > .col-3 {
    float: none !important;
    width: auto !important;
    max-width: none !important;
  }
}

/* Tablet */
@media (max-width: 900px) and (min-width: 641px) {
  #Catogories > .row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px !important;
  }
}

/* Phone */
@media (max-width: 640px) {
  #Catogories > .row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
}
/* ===== HOME: fix #Cards (2 text cards in ONE row) ===== */

/* махаме clearfix псевдо-елементи (могат да развалят flex/grid) */
#Cards > .row::before,
#Cards > .row::after{
  content: none !important;
  display: none !important;
}

@media (min-width: 901px){
  /* махаме празните spacer колони */
  #Cards > .row > .col-1,
  #Cards > .row > .col-4{
    display: none !important;
  }

  /* правим реда стабилен */
  #Cards > .row{
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 30px !important;
    width: 100% !important;
    margin: 0 auto !important;
    max-width: 1200px !important; /* да съвпада с горната секция */
  }

  /* двете реални карти */
  #Cards > .row > .col-2,
  #Cards > .row > .col-3{
    float: none !important;
    flex: 0 0 calc(50% - 15px) !important;
    width: calc(50% - 15px) !important;
    max-width: calc(50% - 15px) !important;
  }
}

/* Mobile/Tablet: stack */
@media (max-width: 900px){
  #Cards > .row > .col-1,
  #Cards > .row > .col-4{
    display: none !important;
  }

  #Cards > .row{
    display: block !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
  }

  #Cards > .row > .col-2,
  #Cards > .row > .col-3{
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
/* ===== POLICIES / TERMS: make content full-width like desktop ===== */
#Catogories {
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 48px 20px !important;
}

/* disable webbuilder/flex row behavior for long-text pages */
#Catogories > .row {
  display: block !important;
}

/* if content is placed only in col-1 (small bootstrap width), force it to 100% */
#Catogories > .row > .col-1,
#Catogories > .row > .col-2,
#Catogories > .row > .col-3,
#Catogories > .row > .col-4,
#Catogories > .row > [class^="col-"] {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  float: none !important;
}
/* ==== FLOATING WHATSAPP BUTTON ==== */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 62px;
  height: 62px;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: transform .2s ease, box-shadow .2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 35px rgba(0,0,0,0.35);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  stroke: white;
}