/* =============================================
   Theme CSS — Malaysian Fridge Repair Service
   Mobile-first | Poppins + Inter
   ============================================= */

/* --- Custom Properties --- */
:root {
  --c-primary: hsl(210, 55%, 23%);
  --c-secondary: hsl(25, 92%, 55%);
  --c-dark: hsl(210, 25%, 12%);
  --c-light: hsl(210, 20%, 97%);
  --c-gray: hsl(210, 10%, 60%);
  --c-white: hsl(0, 0%, 100%);
  --radius: 10px;
  --shadow: 0 4px 20px hsla(210, 25%, 12%, 0.08);
  --ff-heading: 'Poppins', sans-serif;
  --ff-body: 'Inter', sans-serif;
  --transition: 0.3s ease;
}

/* --- 1. Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-dark);
  background-color: var(--c-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul,
ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--c-primary);
  transition: color var(--transition);
}

a:hover {
  color: var(--c-secondary);
}

/* --- 2. Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--c-dark);
}

h1 { font-size: 2rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.65rem; margin-bottom: 0.65rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.15rem; margin-bottom: 0.4rem; }
h5 { font-size: 1rem; margin-bottom: 0.35rem; }
h6 { font-size: 0.9rem; margin-bottom: 0.3rem; }

p {
  margin-bottom: 1rem;
  color: hsl(210, 15%, 30%);
}

/* --- 3. Navigation (.site-nav) --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--c-white);
  transition: box-shadow var(--transition);
}

.site-nav.scrolled {
  box-shadow: var(--shadow);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.nav-brand {
  font-family: var(--ff-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--c-primary);
}

.nav-brand:hover {
  color: var(--c-primary);
}

.nav-links {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--c-white);
  box-shadow: var(--shadow);
  padding: 1rem 0;
}

.nav-links.open {
  display: flex;
}

.nav-links li a {
  display: block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  color: var(--c-dark);
  min-height: 44px;
  line-height: 44px;
  padding-top: 0;
  padding-bottom: 0;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--c-secondary);
}

.nav-cta {
  display: none;
}

.nav-cta.mobile {
  display: block;
  margin: 0.5rem 1.5rem;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- 4. Hero (.hero-banner) --- */
.hero-banner {
  padding: 3rem 0;
  overflow: hidden;
}

.hero-banner .container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

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

.hero-text h1 {
  font-size: 2rem;
  line-height: 1.2;
  color: var(--c-dark);
}

.hero-text h1 span {
  color: var(--c-secondary);
}

.hero-text p {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  color: var(--c-gray);
}

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

.hero-image img {
  border-radius: var(--radius);
  margin: 0 auto;
}

/* --- 5. Section Utilities --- */
.section-block {
  padding: 3.5rem 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-heading h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--c-secondary);
  border-radius: 2px;
}

.section-heading p {
  max-width: 600px;
  margin: 0.75rem auto 0;
  color: var(--c-gray);
}

