/* The Reining Authority — Mexlife-inspired theme */
:root {
  --teal: #007b8a;
  --teal-dark: #005f6b;
  --navy: #0e202e;
  --orange: #ff4d2a;
  --orange-hover: #e63e1d;
  --text: #5a6a78;
  --heading: #0e202e;
  --beige: #f7f4f0;
  --white: #ffffff;
  --border: #e2e8ee;
  --shadow: 0 8px 30px rgba(14, 32, 46, 0.08);
  --radius: 8px;
  --font: "Poppins", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

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

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

a:hover {
  color: var(--orange);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading);
  line-height: 1.3;
  margin: 0 0 1rem;
  font-weight: 700;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.section-pad {
  padding: 5rem 0;
}

.section-pad--beige {
  background: var(--beige);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn--primary {
  background: var(--teal);
  color: var(--white);
}

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

.btn--orange {
  background: var(--orange);
  color: var(--white);
}

.btn--orange:hover {
  background: var(--orange-hover);
  color: var(--white);
}

.btn--outline {
  background: transparent;
  border: 2px solid var(--teal);
  color: var(--teal);
}

.btn--outline:hover {
  background: var(--teal);
  color: var(--white);
}

/* Top bar */
.top-bar {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.top-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.top-bar a {
  color: rgba(255, 255, 255, 0.9);
}

.top-bar a:hover {
  color: var(--orange);
}

.top-bar__cta {
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
}

/* Header */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.logo-link img {
  height: 48px;
  width: auto;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--navy);
  border-radius: 2px;
  transition: 0.3s;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
}

.main-nav a {
  color: var(--heading);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  position: relative;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--teal);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--orange);
}

/* Hero */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 32, 46, 0.82), rgba(0, 123, 138, 0.55));
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  padding: 4rem 0;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.page-hero {
  background: linear-gradient(135deg, var(--navy), var(--teal-dark));
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.page-hero .breadcrumb {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

.page-hero .breadcrumb a {
  color: var(--white);
}

/* Split about */
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.split-row__img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.check-list li {
  padding: 0.5rem 0 0.5rem 2rem;
  position: relative;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
}

/* Cards grid */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s;
}

.service-card:hover {
  transform: translateY(-6px);
}

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

.service-card__body {
  padding: 1.5rem;
}

.service-card h3 {
  font-size: 1.25rem;
}

.read-more {
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Trust section */
.trust-section {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
}

.trust-section .section-title {
  color: var(--white);
  text-align: center;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.trust-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text);
}

.trust-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: rgba(0, 123, 138, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-size: 1.5rem;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.team-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
}

.team-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.team-card__body {
  padding: 1.25rem;
}

.team-card__role {
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 500;
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.team-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-size: 0.85rem;
}

.team-social a:hover {
  background: var(--teal);
  color: var(--white);
}

/* CTA wave */
.cta-banner {
  background: linear-gradient(120deg, var(--teal), var(--teal-dark));
  color: var(--white);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.cta-banner::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -40%;
  width: 60%;
  height: 200%;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.cta-banner__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.cta-banner h2 {
  color: var(--white);
}

/* Blog cards */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.blog-card img {
  height: 240px;
  width: 100%;
  object-fit: cover;
}

.blog-card__body {
  padding: 1.5rem;
}

.blog-date {
  color: var(--orange);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Calculator */
.calculator-section {
  background: var(--navy);
  color: var(--white);
}

.calculator-wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.calculator-form {
  display: flex;
  gap: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  overflow: hidden;
}

.calculator-steps {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.2);
  min-width: 56px;
}

.calculator-steps button {
  flex: 1;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  cursor: pointer;
  padding: 1rem 0.5rem;
  font-family: inherit;
}

.calculator-steps button.active {
  background: var(--teal);
  color: var(--white);
}

.calculator-panels {
  flex: 1;
  padding: 1.75rem;
}

.calculator-panel {
  display: none;
}

.calculator-panel.active {
  display: block;
}

.calculator-section .section-title {
  color: var(--white);
}

.calculator-section img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Partners */
.partners-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  opacity: 0.55;
  filter: grayscale(100%);
}

.partner-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 0.05em;
}

/* Testimonial slider */
.testimonial-block {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-block img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  border: 4px solid var(--teal);
}

.testimonial-quote {
  background: var(--beige);
  padding: 2rem;
  border-radius: var(--radius);
  position: relative;
}

.testimonial-quote::before {
  content: "\201C";
  font-size: 4rem;
  color: var(--teal);
  line-height: 0;
  position: absolute;
  top: 1.5rem;
  left: 1rem;
  opacity: 0.3;
}

.stars {
  color: var(--orange);
  letter-spacing: 2px;
  margin-top: 1rem;
}

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

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--heading);
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
}

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

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: var(--orange);
}

.field-error {
  color: var(--orange);
  font-size: 0.8rem;
  margin-top: 0.35rem;
  display: none;
}

.form-group.has-error .field-error {
  display: block;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.5rem 0.75rem;
  align-items: start;
  margin-bottom: 1.25rem;
}

.checkbox-group input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  margin: 0.125rem 0 0;
  accent-color: var(--teal);
  cursor: pointer;
}

.checkbox-group label {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-weight: 400;
  font-size: 0.9rem;
  line-height: 1.55;
  cursor: pointer;
}

.checkbox-group.has-error label {
  color: var(--orange);
}

.checkbox-group .field-error {
  grid-column: 1 / -1;
  color: var(--orange);
  font-size: 0.8rem;
  margin: 0;
  display: block;
}

.form-success {
  display: none;
  background: rgba(0, 123, 138, 0.12);
  border: 1px solid var(--teal);
  color: var(--teal-dark);
  padding: 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  margin-top: 1rem;
}

.form-success.visible {
  display: block;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.pricing-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pricing-card.featured {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  transform: scale(1.03);
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--teal);
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  text-align: left;
}

.pricing-card li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
}

.pricing-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--teal);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.project-card img {
  height: 260px;
  width: 100%;
  object-fit: cover;
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 32, 46, 0.9), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: var(--white);
}

.project-card__overlay h3 {
  color: var(--white);
  margin-bottom: 0.25rem;
}

/* Legal long content */
.legal-content {
  max-width: 860px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
}

.legal-content h3 {
  font-size: 1.1rem;
  margin-top: 1.75rem;
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  padding-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-grid h4 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer-about img {
  height: 42px;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer-about p {
  font-size: 0.9rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--orange);
}

.footer-social {
  display: flex;
  gap: 0.65rem;
  margin-top: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.85rem;
}

.footer-social a:hover {
  background: var(--teal);
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.85rem;
}

.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.icon-inline {
  color: var(--teal);
  margin-right: 0.35rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .cards-3,
  .trust-grid,
  .team-grid,
  .pricing-grid,
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calculator-wrap {
    grid-template-columns: 1fr;
  }
}

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

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .main-nav.open {
    max-height: 480px;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 1rem 4%;
    align-items: flex-start;
  }

  .split-row,
  .contact-layout,
  .form-row-2,
  .blog-grid,
  .cta-banner__inner,
  .testimonial-block {
    grid-template-columns: 1fr;
  }

  .cards-3,
  .trust-grid,
  .team-grid,
  .pricing-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card.featured {
    transform: none;
  }

  .hero {
    min-height: 420px;
  }
}