/**
 * Tanamas Group — Custom Styles
 *
 * Extracted from Phase 1 static HTML inline <style>.
 * Phase 3: wp_enqueue_style('tanamas-main', ...)
 */

/* === Base Typography === */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: #222222;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
  font-family: 'Poppins', sans-serif;
}

/* === Marquee Animation === */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-track {
  animation: marquee 40s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* === Logo Wall Greyscale === */
.logo-item img {
  filter: grayscale(100%);
  transition: filter 0.4s ease;
}

.logo-item:hover img {
  filter: grayscale(0%);
}

/* === Fade In on Scroll === */
.fade-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Sub-brand Accent Bars === */
.accent-kokoh {
  border-left: 4px solid #D32F2F;
}

.accent-mebelair {
  border-left: 4px solid #AD7A4A;
}

.accent-peduli {
  border-left: 4px solid #8EB042;
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #5AB4E5;
  border-radius: 3px;
}

/* === Mobile Menu === */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.35s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* === UI Enhancements === */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 170, 52, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 170, 52, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 170, 52, 0);
  }
}

.badge-glow {
  animation: pulse-glow 2s infinite;
}

.hover-lift {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* === Navigation Menu === */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-desktop .menu-item a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-desktop .menu-item a:hover {
  color: #5AB4E5;
}

.nav-desktop .menu-item.current-menu-item a,
.nav-desktop .menu-item.current_page_item a {
  color: #5AB4E5;
  font-weight: 600;
}

/* Desktop Nav Wrapper — menggantikan Tailwind hidden lg:flex yang tidak terkompilasi */
.nav-desktop-wrapper {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .nav-desktop-wrapper {
    display: flex;
  }
}

/* Hubungi Kami button */
.hubungi-btn {
  background-color: #EFAA34;
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.hubungi-btn:hover {
  background-color: #D49520;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}

/* Mobile Nav */
.nav-mobile {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-mobile .menu-item a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.nav-mobile .menu-item a:hover {
  background-color: #EBF6FD;
  color: #5AB4E5;
}

.nav-mobile .menu-item.current-menu-item a,
.nav-mobile .menu-item.current_page_item a {
  background-color: #EBF6FD;
  color: #5AB4E5;
  font-weight: 600;
}

/* === Block Pattern Image Fix (WP 6.7+ core/image) === */
/*
 * WP 6.7+ core/image block save() does NOT support custom classes
 * on <img> — only on <figure>. These rules cascade figure styles
 * to child img so pattern images render correctly.
 */

/* Cover: figure has object-cover → img gets object-fit:cover */
.wp-block-image.object-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Contain: figure has object-contain → img gets object-fit:contain */
.wp-block-image.object-contain img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Rounded corners need overflow-hidden to clip img */
.wp-block-image.rounded-2xl {
  overflow: hidden;
}

/* === Avant-garde Shapes === */
.hero-shape {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.15;
  mix-blend-mode: overlay;
}

/* === Hero Cover Block Gradient Override === */
/*
 * WP 7.0 Cover block doesn't render className properly.
 * Using #beranda anchor ID instead — always rendered by WordPress.
 */
#beranda.wp-block-cover .wp-block-cover__background {
  background: linear-gradient(90deg, rgba(90,180,229,0.95) 0%, rgba(90,180,229,0.8) 50%, rgba(90,180,229,0) 100%) !important;
  background-color: transparent !important;
}

/* === Contact Form 7 === */
.wpcf7-form .form-input,
.wpcf7-form .form-textarea {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7-form .form-input:focus,
.wpcf7-form .form-textarea:focus {
  border-color: #5AB4E5;
  box-shadow: 0 0 0 3px rgba(90, 180, 229, 0.2);
}

.wpcf7-form .form-input::placeholder,
.wpcf7-form .form-textarea::placeholder {
  color: #9ca3af;
}

.wpcf7-form .wpcf7-submit {
  width: 100%;
  background-color: #EFAA34;
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.wpcf7-form .wpcf7-submit:hover {
  background-color: #D49520;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.wpcf7-form .wpcf7-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Validation - error state */
.wpcf7-form .wpcf7-not-valid-tip {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
}

.wpcf7-form .wpcf7-response-output {
  border: 2px solid #22c55e;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin: 1rem 0 0;
  text-align: center;
}

.wpcf7-form .wpcf7-response-output.wpcf7-validation-errors {
  border-color: #ef4444;
  color: #ef4444;
}

.wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ng {
  border-color: #f59e0b;
  color: #f59e0b;
}

/* Spinner */
.wpcf7-form .wpcf7-spinner {
  display: block;
  margin: 0.5rem auto 0;
}

/* Select field styling */
.wpcf7-form select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* CF7 field spacing */
.wpcf7-form .cf7-field {
  margin-bottom: 1.25rem;
}

.wpcf7-form .cf7-field label {
  display: block;
  margin-bottom: 0.375rem;
}

.wpcf7-form .form-textarea {
  resize: vertical;
}

/* === Mobile overflow guards (11 Okt) ===
   Fix laporan mobile: kartu /kontak/ (dan kartu lain) melebar melebihi lebar layar
   karena min-content grid item (teks panjang spt email). Plus guard umum
   supaya halaman tidak bisa di-pan ke kanan. */
.grid > * {
  min-width: 0;
}

.hover-lift {
  overflow-wrap: break-word;
}

html,
body {
  overflow-x: clip;
}

/* Hero: rapikan padding (11 Okt — sebelumnya terlalu longgar/ga manis,
   dikurangi: group py 2.5rem, inner-cover 1.5rem; berlaku desktop + mobile) */
.wp-block-cover .wp-block-group.py-24 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.wp-block-cover .wp-block-cover__inner-container {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* Hero: inset horizontal = 24px, samakan dgn section lain
   (11 Okt — sebelumnya numpuk 3 lapis 16+32+24 = 72px, konten kelihatan geser kanan) */
#beranda.wp-block-cover {
  padding-left: 0;
  padding-right: 0;
}

#beranda .wp-block-cover__inner-container {
  padding-left: 0;
  padding-right: 0;
}

/* Mobile: perlebar jarak ke logo marquee */
@media (max-width: 639px) {
  .wp-block-group.overflow-hidden.pt-10 {
    padding-top: 4rem;
  }
}
