:root{
  --bg: #f0f0f1;
  --text: #1d2327;
  --muted: #646970;
  --line: #dcdcde;
  --soft: #ffffff;
  --blue: #2271b1;
  --blue2: #135e96;
  --radius: 10px;
}

/* Base */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.bg-white{
  background: #ffffff !important;
}

/* Banner background (very subtle WordPress-like texture) */
.bg-banner{
  position: relative;
}
.bg-banner::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("../resources/banner.png") !important;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 720px auto;
  opacity: 0.10;
  filter: grayscale(1) contrast(0.85) brightness(1.15);
  pointer-events: none;
}
/* White wash layer to keep page clean */
.bg-banner::after{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(240,240,241,0.98), rgba(247,247,247,0.94));
  pointer-events: none;
}

@media (min-width: 992px) {
  .bg-banner-repeat-desktop::before{
    background-repeat: repeat;
    background-position: left top;
    background-size: 200px auto;
    opacity: 0.06;
  }

  .bg-banner-repeat-desktop::after{
    background: linear-gradient(180deg, rgba(240,240,241,0.96), rgba(247,247,247,0.92));
  }
}

/* Containers */
.container{
  width: min(1120px, 92vw);
  margin: 0 auto;
}

@media (min-width: 992px) {
  .container-wide-desktop {
    width: calc(100vw - 40px);
    max-width: none;
  }

  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
  }

  .brand-block {
    justify-self: start;
  }

  .nav {
    justify-self: center;
  }

  .header-right,
  .header-user-actions,
  .header-actions,
  .lang-switch {
    flex-wrap: nowrap;
  }

  .header-right {
    justify-self: end;
  }
}

.admin-only{
  color: #c62828 !important;
}

