/* Alignment & spacing refresh for the original templates (theme_one … theme_four).
   Loaded after each theme's own CSS; markup is unchanged. */

body { padding: 18px 0 8px; }
body > .container { max-width: 520px; padding-left: 14px; padding-right: 14px; }
body > .container.pt-5 { padding-top: 1.5rem !important; }

/* one centered column, evenly spaced rounded cards (no dark seams between sections) */
body > .container > .row { margin-left: 0; margin-right: 0; padding-top: 0 !important; }
body > .container > .row > .col-md-5,
body > .container > .row > [class*="col-xl-5"] {
  flex: 0 0 100%;
  max-width: 100%;
  margin: 0 0 16px !important;
  box-shadow: none !important;
}
body > .container > .row > [class*="col"] > .card,
body > .container > .row > [class*="col"] > form > .card,
body > .container > .row > [class*="col"] > [class*="card"] {
  border-radius: 24px !important;
  overflow: hidden;
  border: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 14px 34px -16px rgba(15, 23, 42, .35) !important;
  margin: 0 !important;
}
body > .container > .row > [class*="col"] > .card.p-2 { padding: 18px !important; }

/* section headings */
.card .card-header { justify-content: center; padding: 4px 0 14px !important; min-height: 0; }
.card .card-header h4 {
  margin: 0;
  font-size: 12.5px !important;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--card-font-color) !important;
  opacity: .75;
}

/* profile block */
.user-card .card-block { padding: 28px 22px 22px; }
.user-card h5 { font-size: 1.45rem; font-weight: 800; margin: 14px 0 4px; color: var(--card-font-color); }
.user-card h6 { line-height: 1.55; }
.user-card hr, .card-profile hr { border-color: currentColor; opacity: .12; margin: 16px 0; }

/* contact rows: fixed icon column, text aligned left and wrapping under itself */
.contact-details { padding: 0; }
.contact-details li + li { border-top: 1px solid rgba(127, 127, 127, .14); }
.contact-details-item {
  gap: 14px;
  padding: 11px 4px !important;
  border-radius: 14px;
  transition: background .15s, transform .15s;
}
.contact-details-item:hover { background: rgba(127, 127, 127, .08); transform: translateX(3px); text-decoration: none; }
.contact-details-item .icon-circle {
  flex: 0 0 42px;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 13px !important;
}
.contact-details-item h6 {
  flex: 1;
  min-width: 0;
  margin: 0 !important;
  text-align: left !important;
  font-size: 1rem !important;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}
.contact-details-item::after {
  content: "\f054";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 11px;
  opacity: .35;
  margin-left: auto;
}

/* Save contact / Share: two equal pills side by side */
.card .row.justify-content-center:has(> .btn-outline-dark),
.card span.row.justify-content-center {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 0;
}
.btn.btn-outline-dark.col-md-5 {
  flex: 1 1 0;
  max-width: none;
  margin: 0 !important;
  padding: 11px 10px;
  border-radius: 999px;
  border-width: 2px;
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
}
.btn.btn-outline-dark.col-md-5:hover { background: var(--card-font-color); color: var(--card-gb) !important; }
.btn.btn-outline-dark.col-md-5 i { margin-right: 6px; }

/* products & portfolio */
.article { margin-bottom: 14px !important; border-radius: 18px !important; overflow: hidden; border: 1px solid rgba(127, 127, 127, .16) !important; box-shadow: none; }
.col-md-12:last-child > .article { margin-bottom: 0 !important; }
.article .article-header { height: 190px !important; }
.article .article-header .article-image { background-size: cover !important; background-position: center !important; }
.article .article-details { padding: 16px 18px 18px !important; }
.article .article-title h2 { font-size: 1.05rem !important; font-weight: 800; line-height: 1.35; }
.article .article-details p { font-size: .92rem; line-height: 1.55 !important; margin-bottom: 12px; opacity: .85; }
.article .article-cta { text-align: left !important; }
.article .article-badge { left: 14px !important; bottom: 14px !important; }
.article .article-badge-item { border-radius: 999px !important; font-weight: 800; padding: 5px 12px !important; }

