/* =====================================================
   Right Way Roofing — Patriotic Theme
   Red · White · Blue
   ===================================================== */

:root {
  --red:        #B22234;
  --red-dark:   #8E1A28;
  --red-bright: #C8102E;
  --blue:       #002868;
  --blue-dark:  #001A4A;
  --blue-mid:   #1E3A8A;
  --white:      #FFFFFF;
  --cream:      #F7F6F1;
  --gray-100:   #F2F4F7;
  --gray-200:   #E5E7EB;
  --gray-400:   #98A2B3;
  --gray-700:   #344054;
  --gray-900:   #101828;
  --shadow:     0 8px 24px rgba(0, 40, 104, 0.12);
  --shadow-sm:  0 2px 6px rgba(0, 40, 104, 0.08);
  --radius:     6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); text-decoration: underline; }

h1, h2, h3, h4, h5 {
  font-family: 'Oswald', 'Open Sans', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--blue);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); text-transform: uppercase; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* =========== Buttons =========== */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}
.btn-cta {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-cta:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); text-decoration: none; }
.btn-blue {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-blue:hover { background: var(--blue-dark); color: var(--white); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--blue); text-decoration: none; }

/* =========== Topbar =========== */
.topbar {
  background: var(--blue-dark);
  color: var(--white);
  font-size: 0.85rem;
}
.topbar-inner {
  display: flex; flex-wrap: wrap; gap: 18px;
  padding: 8px 20px;
  justify-content: flex-end;
}
.topbar-item { opacity: 0.95; }
.topbar-item + .topbar-item { border-left: 1px solid rgba(255,255,255,0.2); padding-left: 18px; }

/* =========== Header =========== */
.site-header {
  background: var(--white);
  border-bottom: 4px solid var(--red);
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: var(--white);
  border-radius: 50%;
  font-size: 1.5rem;
  border: 3px solid var(--red);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.brand-tag {
  font-size: 0.78rem;
  color: var(--gray-700);
  letter-spacing: 0.5px;
}

/* =========== Nav =========== */
.nav { position: relative; }
.nav-list {
  display: flex; gap: 4px;
  list-style: none; padding: 0; margin: 0;
  align-items: center;
}
.nav-list a {
  display: block;
  padding: 10px 16px;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 1px;
  color: var(--blue);
  border-radius: var(--radius);
}
.nav-list a:hover { background: var(--gray-100); color: var(--red); text-decoration: none; }
.nav-list a.btn-cta { color: var(--white); padding: 10px 22px; }
.nav-list a.btn-cta:hover { color: var(--white); background: var(--red-dark); }

.nav-toggle, .nav-toggle-label { display: none; }

/* =========== Hero =========== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 60%, var(--blue-mid) 100%);
  color: var(--white);
  overflow: hidden;
  padding: 90px 0 110px;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 36px),
    radial-gradient(circle at 80% 30%, rgba(178,34,52,0.30) 0%, transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 12px;
  background: repeating-linear-gradient(90deg, var(--red) 0 60px, var(--white) 60px 120px);
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; }
.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: var(--red);
  color: var(--white);
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-bottom: 18px;
}
.hero h1 { color: var(--white); margin-bottom: 18px; }
.hero p.lead {
  font-size: 1.15rem;
  max-width: 620px;
  opacity: 0.95;
  margin-bottom: 28px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* =========== Trust strip =========== */
.trust {
  background: var(--cream);
  border-bottom: 1px solid var(--gray-200);
  padding: 22px 0;
}
.trust-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  text-align: center;
}
.trust-item {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--blue);
  font-size: 0.95rem;
}
.trust-item .star { color: var(--red); margin-right: 6px; }

/* =========== Sections =========== */
.section { padding: 70px 0; }
.section.alt { background: var(--cream); }
.section-head {
  text-align: center; max-width: 720px; margin: 0 auto 50px;
}
.section-head .eyebrow {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--red);
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.section-head h2::after {
  content: '';
  display: block;
  width: 80px; height: 4px;
  background: var(--red);
  margin: 14px auto 0;
}

/* =========== Service grid =========== */
.service-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex; flex-direction: column;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-top-color: var(--blue);
}
.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}
.service-card p {
  flex: 1;
  color: var(--gray-700);
  font-size: 0.95rem;
}
.service-card .more {
  margin-top: 14px;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  color: var(--red);
}
.service-card .more:hover { color: var(--red-dark); }
.service-icon {
  width: 50px; height: 50px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

/* =========== CTA banner =========== */
.cta-banner {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
  position: relative;
}
.cta-banner::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 24px);
  pointer-events: none;
}
.cta-banner h2 { color: var(--white); margin-bottom: 12px; }
.cta-banner p { font-size: 1.1rem; margin-bottom: 24px; opacity: 0.95; }
.cta-banner .btn { background: var(--white); color: var(--blue); border-color: var(--white); }
.cta-banner .btn:hover { background: var(--cream); color: var(--blue-dark); }

