/*
Theme Name: Inspirasi Floor
Theme URI: https://inspirasi-floor.com
Author: Inspirasi Floor
Description: Tema WordPress untuk perniagaan pemasangan lantai — vinyl, laminate, karpet pejabat & karpet masjid. Semua kandungan boleh diedit melalui Customizer, Services dan Testimonials.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: inspirasi-floor
Tags: business, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ============ Tokens ============ */
:root {
  --if-brown: #3A2311;      /* coklat asal */
  --if-gold: #F3AD33;       /* kuning asal — aksen utama */
  --if-gold-deep: #D9941C;  /* kuning gelap — hover butang */
  --if-gold-text: #8A6114;  /* amber gelap — untuk teks atas latar putih */
  --if-charcoal: #303030;
  --if-cream: #F9F6F1;
  --if-muted: #6B5B4F;
  --if-body: #5C4A3D;
  --if-grey: #FAFAFA;
  --if-white: #FFFFFF;
  --if-max: 1280px;
  --if-radius: 16px;
  --if-logo-h: 104px;
  --if-logo-w: 480px;
}

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--if-body);
  background: var(--if-white);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: 0; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }

.font-display { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; }
.if-container { max-width: var(--if-max); margin: 0 auto; padding: 0 24px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
:focus-visible { outline: 3px solid var(--if-gold); outline-offset: 3px; }

/* ============ Buttons ============ */
.if-btn {
  display: inline-block;
  background: var(--if-gold);
  color: var(--if-brown);
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 24px;
  transition: opacity .3s ease;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.12);
}
.if-btn:hover { background: var(--if-gold-deep); color: var(--if-brown); opacity: 1; }
.if-btn--lg { padding: 14px 32px; }

/* ============ Header / Nav ============ */
.if-header { position: absolute; top: 0; left: 0; width: 100%; z-index: 30; }
.if-header--solid { position: relative; background: var(--if-brown); }