/* gallery: even square grid instead of fixed 129px floats */
.gallery.gallery-md {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.gallery.gallery-md .gallery-item {
  width: auto !important;
  height: auto !important;
  aspect-ratio: 1;
  margin: 0 !important;
  border-radius: 12px;
  background-size: cover;
}

/* QR + enquiry form */
.code { display: flex; justify-content: center; }
.code canvas { padding: 10px; background: #fff; border-radius: 16px; }
#enquiryform .form-control { border-radius: 12px; min-height: 44px; }
#enquiryform .card-footer { padding: 0; background: none; }
#enquiryform .btn { border-radius: 999px; padding: 9px 26px; font-weight: 700; }

/* theme_two: keep the name readable on top of the banner photo */
.bg-image { position: relative; min-height: 170px; }
.bg-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .65));
}
.bg-image .profile-header { position: relative; z-index: 1; transform: translateY(4.2rem); }
.bg-image .profile img { width: 112px; border-radius: 20px !important; border: 4px solid #fff; padding: 0; }
.bg-image .media-body h4 { color: #fff !important; font-weight: 800; text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.bg-image .media-body p { color: rgba(255, 255, 255, .9) !important; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
h6.bg-light { padding-top: 3.6rem !important; line-height: 1.55; margin: 0; }

/* footer branding */
body > .row.p-3 { margin: 0; }
body > .row.p-3 a { font-size: .8rem; font-weight: 700; padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .25); }

@media (max-width: 380px) {
  .btn.btn-outline-dark.col-md-5 { font-size: .8rem; }
  .article .article-header { height: 160px !important; }
}

/* theme_four wraps its buttons in .social-buttons instead of a .row */
.social-buttons { display: flex; gap: 10px; flex-wrap: nowrap; justify-content: center; }

/* theme_three: avatar overlaps the top edge — leave room and don't clip it */
body > .container > .row > [class*="col"] > .card.card-profile { overflow: visible; margin-top: 70px !important; }
.card-profile-image img { border-radius: 50% !important; border: 5px solid var(--card-gb); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5); width: 150px; height: 150px; object-fit: cover; }

/* WhatsApp share button next to Save contact / Share */
.card .row.justify-content-center:has(> .btn-whatsapp),
.card span.row.justify-content-center,
.social-buttons { flex-wrap: wrap !important; }
.btn.btn-whatsapp.col-md-5,
.btn.btn-outline-dark.col-md-5 { flex: 1 1 130px; }
.btn.btn-whatsapp.col-md-5 {
  max-width: none;
  margin: 0 !important;
  padding: 11px 10px;
  border-radius: 999px;
  border: 2px solid #25D366;
  background: #25D366;
  color: #fff !important;
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
}
.btn.btn-whatsapp.col-md-5:hover { background: #1ebe5b; border-color: #1ebe5b; }
.btn.btn-whatsapp.col-md-5 i { margin-right: 6px; font-size: 1.05em; }

/* same tile layout for the original templates */
.card .row.justify-content-center:has(> .btn-whatsapp),
.card span.row.justify-content-center:has(> .btn-whatsapp),
.social-buttons:has(> .btn-whatsapp) {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
}
.btn.btn-whatsapp.col-md-5,
.card .row:has(> .btn-whatsapp) .btn.btn-outline-dark.col-md-5,
.social-buttons:has(> .btn-whatsapp) .btn.btn-outline-dark.col-md-5 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  padding: 10px 4px;
  border-radius: 16px;
  font-size: .78rem;
  line-height: 1.2;
  white-space: normal;
}
.btn.btn-whatsapp.col-md-5 i,
.card .row:has(> .btn-whatsapp) .btn.btn-outline-dark.col-md-5 i,
.social-buttons:has(> .btn-whatsapp) .btn.btn-outline-dark.col-md-5 i { margin: 0 !important; font-size: 1.1rem; }