/* =========== Two-column =========== */
.split {
  display: grid; gap: 50px;
  grid-template-columns: 1fr 1fr; align-items: center;
}
.split .photo-frame {
  border: 6px solid var(--white);
  outline: 3px solid var(--red);
  background: var(--blue);
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  box-shadow: var(--shadow);
}

/* =========== Page hero (sub pages) =========== */
.page-hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 60px 0 70px;
  position: relative;
}
.page-hero::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: repeating-linear-gradient(90deg, var(--red) 0 40px, var(--white) 40px 80px);
}
.page-hero h1 { color: var(--white); margin-bottom: 6px; }
.page-hero .crumbs { font-size: 0.9rem; opacity: 0.85; }
.page-hero .crumbs a { color: var(--white); text-decoration: underline; }

/* =========== Forms =========== */
.form { display: grid; gap: 16px; max-width: 640px; }
.form .row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--blue); font-size: 0.95rem; }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,40,104,0.15);
}
.form textarea { min-height: 140px; resize: vertical; }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  border-left: 4px solid;
}
.alert-success { background: #ECFDF3; border-color: #12B76A; color: #054F31; }
.alert-error   { background: #FEF3F2; border-color: var(--red); color: #7A271A; }
.alert-info    { background: #EFF8FF; border-color: var(--blue); color: var(--blue-dark); }

/* =========== Service detail =========== */
.service-body { display: grid; gap: 40px; grid-template-columns: 2fr 1fr; }
.service-body .sidebar {
  background: var(--cream);
  padding: 24px;
  border-radius: var(--radius);
  border-top: 4px solid var(--red);
  align-self: start;
  position: sticky; top: 100px;
}
.service-body .sidebar h4 { color: var(--blue); margin-top: 0; }
.service-body .sidebar ul { list-style: none; padding: 0; margin: 0 0 18px; }
.service-body .sidebar li { padding: 8px 0; border-bottom: 1px solid var(--gray-200); }
.service-body .sidebar li a { color: var(--gray-900); }
.service-body .sidebar li a:hover { color: var(--red); }
.service-body .content p { margin-bottom: 1em; }
.service-body .content ul { padding-left: 22px; }

/* =========== Footer =========== */
.footer-stripe {
  height: 10px;
  background: repeating-linear-gradient(90deg, var(--red) 0 50px, var(--white) 50px 100px, var(--blue) 100px 150px);
}
.site-footer { background: var(--blue-dark); color: var(--white); }
.footer-grid {
  display: grid; gap: 36px;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 60px 20px 40px;
}
.footer-col h3, .footer-col h4 { color: var(--white); }
.footer-col h4 { text-transform: uppercase; letter-spacing: 1px; font-size: 1rem; margin-bottom: 16px; }
.footer-col p { opacity: 0.85; font-size: 0.95rem; }
.footer-license {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: var(--red);
  color: var(--white);
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
}
.footer-links, .footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-links li, .footer-contact li { padding: 5px 0; font-size: 0.93rem; }
.footer-links a { color: rgba(255,255,255,0.85); }
.footer-links a:hover { color: var(--white); }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 0;
  font-size: 0.85rem;
  opacity: 0.8;
}
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-bottom a { color: rgba(255,255,255,0.85); }

/* =========== Responsive =========== */
@media (max-width: 880px) {
  .nav-toggle-label {
    display: flex; flex-direction: column; gap: 5px;
    width: 32px; height: 26px; justify-content: center; cursor: pointer;
    padding: 4px;
  }
  .nav-toggle-label span {
    display: block; height: 3px; width: 100%; background: var(--blue);
    border-radius: 2px;
  }
  .nav-list {
    position: absolute; right: 0; top: 56px;
    flex-direction: column;
    background: var(--white);
    box-shadow: var(--shadow);
    border-top: 4px solid var(--red);
    min-width: 220px;
    padding: 10px;
    display: none;
  }
  .nav-toggle:checked ~ .nav-list { display: flex; }
  .nav-list a { padding: 12px 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .service-body { grid-template-columns: 1fr; }
  .service-body .sidebar { position: static; }
  .form .row { grid-template-columns: 1fr; }
  .topbar-hours { display: none; }
}

@media (max-width: 520px) {
  .hero { padding: 60px 0 80px; }
  .topbar { display: none; }
  .brand-tag { display: none; }
}
