/* ==========================================================================
   DESIGN SYSTEM & VARIABLES - PT. KREATIF AKUSTIK BERSAMA
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --bg-dark: #0b0f19;
  --bg-darker: #05070c;
  --card-bg: rgba(20, 26, 42, 0.65);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --accent-glow: rgba(6, 182, 212, 0.15);
  --wa-green: #25d366;
  
  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Layout */
  --container-width: 1200px;
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Sound Wave Ambient Background Glows */
body::before, body::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(11, 15, 25, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

body::before {
  top: 10%;
  left: -150px;
}

body::after {
  top: 60%;
  right: -150px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

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

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding {
  padding: 100px 0;
}

.text-center {
  text-align: center;
}

.grid {
  display: grid;
  gap: 32px;
}

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

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

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

@media (max-width: 768px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .section-padding {
    padding: 60px 0;
  }
}

/* ==========================================================================
   BUTTONS & ACCENTS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 600;
  border-radius: 50px;
  text-transform: uppercase;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */

.header {
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid var(--card-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  flex-wrap: nowrap; /* Enforce single line */
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 19px; /* Reduced to fit in one line */
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0; /* Prevent squeezing */
}

.logo span {
  color: var(--accent-cyan);
}

.nav-menu {
  display: flex;
  gap: 16px; /* Reduced gap from 32px to fit in one line */
  list-style: none;
}

.nav-link {
  font-size: 13.5px; /* Reduced font size from 15px */
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap; /* Prevent menu item text wrapping */
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-cyan);
}

.nav-cta {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--bg-dark);
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    transition: 0.3s ease;
    border-top: 1px solid var(--card-border);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-cta {
    display: none; /* Hide top CTA on mobile, keep menu items simple */
  }
}

/* ==========================================================================
   GLASS CARDS (Used for components)
   ========================================================================== */

.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 32px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(6, 182, 212, 0.25);
  box-shadow: 0 15px 35px rgba(6, 182, 212, 0.05);
  transform: translateY(-4px);
}

/* ==========================================================================
   HERO SECTION (BACKGROUND OVERLAY THEME)
   ========================================================================== */

.hero-section {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  padding-top: calc(var(--header-height) + 120px);
  padding-bottom: 120px;
  position: relative;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  text-align: center;
}

/* Dimming overlay */
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.45); /* Lighter dimming overlay */
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 5;
}

.hero-section .badge {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.5);
  color: var(--accent-cyan);
}

.hero-title {
  font-size: 54px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  color: #ffffff;
}

.hero-desc {
  font-size: 18px;
  color: #e2e8f0;
  margin-bottom: 36px;
  max-width: 650px;
}

.hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.hero-visual {
  display: none; /* Hide visual column as the image is now the main background */
}

/* soundwave animation container */
.soundwave-box {
  width: 100%;
  height: 350px;
  background: rgba(20, 26, 42, 0.4);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.soundwave-bar {
  width: 8px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: 4px;
  animation: wave 1.2s ease-in-out infinite alternate;
}

/* Animate wave elements with offsets */
.soundwave-bar:nth-child(1)  { animation-delay: 0.1s; height: 120px; }
.soundwave-bar:nth-child(2)  { animation-delay: 0.4s; height: 80px; }
.soundwave-bar:nth-child(3)  { animation-delay: 0.2s; height: 180px; }
.soundwave-bar:nth-child(4)  { animation-delay: 0.6s; height: 100px; }
.soundwave-bar:nth-child(5)  { animation-delay: 0.3s; height: 230px; }
.soundwave-bar:nth-child(6)  { animation-delay: 0.8s; height: 140px; }
.soundwave-bar:nth-child(7)  { animation-delay: 0.5s; height: 290px; }
.soundwave-bar:nth-child(8)  { animation-delay: 0.7s; height: 160px; }
.soundwave-bar:nth-child(9)  { animation-delay: 0.2s; height: 210px; }
.soundwave-bar:nth-child(10) { animation-delay: 0.9s; height: 90px; }
.soundwave-bar:nth-child(11) { animation-delay: 0.4s; height: 170px; }
.soundwave-bar:nth-child(12) { animation-delay: 0.1s; height: 70px; }

@keyframes wave {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1.1); }
}

.wave-label {
  position: absolute;
  bottom: 24px;
  background: rgba(5, 7, 12, 0.8);
  border: 1px solid var(--accent-cyan);
  padding: 6px 14px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-cyan);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 38px;
  }
  .hero-btns {
    flex-direction: column;
  }
  .soundwave-box {
    height: 250px;
  }
}