/* ---- Skema header TERANG (untuk logo berteks gelap) ---- */
.if-header--light {
  position: sticky; top: 0; background: #fff;
  box-shadow: 0 1px 0 rgba(58,35,17,.10), 0 6px 18px rgba(58,35,17,.06);
}
.if-header--light .if-menu a,
.if-header--light .if-mobile-menu a,
.if-header--light .if-logo-text,
.if-header--light .if-nav-toggle { color: var(--if-brown); }
.if-header--light .if-menu a:hover,
.if-header--light .if-menu .current-menu-item > a { color: var(--if-gold-text); }
.if-header--light .if-mobile-menu { background: #fff; border-top: 1px solid rgba(58,35,17,.10); }
.if-header--light .if-btn { box-shadow: none; }

/* Hero dipendekkan sedikit kerana header tidak lagi bertindih di atasnya */
body.if-scheme-light .if-hero { height: 78vh; min-height: 480px; }

/* Mod gelap: header terapung di atas hero — beri ruang supaya teks tidak bertindih */
body.if-scheme-dark .if-hero__inner { padding-top: calc(var(--if-logo-h) + 56px); }

.if-nav {
  max-width: var(--if-max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; gap: 16px;
}
.if-logo { flex: 0 0 auto; padding: 8px 0; }
.if-logo img,
.if-logo .custom-logo {
  height: var(--if-logo-h);
  width: auto;
  max-width: var(--if-logo-w);
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}
.if-logo-text { color: #fff; font-size: 26px; display: inline-block; padding: 8px 0; }
.if-menu { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.if-menu a { color: #fff; font-weight: 500; transition: color .2s; }
.if-menu a:hover, .if-menu .current-menu-item > a { color: var(--if-gold); }
.if-nav-toggle { display: none; background: none; color: #fff; padding: 4px; }
.if-mobile-menu { display: none; background: var(--if-brown); padding: 0 24px 24px; }
.if-mobile-menu.is-open { display: block; }
.if-mobile-menu ul { list-style: none; margin: 0 0 16px; padding: 0; }
.if-mobile-menu li { padding: 8px 0; }
.if-mobile-menu a { color: #fff; font-weight: 500; }
.if-mobile-menu .if-btn { display: block; width: 100%; text-align: center; }

/* ============ Hero ============ */
.if-hero { position: relative; width: 100%; height: 90vh; min-height: 520px; overflow: hidden; }
.if-hero__slides { position: absolute; inset: 0; }
.if-hero__slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .9s ease; }
.if-hero__slide.is-active { opacity: 1; pointer-events: auto; }
.if-hero:not(.if-hero--slider) .if-hero__slide { opacity: 1; pointer-events: auto; }
.if-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.if-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(58,35,17,.88) 0%, rgba(58,35,17,.5) 55%, transparent 100%);
}
.if-hero__inner {
  position: relative; z-index: 10;
  display: flex; flex-direction: column; justify-content: center;
  height: 100%; max-width: var(--if-max); margin: 0 auto; padding: 0 24px;
}
.if-hero__title { color: #fff; font-size: 32px; line-height: 1.2; max-width: 42rem; }
.if-hero__text { color: #fff; opacity: .9; font-size: 18px; margin-top: 20px; max-width: 32rem; }
.if-hero .if-btn { margin-top: 32px; align-self: flex-start; }

/* Slider controls */
.if-hero__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 20;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.16); color: #fff;
  backdrop-filter: blur(4px);
  transition: background .25s ease;
}
.if-hero__nav:hover { background: var(--if-gold); color: var(--if-brown); }
.if-hero__nav svg { width: 24px; height: 24px; }
.if-hero__nav--prev { left: 20px; }
.if-hero__nav--next { right: 20px; }

.if-hero__dots {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 20; display: flex; gap: 10px;
}
.if-hero__dot {
  width: 10px; height: 10px; border-radius: 50%; padding: 0;
  background: rgba(255,255,255,.45);
  transition: background .25s ease, width .25s ease;
}
.if-hero__dot.is-active { background: var(--if-gold); width: 28px; border-radius: 999px; }

/* ============ Sections ============ */
.if-section { padding: 80px 0; }
.if-section--services { background: var(--if-white); padding: 80px 0 96px; }
.if-section--benefits { background: var(--if-cream); }
.if-section--testimonials { background: var(--if-white); }
.if-heading { text-align: center; color: var(--if-brown); font-size: 24px; }
.if-subheading { text-align: center; color: var(--if-muted); margin: 12px auto 0; max-width: 42rem; }

/* ============ Services ============ */
.if-grid { display: grid; gap: 32px; margin-top: 56px; grid-template-columns: 1fr; }
.if-grid--4 { grid-template-columns: repeat(4, 1fr); }
.if-grid--3 { grid-template-columns: repeat(3, 1fr); margin-top: 48px; }
.if-service {
  background: var(--if-grey);
  border: 1px solid #f3f4f6;
  border-radius: var(--if-radius);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.if-service:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(58,35,17,.12); }
.if-service__img { width: 100%; height: 192px; object-fit: cover; }
.if-service__body { padding: 20px; text-align: center; }
.if-service__icon { margin: 0 auto 8px; width: 28px; height: 28px; color: var(--if-gold); }
.if-service__title { color: var(--if-brown); font-size: 19px; font-weight: 600; }

/* ============ Benefits ============ */
.if-benefit {
  text-align: center; padding: 32px;
  background: #fff; border: 2px solid transparent; border-radius: var(--if-radius);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: border-color .3s;
}
.if-benefit:hover { border-color: var(--if-gold); }
.if-benefit__icon { margin: 0 auto 16px; width: 40px; height: 40px; color: var(--if-gold); }
.if-benefit__title { color: var(--if-brown); font-size: 20px; font-weight: 600; margin-bottom: 8px; }

/* ============ Testimonials ============ */
.if-quote { background: var(--if-cream); border-radius: var(--if-radius); padding: 24px; }
.if-quote__icon { width: 24px; height: 24px; color: var(--if-gold); margin-bottom: 12px; }
.if-quote__text { color: var(--if-brown); font-style: italic; line-height: 1.7; }
.if-quote__author { color: var(--if-gold); font-weight: 600; margin-top: 16px; }

/* ============ Footer ============ */
.if-footer { background: var(--if-brown); padding: 48px 0; color: #fff; }
.if-footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.if-footer__brand { color: var(--if-gold); font-size: 22px; margin-bottom: 12px; }
.if-footer__title { font-weight: 600; margin-bottom: 12px; color: #fff; }
.if-footer p { opacity: .8; }
.if-footer p + p { margin-top: 4px; }
.if-footer__bottom {
  max-width: var(--if-max); margin: 40px auto 0; padding: 24px 24px 0;
  border-top: 1px solid rgba(255,255,255,.2);
  text-align: center; font-size: 14px; opacity: .6;
}
.if-footer a:hover { color: var(--if-gold); }

/* ============ Inner pages / blog ============ */
.if-page { padding: 64px 0; }
.if-page__title { color: var(--if-brown); font-size: 30px; margin-bottom: 24px; }
.if-entry { max-width: 780px; margin: 0 auto 48px; }
.if-entry__meta { color: var(--if-muted); font-size: 14px; margin-bottom: 16px; }
.if-entry p { margin-bottom: 16px; }
.if-entry h2, .if-entry h3 { color: var(--if-brown); margin: 32px 0 12px; }
.if-entry a { color: var(--if-gold); text-decoration: underline; }
.if-entry ul, .if-entry ol { margin: 0 0 16px 20px; }
.if-entry img, .if-entry .wp-post-image { border-radius: var(--if-radius); margin-bottom: 24px; }
.if-pagination { text-align: center; margin-top: 32px; }
.if-pagination .page-numbers {
  display: inline-block; padding: 6px 14px; margin: 0 4px;
  border-radius: 999px; background: var(--if-cream); color: var(--if-brown);
}
.if-pagination .page-numbers.current { background: var(--if-gold); }

/* WP core alignment classes */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { margin: 0 auto 16px; }
.wp-caption-text { font-size: 14px; color: var(--if-muted); }
.sticky, .gallery-caption, .bypostauthor { }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .if-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .if-menu, .if-nav .if-btn { display: none; }
  .if-nav-toggle { display: inline-flex; }
  .if-grid--3, .if-footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .if-grid--4 { grid-template-columns: 1fr; }
  .if-hero { height: 80vh; }
  .if-hero__title { font-size: 28px; }
  .if-section { padding: 56px 0; }
  .if-hero__nav { display: none; }
  .if-hero__dots { bottom: 18px; }
  .if-logo img,
  .if-logo .custom-logo { height: calc(var(--if-logo-h) * 0.65); max-width: 62vw; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
