/* ================================
   TOM'S MECHANICAL SERVICES
   Professional Plumbing & Heating
   ================================ */

/* CSS VARIABLES */
:root {
  --primary: #1a3a6e;
  --primary-light: #2d5aa8;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --text-dark: #111827;
  --text-gray: #4b5563;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 4px 24px rgba(0,0,0,0.12);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--bg-white);
}

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

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }

/* CONTAINER */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================================
   TOP BAR
   ================================ */
.topbar {
  background: var(--primary);
  color: white;
  padding: 10px 0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar a { color: white; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: background 0.2s;
}

.topbar-social:hover {
  background: rgba(255,255,255,0.2);
}

.topbar-phone {
  font-weight: 600;
}

/* ================================
   HEADER
   ================================ */
header {
  background: white;
  padding: 16px 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.logo-sub {
  font-size: 12px;
  color: var(--text-light);
}

nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

nav a {
  color: var(--text-gray);
  font-weight: 500;
  font-size: 15px;
}

nav a:hover { color: var(--primary); }

.btn-nav {
  background: var(--accent);
  color: white !important;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
}

.btn-nav:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ================================
   HERO
   ================================ */
.hero {
  padding: 100px 0 80px;
  color: white;
  text-align: center;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 18px;
  max-width: 700px;
  margin: 0 auto 32px;
  opacity: 0.95;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.btn-primary {
  background: var(--accent);
  color: white;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, transform 0.1s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.3);
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  color: white;
}

.hero-badges {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 14px;
  opacity: 0.9;
}

/* HERO RATING BADGE */
.hero-rating {
  margin-top: 40px;
}

.rating-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 16px 32px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.2);
  transition: transform 0.2s, background 0.2s;
}

.rating-badge:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.rating-badge .stars {
  font-size: 24px;
  margin-bottom: 4px;
}

.rating-badge .rating-text {
  color: white;
  font-size: 14px;
}

.rating-badge strong {
  font-size: 18px;
}

/* ================================
   TRUST BAR
   ================================ */
.trust-bar {
  background: var(--bg-light);
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.trust-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  text-align: center;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trust-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
}

.trust-label {
  font-size: 14px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ================================
   SERVICES
   ================================ */
.services {
  padding: 80px 0;
  background: var(--bg-light);
}

.services h2, .reviews-section h2, .why-us h2, .contact h2 {
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--text-light);
  font-size: 18px;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.service-card {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.service-card ul {
  list-style: none;
}

.service-card li {
  padding: 6px 0;
  color: var(--text-gray);
  font-size: 15px;
  position: relative;
  padding-left: 20px;
}

.service-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ================================
   REVIEWS SECTION
   ================================ */
.reviews-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
}

.reviews-section h2 {
  color: white;
}

.reviews-section .section-sub {
  color: rgba(255,255,255,0.85);
}

.reviews-header {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
}

.google-rating {
  background: white;
  color: var(--text-dark);
  padding: 32px 48px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}

.google-logo {
  height: 24px;
  margin-bottom: 12px;
}

.rating-big {
  font-size: 56px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stars-big {
  font-size: 28px;
  margin: 8px 0;
}

.review-count-text {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 16px;
}

.btn-reviews {
  display: inline-block;
  background: var(--primary);
  color: white !important;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}

.btn-reviews:hover {
  background: var(--primary-light);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.review-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 24px;
}

.review-stars {
  font-size: 18px;
  margin-bottom: 12px;
}

.review-text {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 12px;
  font-style: italic;
}

.review-author {
  font-size: 14px;
  opacity: 0.9;
}

/* SOCIAL CTA */
.social-cta {
  text-align: center;
  margin-top: 32px;
}

.btn-facebook {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #1877f2;
  color: white !important;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 16px;
  transition: background 0.2s, transform 0.1s;
}

.btn-facebook:hover {
  background: #166fe5;
  transform: translateY(-2px);
}

/* ================================
   WHY US
   ================================ */
.why-us {
  padding: 80px 0;
  background: white;
}

.why-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 900px) {
  .why-grid { grid-template-columns: 1fr; }
}

.why-text h2 {
  text-align: left;
}

.why-text > p {
  font-size: 18px;
  color: var(--text-gray);
  margin-bottom: 32px;
}

.why-points {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.why-point {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.why-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.why-point strong {
  display: block;
  font-size: 17px;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.why-point p {
  font-size: 15px;
  color: var(--text-light);
  margin: 0;
}

.cta-card {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.cta-card h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.cta-card p {
  color: var(--text-gray);
  margin-bottom: 20px;
}

.cta-note {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 12px;
}

/* ================================
   GALLERY / PROJECTS
   ================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  background: white;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.gallery-caption {
  padding: 16px;
}

.gallery-caption strong {
  display: block;
  color: var(--primary);
  margin-bottom: 4px;
}

.gallery-caption p {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
}

/* GALLERY PLACEHOLDER */
.gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border: 2px dashed var(--border);
}

.placeholder-content {
  text-align: center;
  padding: 24px;
}

.placeholder-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
  opacity: 0.5;
}

.placeholder-content p {
  color: var(--text-light);
  font-size: 15px;
}

/* ================================
   CONTACT
   ================================ */
.contact {
  padding: 80px 0;
  background: var(--bg-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(45, 90, 168, 0.15);
}

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

.contact-info {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.contact-info h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 12px;
  color: var(--text-gray);
}

.contact-info a {
  color: var(--primary-light);
}

.license-badge {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-gray);
}

.license-badge strong {
  color: var(--primary);
}

/* CONTACT SOCIAL */
.contact-social {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-gray);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}

.social-link:hover {
  background: var(--primary);
  color: white;
}

/* ================================
   FOOTER
   ================================ */
footer {
  background: var(--primary);
  color: white;
  padding: 40px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-main p {
  margin: 0;
  opacity: 0.9;
  font-size: 14px;
}

.footer-main p + p {
  margin-top: 4px;
  opacity: 0.7;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: background 0.2s;
}

.footer-social a:hover {
  background: rgba(255,255,255,0.2);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .header-inner {
    flex-direction: column;
    gap: 16px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .hero {
    padding: 60px 0 50px;
  }

  .hero-badges {
    gap: 12px;
    font-size: 13px;
  }

  .trust-number {
    font-size: 28px;
  }

  .reviews-section {
    padding: 60px 0;
  }

  .google-rating {
    padding: 24px 32px;
  }

  .rating-big {
    font-size: 42px;
  }
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-card, .review-card, .gallery-item {
  animation: fadeInUp 0.5s ease-out;
}