/* assets/css/style.css */

/* --- CSS Variables (Design Tokens) --- */
:root {
  /* Colors */
  --primary-color: #111111; /* Hitam */
  --secondary-color: #FFFFFF; /* Putih */
  --accent-color: #F5F5F5; /* Abu-abu muda */
  --text-dark: #222222;
  --text-light: #666666;
  --text-white: #FFFFFF;
  --border-color: #E0E0E0;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 24px rgba(0,0,0,0.12);
  --shadow-hover: 0 15px 35px rgba(0,0,0,0.15);
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
}

/* --- Reset & Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  color: var(--text-dark);
  background-color: var(--secondary-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
p { margin-bottom: 1rem; color: var(--text-light); }

/* --- Layout Utility --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.section-title p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Grid System --- */
.grid {
  display: grid;
  gap: 30px;
}

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

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-white);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--text-white);
}

.btn-white {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.btn-white:hover {
  background-color: transparent;
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

/* --- Header & Navbar --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  padding: 15px 0;
  transition: all var(--transition-normal);
}

.header.scrolled {
  padding: 10px 0;
  box-shadow: var(--shadow-md);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-weight: 600;
  color: var(--text-dark);
}

.nav-links a:hover {
  color: var(--text-light);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary-color);
}

@media (max-width: 991px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--secondary-color);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-md);
  }
  .nav-links.active {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
  .header-btn {
    display: none;
  }
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px; /* Offset for header */
  background-color: var(--accent-color);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: 1.5rem;
  animation: slideUp 0.8s ease forwards;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  animation: slideUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero-btns {
  display: flex;
  gap: 15px;
  animation: slideUp 0.8s ease 0.4s forwards;
  opacity: 0;

}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Cards (Products, Services, Articles) --- */
.card {
  background: var(--secondary-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.card-img-wrapper {
  position: relative;
  padding-top: 65%; /* 3:2 aspect ratio */
  overflow: hidden;
}

.card-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.card-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.card-desc {
  color: var(--text-light);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* --- CTA Section --- */
.cta-section {
  background-color: var(--primary-color);
  color: var(--text-white);
  text-align: center;
  padding: 100px 20px;
}

.cta-section h2 {
  color: var(--text-white);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255,255,255,0.8);
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Footer --- */
.footer {
  background-color: var(--accent-color);
  padding: 60px 0 20px;
  border-top: 1px solid var(--border-color);
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 15px;
  display: block;
}

.footer-title {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 0.9rem;
}

/* --- Gallery Lightbox --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  aspect-ratio: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h3 {
  color: #fff;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  text-align: center;
  padding: 0 10px;
}

.gallery-item:hover .gallery-overlay h3 {
  transform: translateY(0);
}

/* --- Lightbox Modal --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* --- Contact Form --- */
.contact-form {
  background: var(--secondary-color);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* --- Admin UI Basics --- */
.admin-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-color);
}

.admin-login-card {
  background: var(--secondary-color);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
}

/* Helper Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* Memberi jarak antara ikon dan teks di dalam tombol */
.btn i {
    margin-right: 8px;
}
