/* ==========================================================================
   Sahas Institute Landing — Modern single-page styles
   ========================================================================== */

:root {
  --color-primary: #006db0;
  --color-primary-dark: #005a94;
  --color-accent: #f97316;
  --color-accent-hover: #ea580c;
  --color-dark: #0f172a;
  --color-text: #334155;
  --color-text-muted: #64748b;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f5f9;
  --color-border: #e2e8f0;

  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-devanagari: "Noto Serif Devanagari", serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.14);

  --header-height: 72px;
  --container: 1140px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--color-primary-dark);
}

h1, h2, h3, h4 {
  color: var(--color-dark);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
}

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

address {
  font-style: normal;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--color-dark);
  color: #fff;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 1rem;
}

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

.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header--light h2,
.section-header--light .section-eyebrow {
  color: #fff;
}

.section-header--light .section-desc {
  color: rgba(255, 255, 255, 0.85);
}

.section-eyebrow {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
}

.section-desc {
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 1.75rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.625rem 1.125rem;
  font-size: 0.875rem;
}

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

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #fff;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.35);
}

.btn-accent:hover {
  color: #fff;
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.45);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-dark);
  text-decoration: none;
}

.brand:hover {
  color: var(--color-dark);
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 800;
  font-size: 1rem;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9375rem;
}

.site-nav a:hover {
  color: var(--color-primary);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("../assets/images/banner.jpg") center / cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 45, 80, 0.88) 0%,
    rgba(0, 109, 176, 0.75) 50%,
    rgba(15, 23, 42, 0.65) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding-block: 4rem;
  color: #fff;
}

.hero-eyebrow {
  font-family: var(--font-devanagari);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
  color: #fff;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.92);
  max-width: 560px;
}

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

/* Courses */
.courses {
  background: var(--color-surface-alt);
}

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

.course-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.course-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(0, 109, 176, 0.12), rgba(0, 109, 176, 0.04));
  border-radius: var(--radius-md);
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}

.course-icon svg {
  width: 26px;
  height: 26px;
}

.course-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.course-card p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* Carousel */
.carousel {
  position: relative;
  padding-inline: 3rem;
}

.carousel-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-block: 1rem;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 auto;
  scroll-snap-align: center;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition);
}

.carousel-slide img {
  width: 220px;
  height: auto;
  object-fit: cover;
}

.carousel-slide.is-active {
  transform: scale(1.03);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-dark);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition);
  z-index: 2;
}

.carousel-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
}

.carousel-btn--prev { left: 0; }
.carousel-btn--next { right: 0; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-border);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.carousel-dot.is-active {
  background: var(--color-primary);
  transform: scale(1.25);
}

/* About */
.about {
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.feature-row--reverse .feature-media {
  order: 2;
}

.feature-row--reverse .feature-content {
  order: 1;
}

.feature-media {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.feature-media img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.feature-content h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}

.feature-content p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
}

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

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

.footer-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
}

.location-item {
  margin-bottom: 1.5rem;
}

.location-item h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.location-item p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.35rem;
}

.location-item a {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.9375rem;
}

.location-item a:hover {
  color: #fdba74;
}

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

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

.footer-links a:hover {
  color: #fff;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.social-links a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background var(--transition), transform var(--transition);
}

.social-links a:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
  color: #fff;
}

.social-links svg {
  width: 20px;
  height: 20px;
}

.footer-app-link a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.footer-app-link a:hover {
  color: #fff;
}

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

.footer-bottom p {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 1024px) {
  .course-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  .feature-row,
  .feature-row--reverse {
    grid-template-columns: 1fr;
  }

  .feature-row--reverse .feature-media,
  .feature-row--reverse .feature-content {
    order: unset;
  }

  .feature-media img {
    height: 320px;
  }

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

  .footer-col:first-child {
    grid-column: 1 / -1;
  }
}

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

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav li {
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav li a {
    display: block;
    padding: 0.875rem 0.5rem;
  }

  .nav-cta {
    margin-top: 1rem;
    width: 100%;
  }

  .section {
    padding: 3.5rem 0;
  }

  .hero {
    min-height: auto;
    padding-bottom: 2rem;
  }

  .hero-bg {
    background-image: url("../assets/images/phonebgm.jpg");
  }

  .hero-content {
    padding-block: 3rem;
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .carousel {
    padding-inline: 0;
  }

  .carousel-btn {
    display: none;
  }

  .carousel-slide img {
    width: 200px;
  }

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

@media (max-width: 480px) {
  .brand-tagline {
    display: none;
  }

  .carousel-slide img {
    width: 180px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