/* Sticky header and footer in white */
.site-header{
  position: sticky;
  top:0;
  z-index: 50;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  border-left: none;
  border-right: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 0 0 1px rgba(255,255,255,0.5);
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.site-header.header-hidden{
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Mobile header toggle button */
.header-toggle-btn{
  display: none;
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 100;
  width: 44px;
  height: 44px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(29,35,39,0.18);
  font-size: 20px;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

/* Position button below header when header is visible */
.header-toggle-btn.below-header{
  top: 80px;
}

.header-toggle-btn:hover{
  background: var(--blue2);
  transform: scale(1.05);
}

.header-toggle-btn:active{
  transform: scale(0.95);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 20px;
  padding: 10px 0;
}

.header-right{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-left: auto;
  justify-content: flex-end;
}

.header-user-actions,
.header-actions{
  display:flex;
  align-items:center;
  gap: 12px;
}

.brand-block{
  display:flex;
  align-items:center;
}
.brand-home-link{
  color: inherit;
  text-decoration: none;
}
.brand-logo{
  height: 60px;
  width: auto;
  display: block;
}
.brand-title{
  font-weight: 900;
  letter-spacing: -0.3px;
  font-size: 19px;
  background: linear-gradient(135deg, var(--blue2) 0%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-subtitle{
  color: var(--blue2);
  font-weight: 700;
  font-size: 13px;
  margin-top: 3px;
  opacity: 0.85;
}

@media (min-width: 992px) {
  .brand-home-link{
    cursor: pointer;
  }
}

@media (max-width: 991.98px) {
  .brand-home-link{
    pointer-events: none !important;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    cursor: default;
  }
}

/* Nav */
.nav{
  display:flex;
  align-items:center;
  gap: 10px;
}

.nav-link{
  color: var(--text);
  text-decoration:none;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  transition: all 0.25s ease;
  position: relative;
}

.nav-link:hover{
  background: linear-gradient(135deg, rgba(34,113,177,0.08) 0%, rgba(19,94,150,0.12) 100%);
  color: var(--blue2);
  transform: translateY(-1px);
}

.nav-link.is-active{
  background: linear-gradient(135deg, rgba(34,113,177,0.12) 0%, rgba(19,94,150,0.18) 100%);
  color: var(--blue2);
  box-shadow: 0 2px 6px rgba(34,113,177,0.15);
}

/* Language switch */
.lang-switch{
  display:flex;
  gap: 8px;
  align-items: center;
}

.lang-btn{
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 800;
  cursor:pointer;
  transition: all 0.25s ease;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.lang-btn:hover{
  background: linear-gradient(135deg, rgba(34,113,177,0.06) 0%, rgba(19,94,150,0.1) 100%);
  border-color: rgba(34,113,177,0.3);
  color: var(--blue2);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(34,113,177,0.12);
}

.lang-btn.active{
  background: linear-gradient(135deg, rgba(34,113,177,0.12) 0%, rgba(19,94,150,0.18) 100%);
  border-color: rgba(34,113,177,0.4);
  color: var(--blue2);
  box-shadow: 0 2px 6px rgba(34,113,177,0.18);
}

/* Sections */
section{ scroll-margin-top: 92px; }
.section{ padding: 32px 0; }
.advert-section{
  padding-top: 16px;
  padding-bottom: 16px;
}
.news-section{ padding-top: 32px; }
.news-section .cta-row{ margin-bottom: 16px; }
.hero{ padding-top: 16px; }
@media (max-width: 768px) {
  .hero {
    padding-top: 16px;
  }
}
.card{
  background:#fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.advert-card{
  padding: 14px;
  overflow: hidden;
}

.advert-image{
  display:block;
  width:80%;
  height:auto;
  margin: 0 auto;
  border-radius: calc(var(--radius) - 2px);
  object-fit: cover;
}

.hero-card{
  min-height: 360px;   /* adjust value */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-stack{
  position: relative;
}


/* Typography */

.title{
  margin:0 0 14px;
  font-size: clamp(32px, 3.7vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.5px;
}

h2{
  margin:0 0 12px;
  font-size: clamp(24px, 2.7vw, 34px);
  letter-spacing: -0.3px;
}

h3{
  margin: 14px 0 10px;
  font-size: 18px;
}

p{
  margin: 0 0 14px;
  line-height: 1.7;
}

.lead{ color: var(--muted); font-size: 16px; }
.muted{ color: var(--muted); }
.small{ font-size: 12px; }

.section-head{
  margin-bottom: 18px;
}

/* Bullets */
.bullets{
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.bullets li{ margin: 8px 0; }

/* Buttons */
.cta-row{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  margin-top: 18px;
}

/* Call button only on phones */
.btn-call-mobile{
  display: none !important;
}

@media (max-width: 768px) {
  .btn-call-mobile{
    display: inline-flex !important;
  }
}

/* Hide Gmail button on phones */
@media (max-width: 768px) {
  #gmailBtn {
    display: none !important;
  }
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 14px;
  text-decoration:none;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.btn-primary{
  background: var(--blue);
  color:#fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.btn-primary:hover{ background: var(--blue2); }

.btn-ghost{
  background:#fff;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover{
  background: var(--soft);
  border-color: rgba(34,113,177,0.25);
  color: var(--blue2);
}

.btn-danger{
  background: #e5484d;
  color: #fff;
  box-shadow: 0 10px 25px rgba(229,72,77,0.25);
}
.btn-danger:hover{ background: #d93d43; }

/* Tables */
.table-scroll {
  overflow-x: scroll;
  overflow-y: scroll;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

@supports (scrollbar-gutter: stable) {
  .table-scroll {
    scrollbar-gutter: stable both-edges;
  }
}

.table-scroll {
  scrollbar-width: auto;
  scrollbar-color: rgba(101, 109, 119, 0.4) rgba(240, 240, 241, 0.9);
}

.table-scroll::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.table-scroll::-webkit-scrollbar-track {
  background: rgba(240, 240, 241, 0.9);
}

.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(101, 109, 119, 0.35);
  border-radius: 999px;
  border: 3px solid rgba(240, 240, 241, 0.9);
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(101, 109, 119, 0.5);
}

.fullscreen-scroll-hint {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  max-width: min(520px, calc(100vw - 40px));
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(46, 125, 50, 0.28);
  background: rgba(232, 245, 233, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(10, 40, 100, 0.14);
}

.fullscreen-scroll-hint__text {
  flex: 1 1 auto;
  font-size: 13px;
  line-height: 1.35;
  color: #1b5e20;
}

.fullscreen-scroll-hint__close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(46, 125, 50, 0.28);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  color: #1b5e20;
}

.fullscreen-scroll-hint__close:hover {
  background: rgba(200, 230, 201, 0.9);
}

.data-table .is-edited {
  background: rgba(232, 245, 233, 0.9);
  border-color: rgba(46, 125, 50, 0.65) !important;
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.18);
}

#ordersTableSection .table-scroll {
  max-height: 70vh;
}

#newsTableSection .table-scroll {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

#newsTableSection .data-table {
  width: max-content;
  min-width: 900px;
  table-layout: auto;
}

#newsTableSection .data-table th,
#newsTableSection .data-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#newsTableSection .admin-news-cell {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#newsTableSection .admin-news-actions {
  white-space: nowrap;
}

#newsTableSection .admin-news-actions .btn {
  display: inline-flex;
  width: auto;
}

#newsTableSection .admin-news-actions .btn + .btn {
  margin-left: 8px;
}

.admin-news-edit-textarea {
  width: min(760px, 100%);
  height: 60vh;
  min-width: 520px;
  min-height: 420px;
  max-width: 100%;
  resize: both;
  display: block;
  line-height: 1.5;
}

#newsEditTitle {
  width: min(760px, 100%);
  max-width: 100%;
  min-width: 520px;
}

.news-edit-toggle label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-edit-tags-label {
  display: block;
  margin-bottom: 10px;
}

.news-edit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.news-edit-tags label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34,113,177,0.2);
  background: rgba(34,113,177,0.05);
  font-weight: 700;
  font-size: 13px;
}

.admin-news-edit-actions {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 20, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 999;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  background: #fff;
  color: #1b1b1b;
  width: min(960px, 100%);
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header,
.modal-footer {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-footer {
  border-bottom: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-footer.admin-news-edit-actions {
  justify-content: flex-end;
}

.modal-body {
  padding: 16px 20px 20px;
  overflow: auto;
}

.modal-body .form-group {
  margin-bottom: 18px;
}

.modal-body .form-group:last-child {
  margin-bottom: 0;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  #newsEditTitle {
    width: 100%;
    min-width: 0;
  }

  .admin-news-edit-textarea {
    width: 100%;
    min-width: 0;
    height: 280px;
    min-height: 220px;
    resize: vertical;
  }

  .admin-news-edit-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-news-edit-actions .btn {
    width: 100%;
  }

  .modal {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .modal-overlay {
    padding: 0;
  }
}

#newsTableSection td.is-expanded .admin-news-cell {
  white-space: normal;
  overflow: visible;
}

@media (min-width: 992px) {
  #ordersTableSection {
    width: 96vw;
    max-width: none;
    margin-left: calc(50% - 48vw);
    margin-right: calc(50% - 48vw);
  }

  #newsTableSection {
    width: 96vw;
    max-width: none;
    margin-left: calc(50% - 48vw);
    margin-right: calc(50% - 48vw);
  }
}

.data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

.admin-comments-cell {
  max-width: 360px;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-comment-deleted {
  color: #b42318;
  background: rgba(255, 226, 226, 0.55);
}

.admin-comment-deleted .admin-comment-check {
  accent-color: #b42318;
}

.admin-comment-deleted-note {
  margin-top: 6px;
  font-size: 12px;
  color: #b42318;
  font-weight: 700;
}

.admin-comments-attention {
  background: #e5484d;
  color: #fff;
  border-color: #e5484d;
  box-shadow: 0 10px 20px rgba(229, 72, 77, 0.25);
}

.admin-comments-attention:hover {
  background: #d93d43;
  border-color: #d93d43;
  color: #fff;
}

.data-table th {
  background: var(--soft);
  font-weight: 800;
  color: var(--text);
  position: sticky;
  top: 0;
}

#adminCommentsTable {
  width: 100%;
  min-width: 720px;
  table-layout: fixed;
}

#adminCommentsTable th,
#adminCommentsTable td {
  overflow: hidden;
  text-overflow: ellipsis;
}

#adminCommentsTable .admin-comments-cell {
  max-width: none;
  overflow: visible;
  text-overflow: unset;
}

