/* Ryan's Home Solutions — shared site styles */

@import url("theme.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  min-height: 100dvh;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-surface);
}

a {
  color: inherit;
}

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

/* ── Hero ── */

.hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  background-color: #f5f7fa;
  background-image:
    linear-gradient(rgba(30, 53, 88, 0.78), rgba(30, 53, 88, 0.78)),
    url("/images/hero-tools-bg.png");
  background-size: cover;
  background-position: center;
  color: #fff;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.025em;
}

.hero p {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.6;
  margin: 0 auto 32px;
  max-width: 640px;
  font-weight: 400;
  opacity: 0.95;
}

/* ── Services page ── */

.services-page {
  padding: 56px 24px 80px;
  background: var(--color-surface);
}

.services-page h1 {
  text-align: center;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 32px;
  letter-spacing: -0.02em;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.service-tile {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.service-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(30, 53, 88, 0.45);
  transition: background 0.2s ease;
}

.service-tile:hover::before,
.service-tile:focus-visible::before {
  background: rgba(30, 53, 88, 0.32);
}

.service-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.service-tile span {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.service-tile--assembly {
  background-image: url("https://img1.wsimg.com/isteam/getty/175438654/:/cr=t:37.19%25,l:24.6%25,w:54.35%25,h:54.52%25/rs=w:800,m");
}

.service-tile--installation {
  background-image: url("https://img1.wsimg.com/isteam/getty/2194398907/:/cr=t:13.19%25,l:15.92%25,w:70.15%25,h:52.63%25/rs=w:800,m");
}

.service-tile--other {
  background-image: url("https://img1.wsimg.com/isteam/getty/539955764/:/cr=t:15.04%25,l:26.28%25,w:62.33%25,h:51.02%25/rs=w:800,m");
}

@media (max-width: 767px) {
  :root {
    --header-height: 102px;
  }

  .header-logo img {
    height: 87px;
  }

  .header-right .icon-btn.search-btn {
    display: none;
  }

  .service-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    gap: 20px;
  }

  .services-page {
    padding-top: 40px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .service-grid {
    gap: 20px;
  }
}
