:root {
  --maisha-orange: #e7853e;
  --maisha-burnt: #c65c33;
  --maisha-dark: #1d1b24;
  --maisha-ink: #2f2a3c;
  --maisha-cream: #fff5ea;
  --maisha-muted: #867c92;
  --maisha-border: rgba(255, 255, 255, 0.25);
  --radius-lg: 32px;
  --radius: 16px;
  font-size: 16px;
}

@media (max-width: 640px) {
  :root {
    font-size: 15px;
  }
}

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

body {
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  color: var(--maisha-cream);
  background: radial-gradient(circle at top right, #f0b173 0%, #c85337 50%, #2a1f31 100%);
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  backdrop-filter: blur(32px);
  background: rgba(14, 9, 16, 0.65);
  padding: 1rem clamp(1.5rem, 4vw, 4rem) 1.5rem;
}

.top-nav {
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.75rem 0;
  margin: 0 -clamp(1.5rem, 4vw, 4rem) 0;
  padding-left: clamp(1.5rem, 4vw, 4rem);
  padding-right: clamp(1.5rem, 4vw, 4rem);
}

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

.top-nav-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.top-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--maisha-cream);
  font-size: 0.875rem;
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.top-nav-link:hover {
  opacity: 1;
  color: var(--maisha-orange);
}

.top-nav-link svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.top-nav-link:hover svg {
  opacity: 1;
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--maisha-cream);
  opacity: 0.7;
  border-radius: 50%;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.login-btn {
  display: inline-block;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: var(--maisha-cream);
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.login-btn:hover {
  border-color: var(--maisha-orange);
  background: rgba(231, 133, 62, 0.1);
  color: var(--maisha-orange);
}

@media (max-width: 768px) {
  .top-nav-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .top-nav-right {
    width: 100%;
    justify-content: space-between;
  }

  .top-nav-left {
    gap: 1rem;
  }

  .top-nav-link span {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .top-nav-link span {
    display: none;
  }

  .top-nav-link {
    padding: 0.5rem;
  }
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
  display: flex;
  gap: 0.95rem;
  align-items: center;
}

.logo img {
  width: 56px;
  height: 56px;
}

.wordmark span {
  display: block;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.wordmark small {
  color: var(--maisha-muted);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.68rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-weight: 500;
  color: var(--maisha-cream);
}

.nav-links a {
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.cta {
  background: linear-gradient(120deg, var(--maisha-orange), var(--maisha-burnt));
  border: none;
  border-radius: 999px;
  color: #fff;
  padding: 0.85rem 1.9rem;
  font-weight: 600;
  box-shadow: 0 15px 30px rgba(199, 100, 52, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(199, 100, 52, 0.45);
}

main {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 1rem;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: #fff;
  margin: 0 0 0.75rem;
  line-height: 1.1;
}

.hero p {
  color: #f7dfcc;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.75rem;
  color: var(--maisha-muted);
  margin-bottom: 0.75rem;
}

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

.hero .secondary {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.85rem 1.9rem;
  font-weight: 600;
  color: var(--maisha-cream);
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border 0.2s ease, background 0.2s ease;
}

.hero .secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.hero .cta,
.hero .secondary {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.hero-card-slider-wrapper {
  position: relative;
}

.hero-card-slider {
  position: relative;
  min-height: 300px;
}

.hero-card {
  display: none;
}

.hero-card.active {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.hero-card-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.hero-card-prev,
.hero-card-next {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.hero-card-prev:hover,
.hero-card-next:hover {
  background: rgba(231, 133, 62, 0.3);
  border-color: var(--maisha-orange);
  transform: scale(1.1);
}

.hero-card-indicators {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.hero-card-indicators .indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-card-indicators .indicator.active {
  background: var(--maisha-orange);
  width: 24px;
  border-radius: 4px;
}

.hero-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  min-height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: none;
  flex-direction: column;
  gap: 0.875rem;
}

.hero-card.active {
  display: flex;
}

.app-preview {
  flex: 1;
  border-radius: var(--radius);
  padding: 1.25rem;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)) #13101a;
  position: relative;
  overflow: hidden;
}

.app-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/maisha-pattern.svg') center/cover;
  opacity: 0.05;
}

.app-preview h3 {
  margin-top: 0;
  color: #fff0de;
  font-size: 1.3rem;
}

.app-preview ul {
  padding-left: 1.1rem;
  margin: 0;
  color: var(--maisha-cream);
  line-height: 1.6;
}

.hero-note {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  line-height: 1.5;
}

.pillars {
  padding: 0.75rem 0;
}

.pillars-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  margin: 0 0 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.875rem;
}

.pillar-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 180px;
}

.pillar-card h3 {
  margin-top: 0.75rem;
  color: #fff;
  font-size: 1.2rem;
}

.pillar-card p {
  color: var(--maisha-muted);
  line-height: 1.5;
}

.icon-pill {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.4rem;
}

.technologies {
  padding: 1rem 0;
}

.section-label {
  color: var(--maisha-muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.5rem;
}

.technologies h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  margin: 0 0 1.5rem;
  line-height: 1.2;
  font-weight: 600;
}

.tech-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.tech-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(231, 133, 62, 0.25);
}

.tech-number {
  display: block;
  color: var(--maisha-orange);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.tech-card h3 {
  color: var(--maisha-dark);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.tech-card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.tech-cta-bar {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  flex-wrap: wrap;
}

.tech-indicators {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(231, 133, 62, 0.3);
  transition: background 0.3s ease;
}

.indicator.active {
  background: var(--maisha-orange);
}

.tech-cta-text {
  flex: 1;
  color: var(--maisha-dark);
  font-weight: 500;
  margin: 0;
  font-size: 1rem;
}

.tech-cta-btn {
  background: linear-gradient(120deg, var(--maisha-orange), var(--maisha-burnt));
  border: none;
  border-radius: 999px;
  color: #fff;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.tech-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(231, 133, 62, 0.4);
}

.testimonials {
  padding: 0.5rem 0;
}

/* Projects Showcase Section */
.projects-showcase {
  padding: 1rem 0;
}

.project-screens-carousel::-webkit-scrollbar {
  display: none;
}

.project-screens-carousel {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.mobile-screen {
  transition: transform 0.3s ease;
  width: 100%;
}

.mobile-screen:hover {
  transform: translateY(-4px);
}

.mobile-screen img {
  max-width: 100%;
  height: auto;
}

.project-screen-nav:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
}

@media (max-width: 968px) {
  .projects-showcase .project-item-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  .mobile-screen {
    min-width: 180px !important;
    max-width: 180px !important;
  }
  
  .mobile-screen > div > div:last-child {
    height: 320px !important;
  }
  
  .project-screen-nav {
    display: none !important;
  }
}

.testimonials h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  margin: 0 0 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}

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

  .tech-cards {
    grid-template-columns: 1fr;
  }

  .tech-cta-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }

  .tech-cta-text {
    width: 100%;
  }

  .tech-cta-btn {
    width: 100%;
    justify-content: center;
  }
}

.experience {
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, #e4833b 0%, #c24a34 60%, #361b28 100%);
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: center;
}

.experience aside {
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.experience h2 {
  margin-top: 0;
  font-size: 2rem;
}

.experience ul {
  padding-left: 1.1rem;
  color: var(--maisha-cream);
  line-height: 1.6;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1rem 0;
}

.metric {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric strong {
  font-size: 2rem;
  display: block;
  color: #fff;
}

.metric span {
  color: var(--maisha-muted);
  font-size: 0.95rem;
}

.contact {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(1.8rem, 4vw, 3rem);
  display: block;
  gap: 0;
  background: transparent;
}

/* Override for contact page - ensure container is grid */
section.contact {
  display: block !important;
}

section.contact .contact-container {
  display: grid !important;
  grid-template-columns: 1fr 1px 1fr !important;
  grid-auto-rows: auto !important;
}

.contact form {
  display: grid;
  gap: 1.1rem;
}

.contact label {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--maisha-muted);
  letter-spacing: 0.08em;
}

.contact input,
.contact textarea {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.9rem 1rem;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
}

.contact textarea {
  min-height: 120px;
  resize: vertical;
}

.contact button {
  justify-self: flex-start;
}

footer {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--maisha-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
}

@media (max-width: 900px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    flex-wrap: wrap;
  }
}

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--maisha-orange), var(--maisha-burnt));
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(231, 133, 62, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(231, 133, 62, 0.5);
}