#adminCommentsTable th:nth-child(1),
#adminCommentsTable td:nth-child(1) {
  width: 120px;
}

#adminCommentsTable th:nth-child(2),
#adminCommentsTable td:nth-child(2) {
  width: 160px;
}

#adminCommentsTable th:nth-child(3),
#adminCommentsTable td:nth-child(3) {
  width: 220px;
}

#adminCommentsTable th:nth-child(5),
#adminCommentsTable td:nth-child(5) {
  width: 160px;
}

#adminCommentsTable th:nth-child(6),
#adminCommentsTable td:nth-child(6) {
  width: 120px;
}

.orders-total {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  font-weight: 700;
  color: var(--text);
}

.orders-total .muted {
  font-weight: 600;
}

body.admin-table-fullscreen {
  overflow: hidden;
}

#ordersTableSection.admin-table-fullscreen {
  position: fixed;
  inset: 20px;
  z-index: 120;
  margin: 0;
  width: auto;
  max-width: none;
  height: calc(100% - 40px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  background: #fff;
}

#ordersTableSection.admin-table-fullscreen .orders-controls {
  flex: 0 0 auto;
}

#ordersTableSection.admin-table-fullscreen .table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  height: 100%;
  overflow: auto;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
}

@supports (scrollbar-gutter: stable) {
  #ordersTableSection.admin-table-fullscreen .table-scroll {
    scrollbar-gutter: stable both-edges;
  }
}

