/* style.css */

/* ---------- Variabel Warna & Font Global ---------- */
:root {
  --color-bg: #233746;
  --color-sand: #f5efe6;
  --color-blue: #6ea8ff;
  --color-dark: #122330;
  --text-light: #f2efe9;
  --font-serif: 'DM Serif Display', serif;
  --font-sans: 'Codec Pro', 'Montserrat', 'Segoe UI', sans-serif;
}

/* ---------- Pengaturan Dasar ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--text-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Header & Navigasi ---------- */
.site-header {
  padding: 1rem;
  position: sticky;
  top: 10px;
  z-index: 1200;
}

.header-wrap {
  max-width: 1450px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(245, 239, 230, 0.98), rgba(245, 239, 230, 0.95));
  padding: 14px 26px;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.header-wrap.scrolled {
  box-shadow: 0 8px 25px rgba(0,0,0,0.15), 0 4px 10px rgba(0,0,0,0.1);
}

.brand { display: flex; align-items: center; gap: 14px; }
.logo { width: 48px; height: auto; }
.brand-title { font-size: 1.5rem; color: var(--color-dark); font-weight: 700; font-family: var(--font-serif); letter-spacing: 1px; }
.main-nav { display: flex; gap: 14px; align-items: center; }

/* ---------- Tombol Navigasi ---------- */
.nav-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-width: 120px; padding: 10px 20px; border-radius: 28px;
  background: var(--color-dark); color: var(--color-sand); text-decoration: none;
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.5px;
  text-align: center; overflow: hidden; cursor: pointer;
  box-shadow: 0 4px 12px rgba(11, 22, 34, 0.25);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
  align-self: flex-start; /* Memastikan posisi tombol benar di dalam kartu */
}
.nav-btn:hover { transform: translateY(-3px); background: var(--color-blue); color: var(--color-dark); }
.nav-btn:active { transform: scale(0.94); }
.nav-btn::after {
  content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.25); transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.nav-btn:hover::after { left: 100%; }

/* Hamburger Menu Toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0; z-index: 1000; }

/* ---------- Hero Section / Beranda ---------- */
.hero {
  min-height: 60vh; display: flex; flex-direction: column;
  justify-content: center; align-items: center; padding: 120px 20px 40px; text-align: center;
}
.hero-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 22px; }
#hero-gedung { width: 100%; max-width: 1000px; height: auto; display: block; animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0% { transform: translateY(0); } 50% { transform: translateY(-30px); } 100% { transform: translateY(0); } }
.hero-caption {
  text-align: center; margin-top: 1rem; font-size: 1rem;
  font-style: font-sans; color: #ffeded; font-weight: 500;
}

/* ---------- Konten Umum & Judul Section ---------- */
.container { max-width: 1400px; margin: 0 auto; padding: 40px 20px; }
.section { padding: 40px 0; }
.section-title {
  font-family: var(--font-serif); font-size: 2.2rem; color: var(--color-blue);
  text-align: center; margin-bottom: 50px; position: relative; padding-bottom: 15px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 4vw, 2rem); 
  color: var(--color-blue);
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  padding-bottom: 15px;
}

/* ---------- Section 'Tentang' & Kartu Berita ---------- */
.about-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  gap: 2.5rem; 
}

.card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), 
              box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  background-color: #022035;
  background-image: 
    linear-gradient(180deg, #1a2f3f, #001d5d),
    radial-gradient(circle at 0% 0%, rgba(110, 168, 255, 0.25), transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(110, 168, 255, 0.2), transparent 30%);
  background-repeat: no-repeat;
  background-position: center center, top left, bottom right;
  background-size: cover, 50% 50%, 50% 50%;
}

.card::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(145deg, var(--color-blue), #f5efe633);
  opacity: 1;
}

.card:hover { 
  transform: translateY(-10px) scale(1.03); 
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4); 
}

.card-image-container { 
  overflow: hidden; 
}

.card-image-container img {
  width: 100%; height: 300px; object-fit: cover; display: block;
  transition: transform 0.4s ease-out;
}

.card:hover .card-image-container img { transform: scale(1.05); }

.card-content { 
  padding: 24px; display: flex; flex-direction: column; flex-grow: 1;
}

.quote-text {
  font-style: italic;
  color: rgb(255, 255, 255);
  opacity: 1 ;
  border-left: 3px solid var(--color-blue);
  padding-left: 16px;
  margin-bottom: 24px;
  flex-grow: 1;
}

/* ---------- Section Model 3D & Informasi ---------- */
.model-viewer-container {
  margin-bottom: 24px; position: relative; padding-top: 56.25%;
  height: 0; overflow: hidden; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.model-viewer-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.model-controls { display: flex; justify-content: center; gap: 16px; margin-top: 24px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.info-card {
  text-align: center;
  padding: 24px;
}
.info-card h4 {
  color: #233746;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

/* ---------- Section Model 3D & Informasi ---------- */

/* Tambahkan ini untuk mengatur kotak iframe */
.model-viewer-container {
  position: relative;
  width: 100%;
  /* Mengatur rasio aspek 16:9 */
  padding-top: 56.25%; 
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 24px;
}

.model-viewer-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Akhir tambahan */

.model-controls { 
  display: flex; 
  justify-content: center; 
  gap: 16px; 
  flex-wrap: wrap; /* Agar responsif di layar kecil */
}

/* Penyesuaian agar tombol terlihat bagus di section ini */
.model-controls .nav-btn {
  background: var(--color-dark);
}

.model-controls .nav-btn:hover {
  background: var(--color-blue);
  color: var(--color-dark);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 20px; text-align: center; color: var(--text-light);
  opacity: 0.7; border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 40px;
}

/* ---------- Overlay Fullscreen 3D ---------- */
.overlay {
  display: none; position: fixed; inset: 0; background: rgba(6, 12, 22, 0.95);
  backdrop-filter: blur(5px); z-index: 2200; flex-direction: column;
  padding: 18px; animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.overlay.active { display: flex; }
.overlay-top { display: flex; justify-content: flex-end; width: 100%; }
.overlay-close {
  background: transparent; border: 0; color: var(--text-light);
  font-size: 36px; cursor: pointer; padding: 6px 12px; line-height: 1;
}
.overlay-body {
  flex: 1; width: 100%; max-width: 1600px; margin: 12px auto 0;
  border-radius: 8px; overflow: hidden; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
}
.overlay-body iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Desain Responsif ---------- */
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; right: 1rem; top: calc(10px + 1rem + 14px + 14px); background: var(--color-sand);
    padding: 12px; border-radius: 10px; flex-direction: column; gap: 8px; display: none;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25); transform-origin: top right; animation: scaleIn 0.2s ease-out;
  }
  @keyframes scaleIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .main-nav.open { display: flex; }
  .nav-btn { width: 100%; text-align: center; }
}
