/* ============================================================
   KARPILPEDIA PUBLIC CSS - FULL MOBILE RESPONSIVE
   Brand: Sovereign Blue + Royal Gold + Cream Ivory
   ============================================================ */

:root {
  --navy: #0A1F44;
  --navy-light: #1A2B4F;
  --gold: #D4AF37;
  --gold-soft: #C9A961;
  --cream: #F5F1E8;
  --cream-dark: #E8E0CC;
  --slate: #4A5568;
  --slate-light: #718096;
  --white: #FFFFFF;
  --red: #C53030;
  --green: #2F855A;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--white);
  color: var(--slate);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--navy); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   NAVBAR - WITH MOBILE HAMBURGER
   ============================================================ */

.navbar {
  background: var(--navy);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--navy);
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo-icon span {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
}

.logo-icon::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 2px;
  background: var(--gold);
}

.logo-text { display: flex; flex-direction: column; }

.logo-text .brand {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
}

.logo-text .tagline {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--gold);
  font-weight: 600;
  margin-top: 2px;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 22px;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 4px;
}

.nav-menu a {
  color: var(--cream);
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
}

.nav-menu .btn-nav {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  margin-left: 8px;
}

.nav-menu .btn-nav:hover {
  background: var(--cream);
  color: var(--navy);
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--cream);
  padding: 6rem 0;
  text-align: center;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 56px;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--cream);
  font-weight: 700;
}

.hero h1 .accent {
  color: var(--gold);
  font-style: italic;
}

.hero-subtitle {
  font-size: 19px;
  color: var(--gold-soft);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--cream);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212,175,55,0.3);
}

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

.btn-outline:hover {
  background: var(--navy);
  color: var(--cream);
}

.btn-outline-light {
  background: transparent;
  color: var(--cream);
  border-color: var(--gold);
}

.btn-outline-light:hover {
  background: var(--gold);
  color: var(--navy);
}

/* ============================================================
   SECTION HEADER
   ============================================================ */

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

.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 17px;
  color: var(--slate);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   BLOG GRID
   ============================================================ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.blog-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(10,31,68,0.04);
  border: 1px solid rgba(10,31,68,0.06);
  transition: all 0.3s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(10,31,68,0.1);
}

.blog-image {
  height: 200px;
  background: var(--cream);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: var(--gold);
}

.blog-content { padding: 1.5rem; }

.blog-meta {
  font-size: 11px;
  color: var(--slate-light);
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.blog-meta .category { color: var(--gold); font-weight: 700; }

.blog-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.blog-excerpt {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-link {
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.blog-link:hover {
  color: var(--navy);
  gap: 8px;
}

/* ============================================================
   PRODUK GRID
   ============================================================ */

.produk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.produk-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(10,31,68,0.04);
  border: 1px solid rgba(10,31,68,0.06);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.produk-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(10,31,68,0.1);
}

.produk-image {
  height: 180px;
  background: linear-gradient(135deg, var(--cream), #FAF7F0);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  position: relative;
}

.produk-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--gold);
  color: var(--navy);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}

.produk-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.produk-category {
  font-size: 10px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.produk-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.produk-desc {
  font-size: 13px;
  color: var(--slate);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}

.produk-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(10,31,68,0.06);
}

.produk-price {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--navy);
  font-weight: 700;
}

.produk-price-original {
  text-decoration: line-through;
  color: var(--slate-light);
  font-size: 13px;
  margin-right: 6px;
  font-weight: 400;
}

/* ============================================================
   CTA SECTION
   ============================================================ */

.cta-section {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--cream);
  padding: 5rem 0;
  text-align: center;
}

.cta-section h2 {
  font-family: 'Playfair Display', serif;
  color: var(--gold);
  font-size: 38px;
  margin-bottom: 1rem;
  font-weight: 700;
}

.cta-section p {
  color: var(--gold-soft);
  font-size: 17px;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--navy);
  color: var(--cream);
  padding: 4rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo { margin-bottom: 1rem; }

.footer-brand p {
  font-size: 14px;
  color: var(--gold-soft);
  line-height: 1.7;
  max-width: 360px;
}

.footer-col h4 {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  color: var(--gold-soft);
  font-size: 13px;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(212,175,55,0.2);
  color: var(--gold-soft);
  font-size: 12px;
}

/* ============================================================
   FORMS (Generic)
   ============================================================ */

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(10,31,68,0.15);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  background: white;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.form-group textarea { resize: vertical; min-height: 100px; }

/* ============================================================
   ALERTS / MESSAGES
   ============================================================ */

.alert {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 1rem;
  border: 1px solid;
}

.alert-success {
  background: rgba(47,133,90,0.1);
  border-color: rgba(47,133,90,0.3);
  color: var(--green);
}