/* --- 6. Service Cards (.svc-card) --- */
.svc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.svc-card {
  background: var(--c-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.svc-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 30px hsla(210, 25%, 12%, 0.14);
}

.svc-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.svc-card-body {
  padding: 1.25rem;
}

.svc-card-body h3 {
  margin-bottom: 0.5rem;
}

.svc-card-body p {
  font-size: 0.95rem;
  color: var(--c-gray);
  margin-bottom: 0;
}

/* --- 7. Why Choose Us (.advantage-grid) --- */
.advantage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.advantage-item {
  padding: 1.5rem 1rem;
}

.advantage-item .adv-icon {
  font-size: 2rem;
  color: var(--c-secondary);
  margin-bottom: 0.5rem;
}

.advantage-item .adv-number {
  font-family: var(--ff-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.2;
}

.advantage-item .adv-label {
  font-size: 0.9rem;
  color: var(--c-gray);
  margin-top: 0.25rem;
}

/* --- 8. Testimonials (.review-card) --- */
.review-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.review-card {
  background: var(--c-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.review-card .review-stars {
  color: hsl(45, 100%, 51%);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.review-card .review-text {
  font-style: italic;
  color: hsl(210, 15%, 30%);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.25rem;
}

.review-card .review-text::before {
  content: '\201C';
  position: absolute;
  left: 0;
  top: -0.25rem;
  font-size: 1.75rem;
  color: var(--c-secondary);
  font-family: var(--ff-heading);
  line-height: 1;
}

.review-card .review-author {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--c-dark);
}

/* --- 9. FAQ (.faq-block) --- */
.faq-block {
  max-width: 800px;
  margin: 0 auto;
}

.faq-block details {
  border-bottom: 1px solid hsl(210, 15%, 90%);
}

.faq-block details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0;
  font-family: var(--ff-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--c-dark);
  cursor: pointer;
  list-style: none;
  min-height: 44px;
}

.faq-block details summary::-webkit-details-marker {
  display: none;
}

.faq-block details summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--c-secondary);
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform var(--transition);
}

.faq-block details[open] summary::after {
  content: '\2212';
}

.faq-block details .faq-answer {
  padding: 0 0 1.25rem;
  color: var(--c-gray);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- 10. CTA Banner (.cta-strip) --- */
.cta-strip {
  background: var(--c-primary);
  padding: 3.5rem 0;
  text-align: center;
}

.cta-strip h2 {
  color: var(--c-white);
  margin-bottom: 0.75rem;
}

.cta-strip p {
  color: hsla(0, 0%, 100%, 0.85);
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

/* --- 11. Footer (.site-footer) --- */
.site-footer {
  background: var(--c-dark);
  color: hsla(0, 0%, 100%, 0.75);
  padding: 3.5rem 0 0;
}

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

.footer-grid h4 {
  color: var(--c-white);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.footer-grid a {
  color: hsla(0, 0%, 100%, 0.7);
  display: inline-block;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.footer-grid a:hover {
  color: var(--c-secondary);
}

.footer-grid ul li + li {
  margin-top: 0.35rem;
}

.footer-grid p {
  color: hsla(0, 0%, 100%, 0.7);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid hsla(0, 0%, 100%, 0.12);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: hsla(0, 0%, 100%, 0.5);
}

/* --- 12. Contact Page --- */
.reach-form {
  background: var(--c-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
}

.reach-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--c-dark);
}

.reach-form input,
.reach-form select,
.reach-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid hsl(210, 15%, 88%);
  border-radius: var(--radius);
  font-family: var(--ff-body);
  font-size: 1rem;
  color: var(--c-dark);
  background: var(--c-light);
  transition: border-color var(--transition);
  min-height: 44px;
}

.reach-form input:focus,
.reach-form select:focus,
.reach-form textarea:focus {
  outline: none;
  border-color: var(--c-secondary);
}

.reach-form textarea {
  resize: vertical;
  min-height: 120px;
}

.reach-form .form-group {
  margin-bottom: 1.25rem;
}

.reach-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

.reach-info-card {
  background: var(--c-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
}

.reach-info-card .info-icon {
  font-size: 1.75rem;
  color: var(--c-secondary);
  margin-bottom: 0.5rem;
}

.reach-info-card h4 {
  margin-bottom: 0.35rem;
}

.reach-info-card p {
  font-size: 0.95rem;
  color: var(--c-gray);
  margin-bottom: 0;
}

/* --- 13. Blog --- */
.entry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.entry-card {
  background: var(--c-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.entry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px hsla(210, 25%, 12%, 0.14);
}

.entry-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.entry-card-body {
  padding: 1.25rem;
}

.entry-card-body .entry-meta {
  font-size: 0.8rem;
  color: var(--c-gray);
  margin-bottom: 0.5rem;
}

.entry-card-body h3 {
  margin-bottom: 0.5rem;
}

.entry-card-body h3 a {
  color: var(--c-dark);
}

.entry-card-body h3 a:hover {
  color: var(--c-secondary);
}

.entry-card-body p {
  font-size: 0.95rem;
  color: var(--c-gray);
  margin-bottom: 0;
}

.entry-detail {
  max-width: 780px;
  margin: 0 auto;
}

.entry-detail h1 {
  margin-bottom: 0.5rem;
}

.entry-detail .entry-meta {
  font-size: 0.85rem;
  color: var(--c-gray);
  margin-bottom: 2rem;
}

.entry-detail img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.entry-detail p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.entry-detail h2,
.entry-detail h3 {
  margin-top: 2rem;
}

.entry-detail ul,
.entry-detail ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.entry-detail ol {
  list-style: decimal;
}

.entry-detail li {
  margin-bottom: 0.4rem;
  color: hsl(210, 15%, 30%);
}

.entry-detail blockquote {
  border-left: 4px solid var(--c-secondary);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--c-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--c-gray);
}

/* --- 14. Policy Pages --- */
.legal-content {
  max-width: 780px;
  margin: 0 auto;
}

.legal-content h1 {
  margin-bottom: 1.5rem;
}

.legal-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: hsl(210, 15%, 30%);
}

.legal-content ul,
.legal-content ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content ol {
  list-style: decimal;
}

.legal-content li {
  margin-bottom: 0.4rem;
  color: hsl(210, 15%, 30%);
}

/* --- 15. Thank You Page --- */
.gratitude-box {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.gratitude-box .gratitude-icon {
  font-size: 3.5rem;
  color: var(--c-secondary);
  margin-bottom: 1rem;
}

.gratitude-box h1 {
  margin-bottom: 0.75rem;
}

.gratitude-box p {
  font-size: 1.05rem;
  color: var(--c-gray);
  margin-bottom: 1.5rem;
}

/* --- 16. Buttons --- */
.action-btn {
  display: inline-block;
  padding: 0.8rem 1.75rem;
  background: var(--c-secondary);
  color: var(--c-white);
  font-family: var(--ff-heading);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--c-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  min-height: 44px;
  line-height: 1.4;
}

.action-btn:hover {
  background: hsl(25, 92%, 45%);
  border-color: hsl(25, 92%, 45%);
  color: var(--c-white);
  transform: translateY(-2px);
}

.action-btn-outline {
  display: inline-block;
  padding: 0.8rem 1.75rem;
  background: transparent;
  color: var(--c-secondary);
  font-family: var(--ff-heading);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--c-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  min-height: 44px;
  line-height: 1.4;
}

.action-btn-outline:hover {
  background: var(--c-secondary);
  color: var(--c-white);
  transform: translateY(-2px);
}

/* --- 17. Cookie Consent --- */
.cc-overlay {
  position: fixed;
  inset: 0;
  background: hsla(210, 25%, 12%, 0.55);
  z-index: 9998;
  display: block;
}

.cc-overlay.cc-hidden {
  display: none;
}

.cc-box {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--c-white);
  box-shadow: 0 -4px 24px hsla(210, 25%, 12%, 0.15);
  padding: 1.5rem;
}

.cc-box p {
  font-size: 0.9rem;
  color: var(--c-dark);
  margin-bottom: 1rem;
}

.cc-box a {
  color: var(--c-secondary);
  text-decoration: underline;
}

.cc-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cc-btn-accept {
  padding: 0.65rem 1.5rem;
  background: var(--c-secondary);
  color: var(--c-white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 44px;
  transition: background var(--transition);
}

.cc-btn-accept:hover {
  background: hsl(25, 92%, 45%);
}

.cc-btn-reject {
  padding: 0.65rem 1.5rem;
  background: transparent;
  color: var(--c-gray);
  border: 1px solid hsl(210, 15%, 85%);
  border-radius: var(--radius);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 44px;
  transition: background var(--transition), color var(--transition);
}

.cc-btn-reject:hover {
  background: var(--c-light);
  color: var(--c-dark);
}

.cc-trigger {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 9997;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-white);
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: background var(--transition);
}

.cc-trigger:hover {
  background: hsl(210, 55%, 30%);
}

/* --- 18. Responsive — min-width: 480px --- */
@media (min-width: 480px) {
  .reach-info {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .cc-box {
    padding: 1.5rem 2rem;
  }

  .cc-box p {
    display: inline;
    margin-bottom: 0;
    margin-right: 1rem;
  }

  .cc-actions {
    display: inline-flex;
  }
}

/* --- Responsive — min-width: 752px --- */
@media (min-width: 752px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }

  .section-block {
    padding: 5rem 0;
  }

  .container {
    padding: 0 2rem;
  }

  /* Nav desktop */
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    box-shadow: none;
    padding: 0;
    align-items: center;
    gap: 0.25rem;
  }

  .nav-links li a {
    padding: 0.5rem 0.85rem;
    min-height: auto;
    line-height: 1.5;
  }

  .nav-cta {
    display: inline-block;
  }

  .nav-cta.mobile {
    display: none;
  }

  /* Hero two-column */
  .hero-banner {
    padding: 4rem 0;
  }

  .hero-banner .container {
    flex-direction: row;
    align-items: center;
  }

  .hero-text {
    flex: 0 0 55%;
    text-align: left;
    padding-right: 2rem;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-image {
    flex: 0 0 45%;
  }

  /* Service cards */
  .svc-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Advantage grid */
  .advantage-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

  /* Contact layout */
  .contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: start;
  }

  .reach-info {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

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

  /* CTA strip */
  .cta-strip {
    padding: 4.5rem 0;
  }
}

/* --- Responsive — min-width: 1080px --- */
@media (min-width: 1080px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }

  .hero-text h1 {
    font-size: 3rem;
  }

  .hero-banner {
    padding: 5rem 0;
  }

  /* Service cards 3-col */
  .svc-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Review grid 3-col */
  .review-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Blog grid 3-col */
  .entry-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

/* --- Utility classes --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
