:root {
  --bg: #f5f8fc;
  --surface: #ffffff;
  --text: #0e2c4f;
  --muted: #4a5f79;
  --brand-blue: #0b4f8c;
  --brand-orange: #d46008;
  --line: #d7e0ea;
  --shadow: 0 14px 40px rgba(11, 79, 140, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Barlow", sans-serif;
  background: radial-gradient(circle at top right, #e8eef8 0, var(--bg) 40%, #f2f7ff 100%);
  color: var(--text);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.brand-text {
  font-family: "Urbanist", sans-serif;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.main-nav a {
  color: var(--muted);
  font-weight: 600;
  position: relative;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--brand-blue);
}

.main-nav a.active::after,
.main-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-orange));
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}

.hero,
.page-hero {
  padding: 4rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--brand-orange);
}

h1 {
  font-family: "Urbanist", sans-serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  margin: 0.5rem 0 1rem;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 64ch;
}

.hero-card,
.card,
.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.hero-image {
  width: 100%;
  height: min(360px, 48vw);
  max-height: 360px;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  display: block;
}

.media-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  display: block;
  margin-bottom: 0.9rem;
}

.gallery-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  display: block;
}

.gallery-card figcaption {
  padding: 0.65rem 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.muted-text {
  color: var(--muted);
  font-weight: 600;
  margin: 0.2rem 0 0.5rem;
}

.hero-card ul {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.9;
}

.section {
  padding: 2.5rem 0;
}

.section-muted {
  background: linear-gradient(180deg, rgba(11, 79, 140, 0.06), rgba(212, 96, 8, 0.06));
}

.slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.slider-controls {
  display: flex;
  gap: 0.45rem;
}

.slider-controls-right {
  justify-content: flex-end;
  margin-bottom: 0.8rem;
}

.slider-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #c8d6e6;
  background: #fff;
  color: #23486e;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
}

.slider-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.image-slider {
  position: relative;
}

.slider-viewport {
  overflow: hidden;
}

.slider-track {
  display: flex;
  gap: 1rem;
  transition: transform 260ms ease;
  will-change: transform;
}

.slide-item {
  flex: 0 0 calc((100% - 2rem) / 3);
  min-width: 0;
}

.grid-2,
.grid-3,
.stats,
.footer-grid {
  display: grid;
  gap: 1rem;
}

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

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

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  text-align: center;
}

.stats h3 {
  margin: 0;
  font-size: 2rem;
  color: var(--brand-blue);
}

