/* ==========================================================================
   TutorBridge - Modern Education Marketplace
   Design System & Core Stylesheet
   Palette: Deep Teal (#218DAE), Bright Cyan (#2BBBD7),
   Soft Warm Yellow (#FCE59A), Golden Yellow (#FFD758), White (#FFFFFF),
   Dark Text (#17323A), Muted Text (#607780)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Palette */
  --deep-teal: #218DAE;
  --deep-teal-dark: #1A728D;
  --bright-cyan: #2BBBD7;
  --bright-cyan-light: #EBF8FA;
  --soft-yellow: #FCE59A;
  --soft-yellow-light: #FFFBF0;
  --golden-yellow: #FFD758;
  --golden-yellow-hover: #E6C147;
  
  /* Neutrals */
  --bg-white: #FFFFFF;
  --bg-page: #F8FBFB;
  --text-main: #17323A;
  --text-secondary: #607780;
  --text-muted: #879DA5;
  --border-light: #E2E8F0;
  --border-card: #E4ECEF;
  --border-focus: #218DAE;

  /* Functional Status */
  --success: #0E9F6E;
  --success-bg: #DEF7EC;
  --warning: #C27803;
  --warning-bg: #FEF08A;
  --danger: #E02424;
  --danger-bg: #FDE8E8;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Restrained Shadows - Minimal by default, soft on hover */
  --shadow-xs: 0 1px 2px rgba(23, 50, 58, 0.04);
  --shadow-sm: 0 2px 4px rgba(23, 50, 58, 0.05);
  --shadow-md: 0 4px 12px rgba(23, 50, 58, 0.08);
  --shadow-lg: 0 8px 24px rgba(23, 50, 58, 0.1);

  /* Restrained Border Radii */
  --radius-sm: 6px;
  --radius-btn: 8px;
  --radius-input: 8px;
  --radius-card: 12px;
  --radius-search: 12px;
  --radius-full: 9999px;

  /* Layout & Spacing */
  --container-max-width: 1220px;
  --header-height: 76px;
  --transition: all 0.2s ease-in-out;

  /* Theme Aliases for backward compatibility */
  --primary-indigo: var(--deep-teal);
  --deep-indigo: var(--text-main);
  --light-indigo: var(--bright-cyan-light);
  --primary-purple: var(--bright-cyan);
  --purple-badge-bg: var(--soft-yellow-light);
  --purple-badge-text: var(--deep-teal);
}

