/*
Theme Name: Apex Garage Door
Theme URI: https://example.com
Author: Your Company
Description: A mobile-first, service-business WordPress theme for garage door repair and installation companies. Editable business name, phone number, and area via Customizer. Fully WordPress compatible - add pages, blog posts, and edit content from the Dashboard.
Version: 1.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: apex-garage-door
*/

/* ---------- Reset & Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #10151c;
  --color-bg-alt: #161d27;
  --color-surface: #1c2530;
  --color-accent: #f2a93b;
  --color-accent-dark: #d88f22;
  --color-text: #eef1f5;
  --color-text-muted: #a9b3c1;
  --color-border: #2b3542;
  --radius: 10px;
  --max-width: 1180px;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  background: var(--color-accent);
  color: #14181f;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 999px;
  transition: background .2s ease, transform .2s ease;
}
.btn:hover { background: var(--color-accent-dark); transform: translateY(-2px); }

.section-title {
  font-size: 2rem;
  margin-bottom: 12px;
  color: #fff;
}
.section-subtitle {
  color: var(--color-text-muted);
  margin-bottom: 36px;
  max-width: 640px;
}

/* ---------- Top Bar ---------- */
.top-bar {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  font-size: .85rem;
  color: var(--color-text-muted);
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.top-bar a.phone { color: var(--color-accent); font-weight: 700; }

/* ---------- Header ---------- */
.site-header {
  background: var(--color-bg);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.site-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .5px;
}
.site-logo span { color: var(--color-accent); }

.main-nav ul {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.main-nav a {
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color .2s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--color-accent); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-cta .call-btn {
  background: var(--color-accent);
  color: #14181f;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
}

.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.6rem; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-bg-alt), var(--color-bg));
  padding: 80px 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: 2.6rem;
  color: #fff;
  margin-bottom: 18px;
  line-height: 1.25;
}
.hero h1 span { color: var(--color-accent); }
.hero p {
  color: var(--color-text-muted);
  margin-bottom: 28px;
  font-size: 1.05rem;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badges {
  margin-top: 30px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--color-text-muted);
  font-size: .9rem;
}
.hero-badges strong { display: block; color: #fff; font-size: 1.3rem; }
.hero-visual {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: .95rem;
  text-align: center;
  padding: 20px;
}

/* ---------- Services Grid ---------- */
.services { padding: 80px 0; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 22px;
  transition: transform .2s ease, border-color .2s ease;
}
.service-card:hover { transform: translateY(-4px); border-color: var(--color-accent); }
.service-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(242,169,59,.15);
  color: var(--color-accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  margin-bottom: 16px;
}
.service-card h3 { color: #fff; margin-bottom: 8px; font-size: 1.15rem; }
.service-card p { color: var(--color-text-muted); font-size: .92rem; margin-bottom: 14px; }
.service-card a.more { color: var(--color-accent); font-weight: 700; font-size: .88rem; }

/* ---------- Content Block (About / Why Us) ---------- */
.content-block { padding: 70px 0; background: var(--color-bg-alt); }
.content-block .container { max-width: 860px; }
.content-block p { color: var(--color-text-muted); margin-bottom: 16px; }

/* ---------- Detail Sections (Opener/Spring/Repair/Install) ---------- */
.detail-section { padding: 70px 0; border-top: 1px solid var(--color-border); }
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.detail-grid.reverse .detail-visual { order: 2; }
.detail-list li {
  padding: 10px 0 10px 28px;
  position: relative;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
.detail-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 800;
}
.detail-visual {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted);
  text-align: center;
  padding: 20px;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: var(--color-accent);
  color: #14181f;
  padding: 50px 0;
  text-align: center;
}
.cta-banner h2 { font-size: 1.8rem; margin-bottom: 10px; }
.cta-banner .btn { background: #14181f; color: #fff; }
.cta-banner .btn:hover { background: #24303f; }

/* ---------- Blog / Posts ---------- */
.blog-section { padding: 70px 0; }
.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.post-card h2 a { color: #fff; font-size: 1.3rem; }
.post-card .post-meta { color: var(--color-text-muted); font-size: .85rem; margin: 8px 0 12px; }
.post-card .post-excerpt { color: var(--color-text-muted); margin-bottom: 14px; }
.pagination { display: flex; gap: 10px; margin-top: 20px; }
.pagination a, .pagination span {
  padding: 8px 14px; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: 6px;
}

/* single post / page */
.single-content { padding: 60px 0; max-width: 820px; margin: 0 auto; }
.single-content h1 { color: #fff; font-size: 2rem; margin-bottom: 16px; }
.single-content .post-meta { color: var(--color-text-muted); margin-bottom: 24px; }
.single-content p { color: var(--color-text-muted); margin-bottom: 16px; }

/* comments */
.comments-area { max-width: 820px; margin: 40px auto 0; }
.comments-area h3 { color: #fff; margin-bottom: 16px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 60px 0 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; }
.footer-col p, .footer-col a { color: var(--color-text-muted); font-size: .92rem; display: block; margin-bottom: 8px; }
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: .85rem;
}

/* ---------- Widgets (sidebar, if used) ---------- */
.widget { margin-bottom: 30px; }
.widget h2 { color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.widget ul li { padding: 6px 0; color: var(--color-text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid, .detail-grid.reverse { grid-template-columns: 1fr; }
  .detail-grid.reverse .detail-visual { order: 0; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 4px; padding: 16px 0; }
  .nav-toggle { display: block; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}

/* ---------- Gutenberg / Block Editor content support ---------- */
.wp-block-button__link,
.wp-block-button__link.wp-element-button {
  display: inline-block;
  background: var(--color-accent);
  color: #14181f;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 999px;
  transition: background .2s ease, transform .2s ease;
}
.wp-block-button__link:hover { background: var(--color-accent-dark); transform: translateY(-2px); }
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border: 1px solid var(--color-border);
  color: #fff;
}
.cta-banner .wp-block-button__link { background: #14181f; color: #fff; }
.cta-banner .wp-block-button__link:hover { background: #24303f; }

.wp-block-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.wp-block-columns { gap: 24px; }
.wp-block-group.hero { background: linear-gradient(135deg, var(--color-bg-alt), var(--color-bg)); padding: 80px 0; }
.wp-block-group.hero .container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.wp-block-group.services { padding: 80px 0; }
.wp-block-group.content-block { padding: 70px 0; background: var(--color-bg-alt); }
.wp-block-group.content-block .container { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.wp-block-group.detail-section { padding: 70px 0; border-top: 1px solid var(--color-border); }
.wp-block-group.cta-banner { background: var(--color-accent); color: #14181f; padding: 50px 0; text-align: center; }
.wp-block-group.cta-banner h2 { color: #14181f; }
.wp-block-group.cta-banner p { color: #14181f; }
.wp-block-group.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.wp-block-group.service-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 28px 22px; }
.wp-block-group.hero-visual, .wp-block-group.detail-visual, figure.hero-visual, figure.detail-visual {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  min-height: 240px;
}
.wp-block-group.hero-visual img, .wp-block-group.detail-visual img, figure.hero-visual img, figure.detail-visual img {
  border-radius: var(--radius);
  width: 100%;
}
