:root {
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-soft: #f6f9ff;
  --text: #1f2c3b;
  --muted: #5a6778;
  --primary: #0d58b3;
  --primary-dark: #0a458d;
  --line: #d7e1ee;
  --success-bg: #ddf4e4;
  --success-text: #1d5f2e;
  --error-bg: #f8dde1;
  --error-text: #7b1f2b;
  --shadow-sm: 0 8px 20px rgba(18, 48, 90, 0.08);
  --shadow-md: 0 14px 34px rgba(18, 48, 90, 0.13);
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@keyframes heroLogoFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

body {
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -20%, rgba(13, 88, 179, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(9, 70, 145, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a {
  color: var(--primary);
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.hero {
  padding: 44px 0 36px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-md);
  padding: clamp(18px, 3vw, 32px);
  overflow: hidden;
}

.hero-copy {
  background: rgba(255, 255, 255, 0.5);
  padding: 16px 18px;
  border-radius: 12px;
  backdrop-filter: blur(2px);
}

.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #143763;
}

.hero-kicker {
  color: #1a5cad;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.hero-tagline {
  margin-top: 10px;
  color: #167b3b;
  font-weight: 700;
  font-size: 1.14rem;
}

.hero-subtitle {
  margin-top: 10px;
  color: var(--muted);
}

.hero-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  min-height: 43px;
  padding: 0 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: #233752;
}

.hero-media {
  display: flex;
  justify-content: center;
}

.hero-logo {
  width: min(430px, 100%);
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 10px;
  animation: heroLogoFadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.site-nav.shadow {
  box-shadow: 0 10px 24px rgba(5, 43, 90, 0.28);
}

.nav-shell {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: relative;
}

.nav-brand {
  text-decoration: none;
  color: #fff;
  text-transform: uppercase;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.12);
  color: #fff;
  border-radius: 8px;
  min-height: 38px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 700;
}

.nav-menu {
  margin-left: auto;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 8px;
}

.nav-list a {
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
}

.nav-list a.active,
.nav-list a:hover {
  background: rgba(0, 0, 0, 0.24);
}

.section {
  padding: 44px 0;
}

.section-about,
.section-projects,
.section-contact {
  background: transparent;
}

.section-reviews,
.section-facebook,
.section-services {
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(215, 225, 238, 0.8);
  border-bottom: 1px solid rgba(215, 225, 238, 0.8);
}

.section h2 {
  text-align: center;
  color: #2b3a4d;
  font-size: clamp(1.8rem, 2.4vw, 2.2rem);
}

.underline {
  margin: 10px auto 24px;
  width: 62px;
  height: 4px;
  background: #1e9dff;
  border-radius: 3px;
}

.card,
.service-card,
.review-card,
.contact-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card {
  padding: 24px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}

.about-text p + p {
  margin-top: 11px;
}

.about-text .lead {
  font-weight: 700;
  color: #2b4466;
}

.references-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.references-card h3 {
  text-align: center;
  margin-bottom: 0;
  color: #253e62;
}

.references-grid {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 250px;
  overflow: auto;
  padding-right: 2px;
}

.references-grid .media-tile {
  aspect-ratio: 4 / 5;
  min-height: 110px;
  border: 1px solid var(--line);
  background: #fff;
}

.references-grid .media-tile img {
  object-fit: contain;
  background: #fff;
}

.references-note {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.media-tile {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  width: 100%;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}

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

.media-cover {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 390px;
  border: 1px solid var(--line);
  background: #fff;
}

.media-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface-soft);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.reviews-embeds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.embed-wrapper {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.embed-wrapper iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

.embed-google {
  min-height: 400px;
}

.embed-facebook {
  min-height: 500px;
}

.embed-placeholder {
  padding: 18px;
  text-align: center;
}

.embed-placeholder p {
  margin: 8px 0;
  color: var(--muted, #5b6b82);
}

.review-card {
  padding: 18px;
}

.review-card h3 {
  margin-bottom: 7px;
  color: #253f63;
}

.rating {
  margin-top: 8px;
  font-weight: 700;
  color: #204f93;
}

.projects-grid,
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.projects-grid .media-tile {
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.projects-grid .media-tile img {
  height: 220px;
}

.map-container {
  margin-top: 18px;
  background: var(--surface-soft);
}

.map-container p {
  text-align: center;
  margin-bottom: 10px;
  font-weight: 700;
  color: #2f4566;
}

.service-card {
  padding: 20px;
}

.service-card h3 {
  margin-bottom: 8px;
  color: #253f63;
}

.fb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}

.fb-grid iframe {
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-item {
  text-align: center;
  padding: 16px;
  margin-bottom: 10px;
}

.contact-item h3 {
  margin-bottom: 6px;
  color: #253f63;
}

.contact-form-wrap h3 {
  margin-bottom: 8px;
  color: #253f63;
}

.contact-form-wrap p {
  color: var(--muted);
}

.contact-form {
  margin-top: 10px;
}

.contact-form label,
.admin-form label {
  display: block;
  margin-top: 10px;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea,
.admin-form input,
.admin-form textarea {
  width: 100%;
  margin-top: 5px;
  border: 1px solid #cad8ea;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  font: inherit;
}

.contact-form button,
.admin-form button {
  margin-top: 14px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  padding: 0 14px;
}

.contact-form button:hover,
.admin-form button:hover {
  background: var(--primary-dark);
}

footer {
  margin-top: 6px;
  text-align: center;
  padding: 24px 14px 30px;
  background: var(--primary);
  color: #e7f0fb;
}

.admin-link {
  margin-top: 8px;
}

.admin-link a {
  color: #c7defe;
  text-decoration: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(9, 28, 54, 0.86);
  z-index: 3000;
}

.lightbox[aria-hidden="false"] {
  display: flex;
}

.lightbox img {
  max-width: min(1050px, 92vw);
  max-height: 84vh;
  border-radius: 10px;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Admin */
.admin-body {
  background: #eef2f7;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #18345a;
  color: #edf4ff;
  padding: 14px 4vw;
}

.admin-topbar h1 {
  font-size: clamp(1.04rem, 2.2vw, 1.44rem);
}

.admin-topbar-actions {
  display: flex;
  gap: 12px;
}

.admin-topbar-actions a {
  color: #cbe0ff;
  text-decoration: none;
}

.preview-banner {
  padding: 14px 4vw;
  background: #fffae6;
  color: #6d4e00;
  border-bottom: 1px solid #ffe29d;
  text-align: center;
}

.preview-banner p {
  margin: 0;
  line-height: 1.4;
}

/* Admin navigation */
.admin-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.admin-nav button#admin-nav-toggle {
  display: none;
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.admin-nav ul {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}

.admin-nav a {
  display: inline-block;
  padding: 8px 10px;
  color: #18345a;
  text-decoration: none;
  border-radius: 8px;
  background: #f3f8ff;
}

.admin-nav a:hover,
.admin-nav a:focus {
  background: #e6f2ff;
}

@media (max-width: 820px) {
  .admin-nav ul {
    display: none;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6eef8;
    width: 100%;
    position: absolute;
    left: 0;
    top: 64px;
    z-index: 60;
    padding: 8px;
  }

  .admin-nav button#admin-nav-toggle {
    display: inline-block;
  }

  .admin-nav.open ul {
    display: flex;
  }
}

.admin-main {
  width: min(1080px, 94vw);
  margin: 20px auto 34px;
}

.admin-form-grid {
  display: grid;
  gap: 14px;
}

.admin-section {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #d3dfef;
  padding: 0;
  overflow: hidden;
}

.admin-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: #f7fbff;
  border-bottom: 1px solid #dbeaf7;
}

.admin-section summary::-webkit-details-marker,
.admin-section summary::marker {
  display: none;
}

.admin-section summary::after {
  content: '▾';
  font-size: 1.1rem;
  color: #2a4f7b;
}

.admin-section[open] summary::after {
  content: '▴';
}

.admin-section summary h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.admin-section > *:not(summary) {
  padding: 16px 18px 20px;
}

.admin-section.hidden {
  display: none !important;
}

.admin-messages {
  overflow-x: auto;
  margin-top: 10px;
}

.admin-messages table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.admin-messages th,
.admin-messages td {
  border: 1px solid #e4ecf7;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.admin-messages th {
  background: #f5f9ff;
  color: #1f3558;
}

.admin-messages td {
  background: #fafbfd;
}

.admin-section h2 {
  text-align: left;
  margin-bottom: 6px;
  color: #1f3558;
  font-size: 1.18rem;
}

.admin-subsection {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e4ecf7;
}

.admin-subsection h3 {
  font-size: 1rem;
  color: #2e4567;
}

.admin-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-actions button {
  min-width: 180px;
}

.auth-card {
  width: min(460px, 92vw);
  margin: 58px auto;
  background: #fff;
  border: 1px solid #d3dfef;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.auth-card h1 {
  margin-bottom: 8px;
}

.hint {
  margin-top: 12px;
  color: #60708a;
  font-size: 0.92rem;
}

.alert {
  border-radius: 8px;
  padding: 9px 11px;
  margin-bottom: 10px;
  font-weight: 600;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.alert-error {
  background: var(--error-bg);
  color: var(--error-text);
}

.alert-info {
  background: #d9e9ff;
  color: #1f4f8b;
}

@media (max-width: 1040px) {
  .about-grid,
  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .references-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reviews-embeds {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .hero {
    padding: 24px 0 20px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: clamp(14px, 2vw, 20px);
    gap: 16px;
  }

  .hero-copy {
    padding: 12px 14px;
  }

  .hero-copy h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    background: var(--primary);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    display: none;
    padding: 10px 0 14px;
  }

  .nav-menu.open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
  }

  .section {
    padding: 36px 0;
  }
}

@media (max-width: 620px) {
  .hero {
    padding: 16px 0 14px;
  }

  .hero-inner {
    padding: clamp(12px, 1.5vw, 16px);
    gap: 12px;
  }

  .hero-copy {
    padding: 10px 12px;
  }

  .hero-copy h1 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
  }

  .hero-kicker {
    font-size: 0.7rem;
    margin-bottom: 4px;
  }

  .hero-tagline {
    font-size: 0.9rem;
    margin-top: 6px;
  }

  .hero-subtitle {
    font-size: 0.85rem;
    margin-top: 6px;
  }

  .hero-actions {
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    min-height: 36px;
  }

  .references-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 240px;
  }

  .fb-grid {
    grid-template-columns: 1fr;
  }

  .hero-logo {
    width: min(320px, 90vw);
    max-height: 240px;
  }

  .reviews-embeds {
    grid-template-columns: 1fr;
  }

  .embed-google {
    min-height: 350px;
  }

  .embed-facebook {
    min-height: 450px;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .fb-grid iframe {
    min-height: 390px;
  }
}