.alert-error {
  background: rgba(197,48,48,0.1);
  border-color: rgba(197,48,48,0.3);
  color: var(--red);
}

/* ============================================================
   📱 MOBILE RESPONSIVE - MAIN UPGRADE
   ============================================================ */

/* TABLET */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  
  .hero h1 { font-size: 42px; }
  .hero-subtitle { font-size: 17px; }
  
  .section-header h2 { font-size: 34px; }
}

/* MOBILE LANDSCAPE & SMALL TABLET */
@media (max-width: 768px) {
  
  /* CONTAINER */
  .container { padding: 0 16px; }
  
  /* ============== NAVBAR MOBILE ============== */
  .menu-toggle {
    display: block;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 1rem;
    gap: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    border-top: 1px solid rgba(212,175,55,0.2);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-menu li {
    width: 100%;
  }
  
  .nav-menu a {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 6px;
  }
  
  .nav-menu .btn-nav {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
  }
  
  .logo-text .tagline {
    display: none;
  }
  
  .logo-text .brand {
    font-size: 16px;
  }
  
  .logo-icon {
    width: 36px;
    height: 36px;
  }
  
  /* ============== HERO MOBILE ============== */
  .hero {
    padding: 4rem 0;
  }
  
  .hero h1 {
    font-size: 32px;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 15px;
    line-height: 1.6;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    padding: 0 1rem;
  }
  
  .hero-cta .btn {
    width: 100%;
    padding: 14px 20px;
  }
  
  /* ============== SECTIONS MOBILE ============== */
  .section-header h2 {
    font-size: 26px;
    line-height: 1.3;
  }
  
  .section-header p {
    font-size: 15px;
  }
  
  .section-header {
    margin-bottom: 2rem;
  }
  
  /* ============== GRIDS MOBILE - SINGLE COLUMN ============== */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .produk-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* ============== BLOG CARD MOBILE ============== */
  .blog-card { border-radius: 10px; }
  .blog-image { height: 180px; font-size: 48px; }
  .blog-content { padding: 1.25rem; }
  .blog-title { font-size: 18px; }
  .blog-excerpt { font-size: 13px; }
  
  /* ============== PRODUK CARD MOBILE ============== */
  .produk-card { border-radius: 10px; }
  .produk-image { height: 160px; font-size: 56px; }
  .produk-content { padding: 1rem; }
  .produk-title { font-size: 16px; }
  .produk-desc { font-size: 12px; }
  .produk-price { font-size: 16px; }
  
  /* ============== CTA SECTION MOBILE ============== */
  .cta-section {
    padding: 3.5rem 0;
  }
  
  .cta-section h2 {
    font-size: 26px;
  }
  
  .cta-section p {
    font-size: 14px;
  }
  
  /* ============== BUTTONS MOBILE ============== */
  .btn {
    padding: 12px 24px;
    font-size: 13px;
  }
  
  /* ============== FOOTER MOBILE ============== */
  .footer {
    padding: 3rem 0 1rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-brand .logo {
    justify-content: center;
  }
  
  .footer-brand p {
    margin: 0 auto;
  }
  
  /* ============== ABOUT SECTION ============== */
  .about-section {
    padding: 3rem 0 !important;
  }
}

/* SMALL MOBILE */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  
  /* HERO */
  .hero {
    padding: 3rem 0;
  }
  
  .hero h1 {
    font-size: 26px;
  }
  
  .hero-subtitle {
    font-size: 14px;
  }
  
  /* SECTION */
  .section-header h2 {
    font-size: 22px;
  }
  
  /* CARDS */
  .blog-image { height: 160px; font-size: 42px; }
  .blog-title { font-size: 16px; }
  
  .produk-image { height: 140px; font-size: 48px; }
  
  /* LOGO */
  .logo-text .brand {
    font-size: 14px;
  }
  
  /* CTA */
  .cta-section h2 {
    font-size: 22px;
  }
}

/* ============================================================
   📱 EXTRA: MOBILE TOUCH-FRIENDLY
   ============================================================ */

@media (hover: none) and (pointer: coarse) {
  /* Disable hover transform di mobile (causes bounce) */
  .blog-card:hover,
  .produk-card:hover {
    transform: none;
  }
  
  /* Bigger tap target */
  .nav-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .btn {
    min-height: 44px;
  }
  
  /* Tap highlight */
  a, button { -webkit-tap-highlight-color: rgba(212,175,55,0.2); }
}

/* ============================================================
   📱 PRINT FRIENDLY
   ============================================================ */

@media print {
  .navbar, .footer, .cta-section, .hero { display: none; }
  body { background: white; color: black; }
  .container { max-width: 100%; padding: 0; }
}