.cta-row {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.btn {
  display: inline-block;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(120deg, var(--brand-blue), #0a3e73);
  color: #fff;
}

.btn-outline {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: #fff;
}

.contact-form {
  display: grid;
  gap: 0.6rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.72rem;
  font: inherit;
}

.alert {
  border-radius: 10px;
  padding: 0.8rem;
  margin-bottom: 0.9rem;
}

.alert.success {
  background: #e6f9ef;
  border: 1px solid #9ddab7;
  color: #115d37;
}

.alert.error {
  background: #ffecec;
  border: 1px solid #f3b2b2;
  color: #7a1f1f;
}

.admin-hero-card .alert.success {
  background: rgba(230, 249, 239, 0.14);
  border: 1px solid rgba(168, 232, 193, 0.55);
  color: #edfff4;
}

.site-footer {
  margin-top: 2rem;
  background: #082f56;
  color: #e6f2ff;
  padding: 2rem 0 1rem;
}

.footer-grid {
  grid-template-columns: 1.3fr 1fr 1fr;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  text-align: center;
  font-size: 0.93rem;
  display: grid;
  gap: 0.3rem;
}

.copyright a {
  color: #ffd9b0;
  text-decoration: underline;
}

.admin-layout {
  width: min(1320px, 96%);
  margin: 1.2rem auto 3rem;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 1rem;
}

.admin-sidebar-inner {
  background: #fff;
  border: 1px solid #d7e0ea;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(10, 36, 68, 0.08);
  padding: 0.9rem;
}

.admin-sidebar-inner h2 {
  margin: 0.35rem 0 0.7rem;
  font-size: 1.05rem;
}

.admin-side-nav {
  display: grid;
  gap: 0.45rem;
}

.admin-side-nav a {
  display: block;
  padding: 0.52rem 0.65rem;
  border-radius: 10px;
  border: 1px solid #d6e2ef;
  background: #f4f8fc;
  color: #214a78;
  font-weight: 700;
}

.admin-side-nav a:hover {
  background: #e7f0fb;
}

.admin-side-nav a.active {
  background: linear-gradient(120deg, #0d4f8b, #0a3f74);
  border-color: #0a3f74;
  color: #fff;
}

.admin-side-actions {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.45rem;
}

.admin-side-actions .btn {
  text-align: center;
}

.admin-wrap {
  display: grid;
  gap: 1rem;
}

.admin-card {
  background: #fff;
  border: 1px solid #d7e0ea;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(10, 36, 68, 0.08);
  padding: 1rem;
}

.admin-page-section {
  scroll-margin-top: 92px;
}

.admin-hero-card {
  background: linear-gradient(130deg, #0d3f73, #0f568a);
  color: #fff;
  border-color: transparent;
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-top h1 {
  margin: 0.2rem 0 0;
  color: #fff;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
}

.admin-actions {
  display: flex;
  gap: 0.6rem;
}

.admin-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.9;
}

.admin-hero-card .btn-outline {
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
  background: transparent;
}

.admin-hero-card .btn-primary {
  background: linear-gradient(130deg, #dd6a0c, #f08c32);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.8rem;
}

.admin-stat {
  background: #fff;
  border: 1px solid #d7e0ea;
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.admin-stat h3 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--brand-blue);
}

.admin-stat p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-weight: 600;
}

.admin-card h2 {
  margin: 0 0 0.8rem;
  font-size: 1.2rem;
}

.admin-card h3 {
  margin: 1.1rem 0 0.6rem;
}

.admin-settings-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1rem;
}

.admin-settings-form button {
  width: fit-content;
  margin-top: 0.6rem;
}

.admin-item-row {
  border: 1px solid #e2e9f0;
  border-radius: 12px;
  padding: 0.65rem;
  margin-bottom: 0.7rem;
  background: #f8fbff;
}

.admin-item-form {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: center;
}

.admin-item-form input[type="text"],
.admin-item-form input[type="url"],
.admin-item-form input[type="number"] {
  border: 1px solid #cfdae7;
  border-radius: 9px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  width: 100%;
  min-width: 0;
}

.admin-item-form textarea,
.admin-settings-form textarea {
  border: 1px solid #cfdae7;
  border-radius: 9px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  width: 100%;
  min-width: 0;
  min-height: 90px;
  resize: vertical;
}

.admin-item-form .wide-field,
.admin-settings-form .wide-field {
  grid-column: span 2;
}

.admin-item-form input[type="file"] {
  border: 1px dashed #b9c8d9;
  border-radius: 9px;
  padding: 0.45rem;
  background: #fff;
  width: 100%;
}

.admin-item-form label {
  font-size: 0.92rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-thumb-wrap {
  display: flex;
  align-items: center;
}

.admin-thumb {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d4deea;
  background: #f2f6fb;
}

.admin-inline-delete {
  margin-top: 0.45rem;
}

.admin-table-wrap {
  overflow: auto;
  border: 1px solid #d8e2ee;
  border-radius: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  background: #fff;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid #e3eaf2;
  padding: 0.62rem;
  text-align: left;
  vertical-align: top;
}

.admin-table thead th {
  background: #eff4fa;
  color: #173a63;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-login-card {
  width: min(520px, 96%);
  margin: 8vh auto;
  padding: 1.2rem;
}

.team-card h3 {
  margin-bottom: 0.2rem;
}

.login-help {
  margin-top: 0.2rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-grid,
  .grid-2,
  .grid-3,
  .stats,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .slide-item {
    flex-basis: calc((100% - 1rem) / 2);
  }

  .admin-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-layout {
    width: min(1220px, 96%);
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-side-nav {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.25rem;
  }

  .admin-side-nav a {
    white-space: nowrap;
  }

  .admin-side-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-settings-form {
    grid-template-columns: 1fr;
  }

  .admin-item-form {
    grid-template-columns: 1fr;
  }

  .admin-item-form .wide-field,
  .admin-settings-form .wide-field {
    grid-column: span 1;
  }

  .menu-btn {
    display: inline-block;
  }

  .main-nav {
    position: absolute;
    top: 78px;
    right: 4%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.9rem;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    min-width: 180px;
  }

  .main-nav.open {
    display: flex;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
  }

  .brand-text {
    font-size: 0.95rem;
  }
}

@media (max-width: 700px) {
  .slide-item {
    flex-basis: 100%;
  }
}
