/* Painite Modern Architecture — security, technology, luxury and reliability.
   This layer modernizes the existing CMS-rendered components without replacing their content. */
:root {
  --painite-ink: #0b1424;
  --painite-ink-soft: #17263b;
  --painite-cyan: #12aeb5;
  --painite-cyan-bright: #45e0dc;
  --painite-gold: #d9b978;
  --painite-cloud: #f4f7fb;
  --painite-line: #dce4ee;
  --painite-elevation: 0 18px 55px rgba(11, 20, 36, .09);
  --painite-elevation-hover: 0 26px 70px rgba(11, 20, 36, .15);
}

html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  background: var(--site-bg, var(--painite-cloud));
  color: var(--site-text, #253248);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { color: #fff; background: var(--primary, var(--painite-cyan)); }
.container, .container-fluid { --bs-gutter-x: 1.5rem; }
.container-xxl, .container { width: 100%; }

/* A calmer, high-trust top bar and glassy navigation */
.topbar { font-size: .82rem; letter-spacing: .015em; }
.painite-custom-navbar {
  isolation: isolate;
  border-bottom: 1px solid color-mix(in srgb, var(--site-border, #dce4ee) 70%, transparent) !important;
  box-shadow: 0 8px 30px rgba(11, 20, 36, .055) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding-inline: clamp(1rem, 4vw, 4rem) !important;
}
.painite-custom-navbar .navbar-brand { gap: .65rem; }
.painite-custom-navbar .navbar-brand h2 {
  letter-spacing: -.045em;
  font-weight: 750 !important;
}
.painite-custom-navbar .site-logo { transition: transform .25s ease; }
.painite-custom-navbar .navbar-brand:hover .site-logo { transform: translateY(-1px); }
.painite-custom-navbar .navbar-nav .nav-link {
  position: relative;
  letter-spacing: .015em;
  font-weight: 600 !important;
}
.painite-custom-navbar .navbar-nav > .nav-link::after,
.painite-custom-navbar .navbar-nav > .nav-item > .nav-link::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 12px;
  height: 2px; border-radius: 4px; transform: scaleX(0); transform-origin: left;
  background: var(--primary, var(--painite-cyan)); transition: transform .22s ease;
}
.painite-custom-navbar .navbar-nav > .nav-link:hover::after,
.painite-custom-navbar .navbar-nav > .nav-link.active::after,
.painite-custom-navbar .navbar-nav > .nav-item > .nav-link:hover::after,
.painite-custom-navbar .navbar-nav > .nav-item > .nav-link.active::after { transform: scaleX(1); }
.painite-custom-navbar .dropdown-menu {
  padding: .55rem !important; margin-top: .45rem !important;
  box-shadow: 0 20px 55px rgba(11,20,36,.16) !important;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.painite-custom-navbar .dropdown-item { transition: background .18s ease, color .18s ease, transform .18s ease; }
.painite-custom-navbar .dropdown-item:hover { transform: translateX(2px); }

/* Typography: premium editorial hierarchy, clear contrast and comfortable reading */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -.035em;
  line-height: 1.15;
  text-wrap: balance;
}
h1, .display-1, .display-2, .display-3, .display-4, .display-5 {
  font-weight: var(--site-heading-weight, 700);
}
p, li { line-height: var(--site-line-height, 1.7); }
.text-muted { color: var(--site-muted, #65748b) !important; }
.bg-primary { background-color: var(--primary, var(--painite-cyan)) !important; }
.text-primary { color: var(--primary, var(--painite-cyan)) !important; }
.border-primary { border-color: var(--primary, var(--painite-cyan)) !important; }

/* Stronger, consistent page rhythm while respecting the CMS spacing settings */
section.py-5, .container-fluid.py-5:not(.footer), .container-xxl.py-5 {
  position: relative;
}
.container-xxl.py-5 > .container > .text-center,
.container-fluid.py-5 > .container > .text-center { margin-bottom: clamp(2rem, 4vw, 3.6rem); }
.container-xxl.py-5 > .container > .text-center h1,
.container-fluid.py-5 > .container > .text-center h1,
.container-xxl.py-5 > .container > .text-center h2,
.container-fluid.py-5 > .container > .text-center h2 { max-width: 850px; margin-inline: auto; }

/* Hero slider: dramatic, polished, readable overlay, no changes to editable content */
.header-carousel { overflow: hidden; border-radius: 0 0 30px 30px; }
.header-carousel .owl-carousel-item {
  min-height: var(--hero-height-mobile, 500px);
  overflow: hidden;
  isolation: isolate;
  background: var(--painite-ink);
}
.header-carousel .owl-carousel-item > img,
.header-carousel .owl-carousel-item > video {
  width: 100%; height: 100%; min-height: var(--hero-height-mobile, 500px);
  object-fit: cover; object-position: center;
  filter: saturate(.88) contrast(1.04);
  transform: scale(1.015);
}
.header-carousel .owl-carousel-item::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(5,13,27,.88) 0%, rgba(5,13,27,.66) 43%, rgba(5,13,27,.2) 100%),
              linear-gradient(0deg, rgba(5,13,27,.28), transparent 55%);
}
.header-carousel .carousel-inner { z-index: 1; background: transparent !important; }
.header-carousel .carousel-inner > .container { position: relative; z-index: 2; }
.header-carousel .carousel-inner .row { align-items: center; }
.header-carousel .carousel-inner h1 {
  max-width: 900px; font-size: clamp(2.45rem, 5.2vw, 5.2rem) !important;
  line-height: 1.03; letter-spacing: -.06em; font-weight: 800;
  text-shadow: 0 4px 24px rgba(0,0,0,.22); margin-bottom: 1.35rem !important;
}
.header-carousel .carousel-inner p {
  max-width: 690px; font-size: clamp(1rem, 1.3vw, 1.22rem) !important;
  color: rgba(255,255,255,.88); line-height: 1.8;
}
.header-carousel .carousel-inner .text-center p { margin-inline: auto; }
.header-carousel .carousel-inner .btn { padding: .95rem 1.5rem !important; font-weight: 700; box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.header-carousel .carousel-inner .btn-primary { border: 1px solid transparent; }
.header-carousel .carousel-inner .btn-light { background: rgba(255,255,255,.94); border-color: rgba(255,255,255,.7); color: var(--painite-ink); }
.header-carousel .owl-nav button { border-radius: 50% !important; backdrop-filter: blur(12px); }

/* Cards, services, products, projects and team blocks share one elevated system */
.card, .service-item, .project-item, .team-item, .testimonial-item,
.pricing-item, .product-item, .why-item, .feature-item {
  border: 1px solid var(--site-border, var(--painite-line));
  border-radius: var(--site-radius, 16px);
  box-shadow: var(--site-shadow, var(--painite-elevation));
  overflow: hidden;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.card:hover, .service-item:hover, .project-item:hover, .team-item:hover,
.pricing-item:hover, .product-item:hover, .why-item:hover, .feature-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--painite-elevation-hover);
  border-color: color-mix(in srgb, var(--primary, var(--painite-cyan)) 38%, var(--site-border, #dce4ee));
}
.service-row { gap: 1rem 0 !important; }
.service-row > [class*="col-"] { padding: .5rem; }
.cms-section-wrapper .service-item {
  padding: clamp(1.4rem, 2.4vw, 2.25rem) !important;
  background: var(--site-surface, #fff);
}
.cms-section-wrapper .service-item .btn-square { background: color-mix(in srgb, var(--primary, var(--painite-cyan)) 10%, white) !important; }
.cms-section-wrapper .service-item .btn-square img { max-width: 34px; max-height: 34px; object-fit: contain; }
.cms-section-wrapper .service-item h4 { margin-top: .2rem; font-weight: 750; letter-spacing: -.025em; }
.cms-section-wrapper .service-item > p { color: var(--site-muted, #65748b); }
.cms-section-wrapper .service-item > .btn {
  width: auto; min-width: 140px; min-height: 44px; justify-content: center;
  padding: .72rem 1rem; margin-top: auto; border-radius: var(--site-button-radius, 9px);
  background: var(--primary, var(--painite-cyan)); color: var(--site-button-text, #fff);
  font-weight: 700; text-align: center;
}
.cms-section-wrapper .service-item > .btn i { margin-right: .55rem !important; }
.cms-section-wrapper .service-item:hover > .btn { width: auto; }

/* Images are art-directed and bounded to avoid giant source images breaking layouts */
.cms-section-wrapper img, .cms-section-wrapper video { max-width: 100%; }
.cms-section-wrapper .media-cover, .cms-section-wrapper .project-item img,
.cms-section-wrapper .team-item img, .cms-section-wrapper .product-item img {
  object-fit: cover; object-position: center;
}
.cms-section-wrapper .project-item img, .cms-section-wrapper .team-item img,
.cms-section-wrapper .product-item img { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.cms-section-wrapper .project-item:hover img, .cms-section-wrapper .team-item:hover img,
.cms-section-wrapper .product-item:hover img { transform: scale(1.035); }

/* CTA panels and page headers */
.quote-cta, .quote-cta-section, .cta-section {
  position: relative; isolation: isolate; overflow: hidden;
  background-image: linear-gradient(125deg, var(--painite-ink), var(--painite-ink-soft));
  color: #fff;
}
.quote-cta::before, .quote-cta-section::before, .cta-section::before {
  content: ""; position: absolute; inset: auto -8% -65% auto; width: 50vw; height: 50vw;
  border-radius: 50%; border: 1px solid rgba(69,224,220,.18); box-shadow: 0 0 0 38px rgba(69,224,220,.035), 0 0 0 76px rgba(69,224,220,.025);
  z-index: -1; pointer-events: none;
}
.page-header { background-color: var(--painite-ink) !important; background-image: linear-gradient(110deg, rgba(8,18,34,.95), rgba(17,42,64,.76)) !important; }
.page-header h1 { color: #fff; letter-spacing: -.045em; }
.breadcrumb-item, .breadcrumb-item a { color: rgba(255,255,255,.8); }

/* About and feature content */
.about-text { background: var(--site-surface, #fff); }
.about-text h1, .about-text h2 { letter-spacing: -.045em; }
.about-text .btn-square { box-shadow: 0 8px 24px rgba(11,20,36,.08); }
.bg-light { background-color: var(--site-bg, var(--painite-cloud)) !important; }

/* Buttons and form fields: polished, accessible focus, consistent behavior */
.btn {
  font-weight: 650; letter-spacing: .005em;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn:not(.btn-link):not(.btn-square):hover { transform: translateY(-1px); }
.btn-primary { box-shadow: 0 8px 20px color-mix(in srgb, var(--primary, var(--painite-cyan)) 20%, transparent); }
.btn-primary:hover { box-shadow: 0 12px 28px color-mix(in srgb, var(--primary, var(--painite-cyan)) 28%, transparent); }
.form-control, .form-select {
  min-height: 48px; border-radius: 10px; border-color: var(--site-border, var(--painite-line));
  box-shadow: none; transition: border-color .2s ease, box-shadow .2s ease;
}
textarea.form-control { min-height: 130px; }
.form-control:focus, .form-select:focus {
  border-color: var(--primary, var(--painite-cyan));
  box-shadow: 0 0 0 .22rem color-mix(in srgb, var(--primary, var(--painite-cyan)) 14%, transparent);
}
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary, var(--painite-cyan)) 70%, white); outline-offset: 3px; }

/* Trust-oriented footer: dark, structured, quieter than the main content */
.footer {
  background: linear-gradient(135deg, #0b1424 0%, #111f33 100%) !important;
  color: #bdc8d7 !important; border-top: 3px solid var(--primary, var(--painite-cyan));
}
.footer h5 { color: #fff !important; font-weight: 750; letter-spacing: -.02em; }
.footer a { color: #c7d2e0; text-decoration: none; transition: color .2s ease, transform .2s ease; }
.footer a:hover { color: var(--painite-cyan-bright); }
.footer .btn-outline-secondary { border-color: rgba(255,255,255,.2); color: #eaf0f8; }
.footer .btn-outline-secondary:hover { background: var(--painite-cyan); border-color: var(--painite-cyan); color: #071421; }
.footer .form-control { color: #fff; border-color: rgba(255,255,255,.22); }
.footer .form-control::placeholder { color: #9baabe; }

/* Product, cart, account, checkout, and contact interfaces */
.table { --bs-table-border-color: var(--site-border, var(--painite-line)); }
.table thead th { color: var(--site-heading, var(--painite-ink)); font-weight: 700; background: color-mix(in srgb, var(--site-bg, #f4f7fb) 80%, white); }
.alert, .modal-content, .dropdown-menu { border-radius: var(--site-radius, 16px); }
.modal-content { border: 1px solid var(--site-border, var(--painite-line)); box-shadow: 0 28px 80px rgba(11,20,36,.18); }
.breadcrumb { font-size: .92rem; }

/* Default Secure Luxury preset: dark navigation, technology-cyan accent and warm metallic detail */
html[data-site-theme="secure_luxury"] {
  --primary: #12aeb5;
  --site-bg: #f4f7fb;
  --site-surface: #ffffff;
  --site-text: #253248;
  --site-muted: #65748b;
  --site-nav-bg: #0b1424;
  --site-heading: #0b1424;
  --site-link: #0b929a;
  --site-border: #dce4ee;
  --site-button-text: #ffffff;
  --site-radius: 16px;
  --site-button-radius: 9px;
  --site-shadow: 0 14px 40px rgba(11,20,36,.07);
}
html[data-site-theme="secure_luxury"] .painite-custom-navbar .navbar-toggler { border-color: rgba(255,255,255,.3); }
html[data-site-theme="secure_luxury"] .painite-custom-navbar .navbar-toggler-icon { filter: invert(1); }
html[data-site-theme="secure_luxury"] .painite-custom-navbar .navbar-brand h2 { color: #fff !important; }
html[data-site-theme="secure_luxury"] .painite-custom-navbar .nav-link.active::before { color: var(--painite-gold); }
html[data-site-theme="secure_luxury"] .header-carousel .carousel-inner .btn-primary { background: linear-gradient(135deg, #12aeb5, #45e0dc); color: #071421; }
html[data-site-theme="secure_luxury"] .header-carousel .carousel-inner .btn-light { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.42); }
html[data-site-theme="secure_luxury"] .container-xxl.py-5 > .container > .text-center > .bg-primary,
html[data-site-theme="secure_luxury"] .container-fluid.py-5 > .container > .text-center > .bg-primary { border-radius: 999px; height: 3px !important; }
html[data-site-theme="secure_luxury"] .footer { border-top-color: var(--painite-gold); }

@media (min-width: 992px) {
  .header-carousel .owl-carousel-item, .header-carousel .owl-carousel-item > img,
  .header-carousel .owl-carousel-item > video { min-height: var(--hero-height-desktop, 70vh); }
}
@media (max-width: 991.98px) {
  .painite-custom-navbar { padding-inline: 1rem !important; }
  .painite-custom-navbar .navbar-nav > .nav-link::after,
  .painite-custom-navbar .navbar-nav > .nav-item > .nav-link::after { display: none; }
  .painite-custom-navbar .navbar-collapse { padding-bottom: .6rem; }
  .header-carousel { border-radius: 0 0 20px 20px; }
  .header-carousel .carousel-inner { padding-inline: .75rem; }
  .header-carousel .carousel-inner .btn { margin-bottom: .6rem; }
  .service-row > [class*="col-"] { padding: .45rem; }
}
@media (max-width: 575.98px) {
  .header-carousel .owl-carousel-item, .header-carousel .owl-carousel-item > img,
  .header-carousel .owl-carousel-item > video { min-height: max(430px, var(--hero-height-mobile, 500px)); }
  .header-carousel .carousel-inner h1 { font-size: clamp(2.1rem, 10vw, 3rem) !important; }
  .header-carousel .carousel-inner p { font-size: 1rem !important; }
  .header-carousel .carousel-inner .btn { padding: .8rem 1.1rem !important; }
  .back-to-top { right: 18px !important; bottom: 18px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Global typography and layout consistency pass (2026-10-11).
   Long-form copy is fully justified; compact navigation/UI labels remain naturally aligned for readability. */
html { text-rendering: optimizeLegibility; }
body { text-align: start; }
main, .main-content, .page-content { min-width: 0; }
section, .section, .content-section { box-sizing: border-box; }
section > .container, .section > .container, .content-section > .container { width: 100%; margin-inline: auto; }
/* Fully justify prose rather than controls, headings, or short labels. */
main p:not(.text-center):not(.text-start):not(.text-end),
section p:not(.text-center):not(.text-start):not(.text-end),
.content p:not(.text-center):not(.text-start):not(.text-end),
.content-body p:not(.text-center):not(.text-start):not(.text-end),
.section-description,
.service-card .card-text,
.card-body .description,
.about-content p,
.service-content p,
.article-content p,
.page-content p,
.rich-text p,
blockquote:not(.text-center) {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  overflow-wrap: anywhere;
}
/* Keep headings and controls consistently aligned, without stretching short lines. */
h1, h2, h3, h4, h5, h6 { text-align: start; line-height: 1.2; }
button, .btn, input, select, textarea, label, .badge, .nav-link, .navbar-brand,
.table th, .table td, .breadcrumb, .pagination, .form-text { text-align: start; }
/* Consistent section widths and vertical rhythm. */
.row { align-items: stretch; }
.card, .service-item, .portfolio-item, .feature-item, .team-item, .testimonial-item { height: 100%; }
.card { display: flex; flex-direction: column; }
.card > .card-body { flex: 1 1 auto; }
.card .card-footer { margin-top: auto; }
/* Align repeated action buttons to the same baseline. */
.service-item, .portfolio-item, .feature-item { display: flex; flex-direction: column; }
.service-item .btn, .portfolio-item .btn, .feature-item .btn,
.card .btn-read-more, .card .read-more, .card a.btn { align-self: flex-start; margin-top: auto; }
/* Prevent oversized images from breaking a section's geometry. */
main img, section img, .content img, .page-content img, .rich-text img {
  max-width: 100%; height: auto; object-fit: contain;
}
.container img, .row img { min-width: 0; }
/* Tables, forms and media remain inside their parent width. */
.table-responsive { max-width: 100%; overflow-x: auto; }
input, select, textarea, .form-control, .form-select { max-width: 100%; }
@media (max-width: 767.98px) {
  section, .section, .content-section { overflow-wrap: anywhere; }
  main p:not(.text-center):not(.text-start):not(.text-end),
  section p:not(.text-center):not(.text-start):not(.text-end),
  .content-body p:not(.text-center):not(.text-start):not(.text-end),
  .section-description, .service-card .card-text, .page-content p, .rich-text p {
    text-align: justify;
    text-justify: inter-word;
  }
}