#ordersTableSection.admin-table-fullscreen .data-table th,
#ordersTableSection.admin-table-fullscreen .data-table td {
  white-space: nowrap;
}

#newsTableSection.admin-table-fullscreen {
  position: fixed;
  inset: 20px;
  z-index: 120;
  margin: 0;
  width: auto;
  max-width: none;
  height: calc(100% - 40px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  background: #fff;
}

#newsTableSection.admin-table-fullscreen .orders-controls {
  flex: 0 0 auto;
}

#newsTableSection.admin-table-fullscreen .table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  height: 100%;
  overflow: auto;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
}

@supports (scrollbar-gutter: stable) {
  #newsTableSection.admin-table-fullscreen .table-scroll {
    scrollbar-gutter: stable both-edges;
  }
}

#commentsTableSection.admin-table-fullscreen {
  position: fixed;
  inset: 20px;
  z-index: 120;
  margin: 0;
  width: auto;
  max-width: none;
  height: calc(100% - 40px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  background: #fff;
}

#commentsTableSection.admin-table-fullscreen .orders-controls {
  flex: 0 0 auto;
}

#commentsTableSection.admin-table-fullscreen .table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  height: 100%;
  overflow: auto;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
}

@supports (scrollbar-gutter: stable) {
  #commentsTableSection.admin-table-fullscreen .table-scroll {
    scrollbar-gutter: stable both-edges;
  }
}

