/* ========================================
   Jaysurf Home Fiber - Main Stylesheet
   Brand: Blue + Orange | Ruiru, Kenya
======================================== */

:root {
  --primary: #0057A8;          /* Strong blue from logo */
  --primary-dark: #003D75;
  --primary-light: #0070CC;
  --accent: #F5A623;           /* Orange/yellow from flyer */
  --accent-hover: #E09400;
  --accent-light: #FFF4E0;
  --text: #1A1A2E;
  --text-light: #4A5568;
  --text-muted: #718096;
  --bg: #FFFFFF;
  --bg-alt: #F5F8FC;
  --bg-dark: #003D75;
  --border: #E2E8F0;
  --success: #10B981;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --radius: 10px;
  --radius-lg: 16px;
  --transition: all 0.25s ease;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

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

ul, ol {
  list-style: none;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.lead {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 650px;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* ========== Layout ========== */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4.5rem 0;
}

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

.section-dark {
  background: var(--bg-dark);
  color: #fff;
}

.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-dark p {
  color: rgba(255,255,255,0.85);
}

/* ========== Header / Nav ========== */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

.logo span.brand-orange {
  color: var(--accent);
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  border: 3px solid var(--accent);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--accent-light);
}

.nav-cta {
  margin-left: 0.6rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--primary);
}

.mobile-toggle svg {
  width: 26px;
  height: 26px;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary {
  background: var(--accent);
  color: #1A1A2E;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #1A1A2E;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
}

.btn-blue {
  background: var(--primary);
  color: #fff;
}

.btn-blue:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

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

.btn-white:hover {
  background: var(--accent-light);
  color: var(--primary);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.8);
}

.btn-outline-white:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

.btn-lg {
  padding: 0.95rem 1.9rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ========== Hero ========== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 45%, #0066B3 100%);
  color: #fff;
  padding: 5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 60%;
  height: 140%;
  background: radial-gradient(circle, rgba(245,166,35,0.18) 0%, transparent 65%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero h1 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.hero .tagline {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.stat-item h3 {
  color: var(--accent);
  font-size: 1.6rem;
  margin-bottom: 0.15rem;
}

.stat-item p {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  margin: 0;
}

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

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ========== Plan Cards ========== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.plan-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.35rem;
  text-align: center;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.plan-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.plan-card.popular {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #1A1A2E;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.plan-speed {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.plan-speed span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.plan-price {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--accent-hover);
  margin: 1rem 0 0.25rem;
}

.plan-price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.35rem;
}

.plan-features {
  text-align: left;
  margin: 0 auto 1.5rem;
  flex-grow: 1;
}

.plan-features li {
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.plan-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

/* Color variants for plan cards matching flyer */
.plan-card.plan-orange { border-top: 4px solid #F5A623; }
.plan-card.plan-blue   { border-top: 4px solid #0057A8; }
.plan-card.plan-green  { border-top: 4px solid #10B981; }
.plan-card.plan-purple { border-top: 4px solid #7C3AED; }

/* ========== Tables ========== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
}

th, td {
  padding: 1rem 1.15rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.9rem;
}

td {
  color: var(--text-light);
  font-size: 0.95rem;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--accent-light);
}

/* ========== FAQ ========== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--bg);
}

.faq-item summary {
  padding: 1.15rem 1.35rem;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item summary:hover {
  background: var(--accent-light);
}

.faq-item .faq-content {
  padding: 0 1.35rem 1.25rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

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

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

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--bg);
  color: var(--text);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2);
}

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

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234A5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

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

/* ========== Contact Info Cards ========== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.contact-card .icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.contact-card h4 {
  margin-bottom: 0.4rem;
}

.contact-card p {
  margin: 0;
  font-size: 0.95rem;
}

/* ========== Coverage List ========== */
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.coverage-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}

.coverage-item:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.coverage-item::before {
  content: "📍";
  font-size: 1.1rem;
}

/* ========== Steps ========== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: #1A1A2E;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 auto 1.25rem;
}

.step h3 {
  margin-bottom: 0.5rem;
}

/* ========== Testimonials ========== */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.testimonial {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.testimonial-text {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.author-info h4 {
  margin: 0;
  font-size: 1rem;
}

.author-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== CTA Banner ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  color: #fff;
}

.cta-banner h2 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.cta-banner p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.75rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

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

/* ========== Footer ========== */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 4rem 0 2rem;
}

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

.footer-brand .logo {
  color: #fff;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  max-width: 280px;
}

.footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1.15rem;
  font-weight: 600;
}

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

.footer ul a {
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
}

.footer ul a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

/* ========== Utilities ========== */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 3.5rem 0 3rem;
  text-align: center;
}

.page-header h1 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.page-header p {
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ========== Map Placeholder ========== */
.map-placeholder {
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}

.map-placeholder .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    gap: 0.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 0.85rem 1rem;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
  }

  .nav-cta .btn {
    width: 100%;
  }

  .mobile-toggle {
    display: block;
  }

  .hero {
    padding: 4rem 0 3.5rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .section {
    padding: 3.5rem 0;
  }

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

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-buttons .btn {
    width: 100%;
  }
}