/* ==========================================================================
   CSS Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-white);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Typography Hierarchy (Human-Scale & Readable)
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.65rem, 2.5vw, 2.25rem);
}

h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

.text-lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.text-teal { color: var(--deep-teal); }
.text-cyan { color: var(--bright-cyan); }
.text-dark { color: var(--text-main); }
.text-muted { color: var(--text-muted); }
.text-bold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

/* ==========================================================================
   Layout Containers & Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 4rem 0;
  position: relative;
}

.section-soft {
  background-color: var(--bg-page);
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
}

.section-yellow-soft {
  background-color: var(--soft-yellow-light);
  border-top: 1px solid rgba(252, 229, 154, 0.4);
  border-bottom: 1px solid rgba(252, 229, 154, 0.4);
}

.section-teal-cta {
  background-color: var(--deep-teal);
  color: #FFFFFF;
}

.section-white {
  background-color: var(--bg-white);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.75rem auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bright-cyan-light);
  color: var(--deep-teal);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
  border: 1px solid rgba(33, 141, 174, 0.18);
}

.section-tag-yellow {
  background-color: var(--soft-yellow);
  color: var(--text-main);
  border: 1px solid rgba(255, 215, 88, 0.5);
}

.section-title {
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

/* ==========================================================================
   Header & Clean Navigation (72-80px)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-card);
  height: var(--header-height);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.brand-logo {
  width: 180px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: transparent;
  background: url("../Udaan_logo.webp") center / contain no-repeat;
  overflow: hidden;
  text-decoration: none;
  text-indent: -9999px;
}

.brand-logo > * {
  visibility: hidden;
}

.brand-logo.upLogo {
  width: 180px;
  height: 64px;
}

.review-stars {
  display: inline-flex;
  gap: 2px;
  color: #CBD5E1;
  letter-spacing: 1px;
}

.review-stars .filled,
.star-interactive.selected {
  color: #F59E0B;
}

.star-interactive {
  border: 0;
  background: transparent;
  color: #CBD5E1;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  padding: 0;
  transition: color .15s ease, transform .15s ease;
}

.star-interactive:hover,
.star-interactive:hover ~ .star-interactive {
  color: #FBBF24;
}

.star-interactive:hover {
  transform: scale(1.12);
}

.review-rating-number {
  color: var(--text-secondary);
  font-size: .78rem;
  vertical-align: middle;
}

@media (max-width: 640px) {
  .brand-logo,
  .brand-logo.upLogo {
    width: 148px;
    height: 54px;
  }
}

.brand-icon {
  width: 38px;
  height: 38px;
  background-color: var(--deep-teal);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  position: relative;
  flex-shrink: 0;
  transition: var(--transition);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  stroke: #FFFFFF;
  stroke-width: 2.2;
}

.brand-dot {
  color: var(--golden-yellow);
}

.avatar-fallback {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background-color: var(--deep-teal);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: inherit;
  user-select: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-main);
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--deep-teal);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--deep-teal);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  background: var(--bg-white);
  transition: var(--transition);
  position: relative;
}

.nav-icon-link:hover {
  color: var(--deep-teal);
  border-color: var(--deep-teal);
}

.nav-icon-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--deep-teal);
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-nav-dropdown {
  position: relative;
}

.user-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-light);
  background: var(--bg-white);
  transition: var(--transition);
}

.user-nav-btn:hover {
  border-color: var(--deep-teal);
}

.user-avatar-small {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name-small {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  width: 210px;
  background: var(--bg-white);
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  padding: 0.4rem;
  display: none;
  flex-direction: column;
  z-index: 1010;
}

.dropdown-menu.show {
  display: flex;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: var(--bright-cyan-light);
  color: var(--deep-teal);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-light);
  margin: 0.3rem 0;
}

/* Mobile Hamburger */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bright-cyan-light);
  color: var(--deep-teal);
  gap: 4px;
  border: 1px solid rgba(33, 141, 174, 0.15);
}

.hamburger-line {
  width: 18px;
  height: 2px;
  background-color: var(--deep-teal);
  transition: var(--transition);
}

.mobile-nav-toggle.open .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-nav-toggle.open .hamburger-line:nth-child(2) {
  opacity: 0;
}
.mobile-nav-toggle.open .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background-color: #FFFFFF;
  border-top: 1px solid var(--border-light);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  z-index: 999;
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-link {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-card);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--deep-teal);
}

.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Footer (Deep Teal Background)
   ========================================================================== */
.site-footer {
  background-color: var(--deep-teal);
  color: #FFFFFF;
  padding: 3.5rem 0 1.75rem 0;
  margin-top: auto;
  border-top: 3px solid var(--bright-cyan);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand .brand-logo {
  color: #FFFFFF;
}

.footer-brand .brand-icon {
  background-color: #FFFFFF;
  color: var(--deep-teal);
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.social-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-btn:hover {
  background: var(--golden-yellow);
  color: var(--text-main);
  border-color: var(--golden-yellow);
}

.footer-col-title {
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-link:hover {
  color: #FFFFFF;
  transform: translateX(2px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-links {
  display: flex;
  gap: 1.25rem;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-links a:hover {
  color: #FFFFFF;
}

/* ==========================================================================
   Page Banner & Breadcrumbs
   ========================================================================== */
.page-header {
  background-color: var(--bg-page);
  padding: 2.25rem 0 1.5rem 0;
  border-bottom: 1px solid var(--border-card);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.breadcrumb-item a:hover {
  color: var(--deep-teal);
}

.breadcrumb-separator {
  color: var(--text-muted);
}

.breadcrumb-current {
  color: var(--text-main);
  font-weight: 600;
}