/* News posts layout */
.news-post {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.news-post__image {
  width: 336px;
  height: 280px;
  flex: 0 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
}

.news-post__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-post__content {
  flex: 1 1 auto;
}

.news-single-card {
  margin-top: 18px;
}

.news-post__content > h1,
.important-news-content > h1 {
  margin-bottom: 14px;
}

.news-body {
  white-space: pre-wrap;
  margin-top: 0;
}

.news-date {
  margin-top: 0;
  margin-bottom: 18px;
}

.news-excerpt {
  margin-top: 10px;
}

.news-toolbar {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.news-toolbar .btn {
  padding: 8px 10px;
  font-size: 12px;
}

.news-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-post__content > .news-tags,
.important-news-content > .news-tags {
  margin-top: 0;
  margin-bottom: 18px;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34,113,177,0.22);
  background: rgba(34,113,177,0.08);
  color: var(--blue2);
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
}

.important-news-card .news-tag {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.news-tag-filter {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.news-tag-filter .news-tag-bubble {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  border: 1px solid transparent;
  transition: 0.2s ease;
  background: rgba(11, 27, 58, 0.06);
  color: var(--text);
}

.news-tag-filter .news-tag-bubble[data-active="1"] {
  box-shadow: 0 8px 18px rgba(11, 27, 58, 0.12);
  transform: translateY(-1px);
}

.news-tag-filter .news-tag-bubble[data-tag="Графік роботи"] {
  background: rgba(14, 166, 118, 0.12);
  border-color: rgba(14, 166, 118, 0.35);
  color: #0b6e4f;
}

.news-tag-filter .news-tag-bubble[data-tag="Ідеї для продажу"] {
  background: rgba(255, 176, 32, 0.18);
  border-color: rgba(255, 176, 32, 0.45);
  color: #9a5a00;
}

.news-tag-filter .news-tag-bubble[data-tag="Статті"] {
  background: rgba(90, 94, 235, 0.14);
  border-color: rgba(90, 94, 235, 0.4);
  color: #2b2e9f;
}

.news-tag-filter .news-tag-bubble[data-tag=""][data-active="1"] {
  background: rgba(34,113,177,0.12);
  border-color: rgba(34,113,177,0.3);
  color: var(--blue2);
}

@media (max-width: 820px) {
  .news-post {
    flex-direction: column;
  }

  .news-post__image {
    width: 100%;
    height: auto;
  }

  .news-post__image img {
    height: auto;
  }
}

/* Important news with image as background */
.important-news-card {
  padding: 0 !important;
  overflow: hidden;
}

.important-news-container {
  position: relative;
  min-height: 300px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 14px;
  overflow: hidden;
}

.important-news-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(8px);
  z-index: 1;
}

.important-news-container.no-blur::before {
  filter: none;
}

.important-news-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.important-news-content {
  position: relative;
  z-index: 3;
  padding: 32px;
  color: white;
}

.important-news-content h2 {
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.important-news-content .muted {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.important-news-content .btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
}

.important-news-content .btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.terms-back-btn {
  background-color: white;
  color: black;
  border-radius: 8px;
  padding: 12px 24px;
  margin-bottom: 25px;
}

@media (hover: none) and (pointer: coarse) {
  a.btn-ghost[data-i18n="mailtoBtn"],
  a.btn-ghost[data-i18n="mailtoBtn"]:hover,
  a.btn-ghost[data-i18n="mailtoBtn"]:focus,
  a.btn-ghost[data-i18n="mailtoBtn"]:active,
  a.btn-ghost[data-i18n="mailtoBtn"]:visited {
    background-color: #2271b1 !important;
    border-color: #2271b1 !important;
    color: #ffffff !important;
    text-decoration: none;
  }

  /* prevent white flash on iPhone */
  a.btn-ghost[data-i18n="mailtoBtn"] {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Services grid */
.grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-card{ padding: 18px; }

.img-placeholder{
  height: 175px;
  border-radius: 16px;
  border: 1px dashed rgba(34,113,177,0.35);
  background: linear-gradient(160deg, rgba(34,113,177,0.08), rgba(34,113,177,0.02));
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-weight: 900;
  color: rgba(11,27,58,0.65);
  padding: 14px;
}

.service-img{
  width:100%;
  height:175px;
  object-fit:cover;
  border-radius: 16px;
  display:block;
  border: 1px solid var(--line);
}

.msc-img {
  margin-top: 24px; /* space above */
  height: 350px !important;
}

/* Contact */
.contact-card{ padding: 22px; }

.contact-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.contact-sub{
  color: var(--blue2);
  margin-top: 0;
}

a{ color: var(--blue2); }
a:hover{ color: var(--blue); }

/* Desktop only */
@media (min-width: 992px) {

  /* Add space only when #contact is targeted (menu click) */
  #contact:target::after {
    content: "";
    display: block;
    height: 30vh; /* adjust: 40–70vh */
  }

}

/* Footer (white) */
.site-footer{
  background: rgba(255,255,255,0.98);
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
}

.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 16px;
}

.footer-right{
  display:flex;
  flex-direction:column;
  gap: 8px;
  align-items:flex-end;
}

.footer-link{
  font-weight: 900;
  color: var(--blue2);
  text-decoration:none;
}
.footer-link:hover{ text-decoration: underline; }

.footer-created {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.footer-review img {
  display: block;
  height: 32px;
  width: auto;
}

/* Responsive */
@media (max-width: 980px){
  .grid-3{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
  .footer-inner{ flex-direction:column; }
  .footer-right{ align-items:flex-start; }

}

@media (min-width: 992px) {
  .bg-banner::before{
    background-position: left top;
  }

  .header-inner{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
  }

  .brand-block{
    justify-self: start;
  }

  .nav{
    justify-self: center;
  }

  .header-right,
  .header-user-actions,
  .header-actions,
  .lang-switch{
    flex-wrap: nowrap;
  }

  .header-right{
    justify-self: end;
  }
}

@media (max-width: 640px){
  .nav{ 
    display:flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }
  .header-inner{ 
    flex-direction: column;
    align-items: stretch;
  }
  .brand-block{ align-items: flex-start; }
  .header-right{
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
  }
  .header-user-actions,
  .header-actions{
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .lang-switch{ flex-wrap: wrap; justify-content: flex-start; }
}

@media (max-width: 768px) {
  .site-header.header-hidden{
    display: none;
  }

  .section{ padding: 42px 0; }
  .news-section{ padding-top: 24px; }
  .card{ padding: 20px; }
  .cta-row{ flex-direction: column; }
  .cta-row .btn,
  .cta-row .login-btn,
  .cta-row .btn-ghost,
  .cta-row .btn-primary{ width: 100%; }

  .btn{ width: 100%; padding: 14px 16px; }
  .lang-btn{ padding: 10px 12px; }

  .nav-link{ padding: 10px 10px; font-size: 13px; }

  .table-scroll{ border-radius: 12px; }
  .data-table{ min-width: 720px; }

  #newsTableSection .admin-news-actions .btn {
    width: auto;
    padding: 10px 12px;
  }

  .hero-card{ min-height: auto; }
  .title{ font-size: clamp(28px, 7vw, 36px); }
  h2{ font-size: clamp(20px, 5.5vw, 28px); }

  .hero-card{
    position: relative;
    z-index: 2;
  }

  /* Show header toggle button on mobile */
  .header-toggle-btn{
    display: flex;
  }
}

@media (max-width: 520px) {
  .container{ width: min(1120px, 94vw); }
  .card{ padding: 18px; }
  .btn{ font-size: 15px; }
  .lang-switch{ gap: 6px; }
  .nav{ gap: 6px; }
  .nav-link{ padding: 8px 10px; }
}