/* ==========================================================================
   SERVICES SECTION
   ========================================================================== */

.section-title-box {
  margin-bottom: 60px;
}

.section-title {
  font-size: 40px;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.service-card {
  text-align: left;
}

.service-icon {
  width: 60px;
  height: 60px;
  background: rgba(6, 182, 212, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--accent-cyan);
  margin-bottom: 24px;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.service-title {
  font-size: 22px;
  margin-bottom: 14px;
}

.service-desc {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
}

.service-link {
  color: var(--accent-cyan);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.service-link:hover {
  text-decoration: underline;
  gap: 10px;
}

/* ==========================================================================
   TECHNICAL / DATA TABLE SECTION (For GEO & E-E-A-T)
   ========================================================================== */

.data-section {
  background: var(--bg-darker);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: var(--card-bg);
}

.data-table th, .data-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--card-border);
  font-size: 15px;
}

.data-table th {
  background: rgba(5, 7, 12, 0.5);
  font-family: var(--font-heading);
  font-weight: 600;
  color: #ffffff;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   INTERACTIVE DECIBEL CALCULATOR (Lead Magnet)
   ========================================================================== */

.calc-container {
  max-width: 800px;
  margin: 0 auto;
}

.calc-form-group {
  margin-bottom: 24px;
}

.calc-label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #ffffff;
}

.calc-input, .calc-select {
  width: 100%;
  padding: 14px 18px;
  background: rgba(5, 7, 12, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
}

.calc-input:focus, .calc-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.calc-result-box {
  margin-top: 32px;
  padding: 24px;
  background: rgba(6, 182, 212, 0.05);
  border: 1px dashed var(--accent-cyan);
  border-radius: var(--radius-sm);
  display: none;
}

.calc-result-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.calc-result-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 15px;
}

.calc-result-item:last-child {
  border-bottom: none;
}

.calc-result-value {
  font-weight: 600;
  color: #ffffff;
}

.calc-cta-btn {
  margin-top: 20px;
}

/* ==========================================================================
   PORTFOLIO BEFORE/AFTER SLIDER
   ========================================================================== */

.slider-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.before-after-container {
  position: relative;
  width: 100%;
  height: 450px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.img-before {
  background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/sesudah_pasang_panel_akustik.jpeg');
}

.img-after {
  background-image: url('../images/sebelum_pasang_panel_akustik.jpeg');
  width: 50%; /* JS will change this */
}

.slider-label {
  position: absolute;
  bottom: 20px;
  padding: 6px 14px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 10;
  user-select: none;
}

.label-before {
  left: 20px;
  color: #ef4444;
}

.label-after {
  right: 20px;
  color: var(--accent-cyan);
}

.slider-handle {
  position: absolute;
  top: 0;
  left: 50%; /* JS will change this */
  width: 4px;
  height: 100%;
  background: #ffffff;
  z-index: 20;
  cursor: ew-resize;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  color: var(--bg-dark);
  font-weight: bold;
  pointer-events: none;
}

.slider-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 30;
}

@media (max-width: 768px) {
  .before-after-container {
    height: 300px;
  }
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */

.faq-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 16px;
}

.faq-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  text-align: left;
  padding: 16px 0;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
}

.faq-icon {
  font-size: 20px;
  color: var(--accent-cyan);
  transition: transform 0.3s ease;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  color: var(--text-muted);
  font-size: 15px;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-item.active .faq-content {
  max-height: 200px;
  padding-top: 8px;
}

/* ==========================================================================
   FLOATING WHATSAPP BUTTON (CRO)
   ========================================================================== */

.wa-floating {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: var(--wa-green);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 999;
  cursor: pointer;
  animation: waPulse 2s infinite;
  transition: transform 0.2s ease;
}

.wa-floating:hover {
  transform: scale(1.1);
}

@keyframes waPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

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

.footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--card-border);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-info-desc {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 16px;
  max-width: 320px;
}

.footer-title {
  font-size: 18px;
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
}

.footer-link {
  color: var(--text-muted);
}

.footer-link:hover {
  color: var(--accent-cyan);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 16px;
}

.footer-contact-icon {
  color: var(--accent-cyan);
  font-size: 18px;
}

.footer-bottom {
  border-top: 1px solid var(--card-border);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
