/* ===========================
   GLOBAL
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: linear-gradient(135deg, #1a1730, #2a0a12);
  color: white;
  overflow-x: hidden;
}

/* ===========================
   HEADER & NAV
=========================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 60px;
  background: rgba(20, 17, 50, 0.92);
  backdrop-filter: blur(8px);
  gap: 20px;
}

.logo {
  height: 52px;
  flex-shrink: 0;
}

.navbar-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  justify-content: flex-end;
}

nav {
  display: flex;
  gap: 6px;
  align-items: center;
}

nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 7px 13px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

nav a:hover {
  color: #f21010;
  background: rgba(242, 16, 16, 0.08);
}

/* ===========================
   BURGER BUTTON
=========================== */
.burger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 5px;
  flex-shrink: 0;
  /* hidden on desktop by default – shown always per request */
}

.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, width 0.3s;
  transform-origin: center;
}

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; width: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===========================
   OVERLAY & DRAWER
=========================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 998;
}
.overlay.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 220px;
  height: 100vh;
  background: rgba(20, 17, 50, 0.98);
  border-left: 1px solid rgba(255,255,255,0.08);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  padding: 90px 10px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.drawer.open { transform: translateX(0); }

.drawer a {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 11px 16px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.drawer a:hover {
  background: rgba(255,255,255,0.07);
  color: #f21010;
}

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  text-align: center;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-image: url("img/portfolio/lantai gede.jpeg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
  padding: 60px 20px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 21, 36, 0.65);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero-banner {
  width: 580px;
  max-width: 90vw;
}

.hero-text {
  font-size: 18px;
  max-width: 520px;
  line-height: 1.7;
  margin: 0 auto;
  opacity: 0.92;
}

.cta {
  display: inline-block;
  padding: 15px 38px;
  background: #e21d2f;
  border-radius: 40px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 20px rgba(226, 29, 47, 0.4);
}

.cta:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(226, 29, 47, 0.55);
}

/* ===========================
   SECTIONS (base)
=========================== */
section {
  padding: 90px 10%;
  text-align: center;
}

section h2 {
  font-size: 32px;
  margin-bottom: 40px;
  margin-top: 0;
}

/* ===========================
   TENTANG / ABOUT
=========================== */
#tentang {
  position: relative;
  background-image: url("img/briefing.jpeg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow: hidden;
}

#tentang::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 21, 36, 0.70);
  z-index: 1;
  pointer-events: none;
}

.about-overlay { display: none; }

.about-content {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: auto;
  text-align: left;
}

.about-content h2 {
  text-align: center;
}

.about-content > p {
  line-height: 1.8;
  font-size: 15px;
  text-align: center;
  margin-bottom: 0;
}

.visi-misi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
}

.visi-misi > div {
  background: rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 28px 28px 24px;
  backdrop-filter: blur(6px);
}

.visi-misi h3 {
  font-size: 22px;
  margin: 0 0 12px;
  color: #f87070;
}

.visi-misi p,
.visi-misi ul {
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
}

.visi-misi ul {
  padding-left: 18px;
}

/* ===========================
   LAYANAN
=========================== */
#layanan {
  position: relative;
  background-image: url("img/team.jpeg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

#layanan::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 21, 36, 0.60);
  z-index: 1;
  pointer-events: none;
}

#layanan h2,
#layanan .grid4 {
  position: relative;
  z-index: 2;
}

/* ===========================
   GRIDS
=========================== */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ===========================
   CARD (layanan)
=========================== */
.card {
  background: rgba(30, 25, 80, 0.6);
  padding: 30px 24px;
  border-radius: 14px;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  transition: transform 0.3s;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.85;
}

.card:hover {
  transform: translateY(-6px) scale(1.02);
}

/* ===========================
   PORTFOLIO SLIDER
=========================== */
#portfolio {
  padding: 90px 40px;
}

.portfolio-wrapper {
  position: relative;
  width: 100%;
  max-width: 1300px;
  margin: auto;
}

