/* ============================================================
   Rex Recycling — Shared Styles
   ============================================================ */

:root {
  --green:      #006400;
  --green-dark: #004d00;
  --green-light:#e8f5e8;
  --white:      #ffffff;
  --off-white:  #f9faf9;
  --grey-light: #f0f4f0;
  --grey:       #6b7c6b;
  --text:       #1a2e1a;
  --radius:     8px;
  --shadow:     0 2px 12px rgba(0,100,0,.12);
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

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

a { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-dark); }

ul { list-style: none; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---- Layout Helpers ---- */
.container {
  width: min(1200px, 100% - 2rem);
  margin-inline: auto;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--grey-light);
}

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.section__header h2 { color: var(--green-dark); }
.section__header p  { color: var(--grey); max-width: 600px; margin-inline: auto; margin-top: .5rem; }

.divider {
  display: block;
  width: 60px;
  height: 4px;
  background: var(--green);
  border-radius: 2px;
  margin: .75rem auto 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: .8rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,100,0,.25); }

.btn--primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn--primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}

.btn--outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn--outline:hover {
  background: var(--green);
  color: var(--white);
}

.btn--white {
  background: var(--white);
  color: var(--green);
  border-color: var(--white);
}
.btn--white:hover {
  background: var(--green-light);
  border-color: var(--green-light);
  color: var(--green-dark);
}

/* ---- Top Bar ---- */
.topbar {
  background: var(--green-dark);
  color: rgba(255,255,255,.85);
  font-size: .85rem;
  padding: .45rem 0;
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: var(--white); }

.topbar__links { display: flex; gap: 1.5rem; }

@media (max-width: 768px) {
  .topbar { display: none; }
}

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -.5px;
}

.nav__logo img {
  height: 48px;
  width: 48px;
}

.footer__brand .nav__logo img {
  height: 56px;
  width: 56px;
  background: var(--white);
  border-radius: 50%;
  padding: 3px;
}
.nav__logo span { color: var(--text); }
.nav__logo:hover { color: var(--green-dark); }

.nav__links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav__links a {
  color: var(--text);
  font-weight: 500;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav__links a:hover,
.nav__links a.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.nav__cta {
  background: var(--green) !important;
  color: var(--white) !important;
  padding: .5rem 1.25rem !important;
  border-radius: var(--radius) !important;
  border-bottom: none !important;
  font-weight: 600 !important;
}
.nav__cta:hover {
  background: var(--green-dark) !important;
  color: var(--white) !important;
}

/* Mobile hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .5rem;
  background: none;
  border: none;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Mobile nav open state */
.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); }

@media (max-width: 768px) {
  .nav__toggle { display: flex; }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--grey-light);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: .75rem 0; width: 100%; border-bottom: 1px solid var(--grey-light); }
  .nav__links a:last-child { border-bottom: none; }
  .nav__cta { border-radius: var(--radius) !important; margin-top: .5rem; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: var(--green-dark);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1591193686104-fddba4d0e4d8?w=1600&q=80');
  background-size: cover;
  background-position: center;
  opacity: .15;
}

.hero__content {
  position: relative;
  z-index: 1;
  color: var(--white);
  max-width: 680px;
}

.hero__tagline {
  display: inline-block;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #7dd67d;
  margin-bottom: 1rem;
}

.hero__title {
  color: var(--white);
  margin-bottom: 1.25rem;
}

.hero__sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 2.5rem;
  max-width: 520px;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---- Stats Bar ---- */
.stats {
  background: var(--green);
  padding: 2rem 0;
  color: var(--white);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.stat__number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.stat__label {
  font-size: .9rem;
  opacity: .85;
  margin-top: .25rem;
}

/* ---- Card Grid ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,100,0,.18);
}

.card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card__body {
  padding: 1.5rem;
}

.card__icon {
  font-size: 2rem;
  margin-bottom: .75rem;
}

.card__body h3 {
  margin-bottom: .5rem;
  color: var(--green-dark);
}

.card__body p {
  color: var(--grey);
  font-size: .95rem;
}

.card__body .btn {
  margin-top: 1rem;
}

/* ---- Feature List ---- */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.feature-item__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--green);
}

.feature-item__text h4 { margin-bottom: .2rem; }
.feature-item__text p  { font-size: .9rem; color: var(--grey); margin: 0; }

/* ---- Two-column split ---- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }

@media (max-width: 768px) {
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .split--reverse { direction: ltr; }
}

.split__img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---- Values ---- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.value-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.value-card:hover { transform: translateY(-4px); }

.value-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.value-card h3 {
  color: var(--green-dark);
  margin-bottom: .5rem;
}

.value-card p {
  color: var(--grey);
  font-size: .9rem;
}

/* ---- CTA Banner ---- */
.cta-banner {
  background: var(--green);
  padding: 4rem 0;
  text-align: center;
  color: var(--white);
}