.scroll-to-top svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
  }

  .scroll-to-top svg {
    width: 20px;
    height: 20px;
  }
}

footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-newsletter input[type="email"]::placeholder {
  color: rgba(255, 245, 234, 0.5);
}

.footer-newsletter input[type="email"]:focus {
  outline: none;
  border-color: var(--maisha-orange);
  background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
  footer > div {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  .footer-newsletter {
    margin-top: 1rem;
  }
}

/* Testimonials Section */
.testimonials-carousel::-webkit-scrollbar {
  display: none;
}

.testimonial-nav:hover {
  background: var(--maisha-orange) !important;
  transform: translateY(-50%) scale(1.1) !important;
}

.testimonial-nav:hover svg {
  stroke: #fff !important;
}

@media (max-width: 768px) {
  .testimonial-card {
    min-width: 280px !important;
    padding: 2rem !important;
  }

  .testimonial-nav {
    width: 40px !important;
    height: 40px !important;
  }

  .testimonial-nav svg {
    width: 18px !important;
    height: 18px !important;
  }
}

/* Contact Page Two-Column Layout */
.contact-link {
  color: var(--maisha-orange);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: var(--maisha-burnt);
}

/* Contact Form Two-Column Layout */
@media (max-width: 768px) {
  /* Stack form fields on mobile */
  .contact form > div > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Ensure contact form stays side by side on larger screens */
.contact-container {
  display: grid !important;
  grid-template-columns: 1fr 1px 1fr !important;
  grid-auto-flow: row !important;
  width: 100% !important;
  max-width: 1400px !important;
}

.contact-info-column {
  flex: 0 0 auto !important;
}

.contact-form-column {
  flex: 1 1 auto !important;
}

.contact-info-column {
  grid-column: 1 / 2 !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.contact-divider {
  grid-column: 2 / 3 !important;
  display: block !important;
  visibility: visible !important;
}

.contact-form-column {
  grid-column: 3 / 4 !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-width: 0;
  overflow: visible;
  width: 100% !important;
  flex: 1 !important;
  max-width: 100% !important;
}

@media (max-width: 968px) {
  /* Convert grid layout to stacked on mobile */
  .contact > div > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  /* Remove side padding on mobile */
  .contact > div > div[style*="padding-right"],
  .contact > div > div[style*="padding-left"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* Stack form fields on mobile */
  .contact form > div > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  
  /* Adjust section padding on mobile */
  section.contact {
    margin: 1.5rem 0 !important;
    padding: 1.5rem 0 !important;
  }
  
  .contact > div {
    padding: 0 1.5rem !important;
  }

  /* About page responsive */
  .about-content-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .about-main-section {
    padding: 0 1.5rem 2rem !important;
  }

  /* Why Choose Us responsive - stack columns on mobile */
  .why-choose-us-container {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .why-choose-us-images {
    order: 2; /* Show images after reasons on mobile */
  }

  .why-choose-us-reasons {
    order: 1; /* Show reasons first on mobile */
  }

}