#slider-wrap {
  overflow: hidden;
  margin: 0 44px;
}

.portfolio-container {
  display: flex;
  gap: 20px;
  transition: transform 0.5s ease;
}

#portfolio .card {
  min-width: calc(25% - 15px);
  flex: 0 0 calc(25% - 15px);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: white;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

#portfolio .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

#portfolio .card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

#portfolio .card h3 {
  font-size: 13px;
  padding: 10px 12px 4px;
  margin: 0;
  line-height: 1.4;
}

#portfolio .card p {
  padding: 0 12px 10px;
  margin: 0;
  font-size: 12px;
  opacity: 0.7;
}

/* Nav arrows */
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  z-index: 10;
  font-size: 16px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(4px);
}

.nav:hover {
  background: rgba(226, 29, 47, 0.6);
  transform: translateY(-50%) scale(1.1);
}

.left  { left: 0; }
.right { right: 0; }

/* ===========================
   PORTFOLIO GRID PAGE
=========================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.portfolio-grid a {
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  display: block;
}

.portfolio-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.45s;
  display: block;
}

.portfolio-grid a:hover img {
  transform: scale(1.1);
}

/* ===========================
   KONTAK
=========================== */
#kontak {
  background: rgba(10, 8, 30, 0.5);
}

#kontak p {
  margin: 6px 0;
  font-size: 15px;
  line-height: 1.7;
}

/* ===========================
   FOOTER
=========================== */
footer {
  background: #060510;
  padding: 28px 20px;
  text-align: center;
  font-size: 13px;
  opacity: 0.7;
}

/* ===========================
   CARD LINK
=========================== */
.card-link {
  text-decoration: none;
  color: inherit;
}

.card-link .card { cursor: pointer; }

/* ===========================
   RESPONSIVE — TABLET (≤ 1024px)
=========================== */
@media (max-width: 1024px) {
  header {
    padding: 14px 24px;
  }

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

  #portfolio .card {
    min-width: calc(50% - 10px);
    flex: 0 0 calc(50% - 10px);
  }

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

/* ===========================
   RESPONSIVE — MOBILE (≤ 768px)
=========================== */
@media (max-width: 768px) {
  header {
    padding: 12px 16px;
  }

  /* Hide desktop nav, keep burger */
  nav {
    display: none;
  }

  .logo {
    height: 42px;
  }

  /* Hero */
  .hero {
    min-height: 80vh;
    padding: 50px 16px;
  }

  .hero-text {
    font-size: 15px;
  }

  .cta {
    padding: 13px 28px;
    font-size: 14px;
  }

  /* Sections */
  section {
    padding: 60px 5%;
  }

  section h2 {
    font-size: 26px;
    margin-bottom: 28px;
  }

  #portfolio {
    padding: 60px 16px;
  }

  /* Tentang */
  #tentang {
    background-attachment: scroll; /* fixed breaks on iOS */
  }

  .visi-misi {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Layanan */
  .grid4 {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .card {
    padding: 22px 18px;
  }

  .card h3 {
    font-size: 15px;
  }

  /* Portfolio slider */
  #portfolio .card {
    min-width: calc(50% - 10px);
    flex: 0 0 calc(50% - 10px);
  }

  #slider-wrap {
    margin: 0 36px;
  }

  /* Portfolio grid */
  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .portfolio-grid img {
    height: 160px;
  }
}

/* ===========================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
=========================== */
@media (max-width: 480px) {
  /* Layanan: 1 column */
  .grid4 {
    grid-template-columns: 1fr;
  }

  /* Portfolio slider: 1 card */
  #portfolio .card {
    min-width: 100%;
    flex: 0 0 100%;
  }

  #slider-wrap {
    margin: 0 32px;
  }

  /* Portfolio grid: 1 column */
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid img {
    height: 200px;
  }

  .visi-misi > div {
    padding: 20px 18px;
  }

  .hero-text {
    font-size: 14px;
  }

  section h2 {
    font-size: 22px;
  }
}