.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p  { color: rgba(255,255,255,.85); margin-bottom: 2rem; max-width: 560px; margin-inline: auto; margin-bottom: 2rem; }

.cta-banner__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

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

.contact-info h3 {
  color: var(--green-dark);
  margin-bottom: 1rem;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1.25rem;
  font-size: .95rem;
}

.contact-detail__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: .1rem;
}

.contact-detail strong { display: block; margin-bottom: .1rem; }
.contact-detail a { color: var(--text); }
.contact-detail a:hover { color: var(--green); }

/* Form */
.form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.form h3 {
  color: var(--green-dark);
  margin-bottom: 1.75rem;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .4rem;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid #d0ddd0;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,100,0,.12);
}

.form-group textarea { resize: vertical; min-height: 130px; }

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

/* Map */
.map-container {
  margin-top: 3rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 400px;
  border: none;
}

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  background: var(--green-dark);
  color: var(--white);
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1604187351574-c75ca79f5807?w=1600&q=80') center/cover;
  opacity: .12;
}

.page-hero__content {
  position: relative;
  z-index: 1;
}

.page-hero h1 { color: var(--white); margin-bottom: .75rem; }
.page-hero p  { color: rgba(255,255,255,.8); font-size: 1.1rem; max-width: 560px; }

.breadcrumb {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 1rem;
}
.breadcrumb a { color: rgba(255,255,255,.65); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span { margin: 0 .4rem; }

/* ---- Team / About ---- */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 768px) { .about-intro { grid-template-columns: 1fr; gap: 2rem; } }

.about-intro__img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tag {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: .3rem .8rem;
  border-radius: 20px;
  margin-bottom: .75rem;
}

/* ---- Services Detail ---- */
.service-block {
  padding: 5rem 0;
}

.service-block + .service-block {
  border-top: 1px solid #e0e8e0;
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .8rem;
  border-radius: 20px;
}

/* ---- Postcode Coverage Grid ---- */
.postcode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.postcode-card {
  background: var(--white);
  border-top: 4px solid var(--green);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: transform var(--transition);
}
.postcode-card:hover { transform: translateY(-4px); }

.postcode-card h3 {
  font-size: 2rem;
  color: var(--green-dark);
  margin-bottom: .25rem;
}

.postcode-card p {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--grey);
  margin: 0;
}

/* ---- Scope of Work Box ---- */
.scope-box {
  background: var(--grey-light);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.scope-box h5 {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green-dark);
  margin-bottom: .75rem;
}

.scope-box ul li {
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: .5rem;
  color: var(--grey);
  font-size: .95rem;
}
.scope-box ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* ---- We Buy List ---- */
.buy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .4rem 1.25rem;
  margin: 1rem 0 1.5rem;
}

.buy-grid span {
  position: relative;
  padding-left: 1rem;
  font-size: .92rem;
  font-weight: 500;
}
.buy-grid span::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

/* ---- Price Callout ---- */
.price-callout {
  background: var(--green-light);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
}

.price-callout h4 {
  color: var(--green-dark);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: .35rem;
}

.price-callout p { font-size: .92rem; margin: 0; }

/* ---- Promise Strip ---- */
.promise-strip {
  background: var(--green-dark);
  color: var(--white);
  padding: 2.5rem 0;
  text-align: center;
}

.promise-strip h2 {
  color: var(--white);
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.promise-strip__items {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1rem;
}

.promise-strip__items .dot { color: #7dd67d; }

/* ---- Footer ---- */
.footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.8);
  padding: 3.5rem 0 1.5rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer__brand .nav__logo { font-size: 1.4rem; color: var(--white); }
.footer__brand p { margin-top: .75rem; font-size: .9rem; max-width: 300px; }

.footer__col h4 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer__col ul li {
  margin-bottom: .5rem;
}

.footer__col ul a {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  transition: color var(--transition);
}
.footer__col ul a:hover { color: var(--white); }

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: .65rem;
  font-size: .9rem;
}

.footer__contact-item a {
  color: rgba(255,255,255,.75);
}
.footer__contact-item a:hover { color: var(--white); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  font-size: .85rem;
  color: rgba(255,255,255,.55);
  flex-wrap: wrap;
  gap: .5rem;
}

/* ---- Utility ---- */
.text-green { color: var(--green); }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }

/* ---- Success Message ---- */
.form-success {
  display: none;
  background: var(--green-light);
  border: 1.5px solid var(--green);
  color: var(--green-dark);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  font-weight: 500;
}
