/* AMBA MOTOR DRIVING SCHOOL - Shared Styles */

:root {
  --primary: #E31E24;
  --primary-dark: #b8181d;
  --black: #000000;
  --accent: #E31E24;
  --accent-hover: #c4191f;
  --success: #16a34a;
  --text: #000000;
  --text-muted: #444444;
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --border: #e5e5e5;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --font: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: 'Montserrat', 'Roboto', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--black);
}

.hero h1,
.page-hero h1,
.location-card-header h3,
.cta-banner h2 {
  color: inherit;
}

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

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

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */
.site-header {
  background: var(--bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  font-weight: 700;
  color: var(--black);
}

.logo:hover {
  color: var(--black);
}

.logo-img {
  height: 48px;
  width: auto;
  max-width: min(220px, 55vw);
  object-fit: contain;
  flex-shrink: 0;
}

.logo-tagline {
  display: block;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.logo:hover .logo-tagline {
  color: var(--text-muted);
}

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

.nav-toggle svg {
  width: 28px;
  height: 28px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text);
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--bg-alt);
  color: var(--primary);
}

.main-nav a.active {
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-align: center;
}

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

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

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

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

.btn-secondary:hover {
  background: #222222;
  color: white;
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

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

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--black) 0%, #1a1a1a 45%, var(--primary) 100%);
  color: white;
  padding: 4rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

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

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.95;
  margin-bottom: 2rem;
}

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

/* Page Hero (inner pages) */
.page-hero {
  background: linear-gradient(135deg, var(--black), var(--primary));
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.page-hero p {
  opacity: 0.9;
  font-size: 1.1rem;
}

/* Sections */
section {
  padding: 4rem 0;
}

section:nth-child(even):not(.cta-banner) {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--black);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

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

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

.card-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--black);
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.stat-item {
  padding: 1.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* Features List */
.features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.feature-item h4 {
  margin-bottom: 0.25rem;
  color: var(--primary);
}

.feature-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Course Cards (detailed) */
.course-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.course-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 1.5rem;
}

.course-header h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.course-duration {
  font-size: 0.875rem;
  opacity: 0.9;
}

.course-body {
  padding: 1.5rem;
}

.course-body ul {
  list-style: none;
  margin: 1rem 0;
}

.course-body li {
  padding: 0.35rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.course-body li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

.course-audience {
  background: var(--bg-alt);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.course-audience strong {
  color: var(--text);
}

/* Trainer Profile */
.trainer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.trainer-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.trainer-avatar {
  height: 180px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
}

.trainer-info {
  padding: 1.5rem;
}

.trainer-info h3 {
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.trainer-role {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.trainer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.trainer-tag {
  background: var(--bg-alt);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.trainer-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Location Cards */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.location-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.location-gallery {
  position: relative;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.gallery-carousel {
  position: relative;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  transition: transform 0.35s ease;
}

.gallery-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.gallery-slide iframe {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(26, 58, 92, 0.85);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  transition: background 0.2s;
  z-index: 2;
}

.gallery-nav:hover {
  background: var(--primary);
}

.gallery-prev {
  left: 0.5rem;
}

.gallery-next {
  right: 0.5rem;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem;
}

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

.gallery-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

.gallery-caption {
  padding: 0.5rem 1rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.gallery-caption a {
  font-weight: 600;
}

.location-card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 1.25rem 1.5rem;
}

.location-card-header h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.location-card-header .branch-label {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.location-card-header p {
  font-size: 0.9rem;
  opacity: 0.9;
}

.location-card-body {
  padding: 1.5rem;
  flex: 1;
}

.location-card-body .contact-item:last-child {
  margin-bottom: 0;
}

.location-card-actions {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.location-card-actions .btn {
  flex: 1;
  min-width: 120px;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
}

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

.map-block h3 {
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.hero-locations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-location-pill {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  backdrop-filter: blur(4px);
}

.hero-location-pill strong {
  display: block;
  font-size: 0.95rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-info-card {
  background: var(--bg);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.contact-info-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  margin-bottom: 0.15rem;
}

.contact-item span,
.contact-item a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Form */
.contact-form {
  background: var(--bg);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  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: var(--radius);
  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(--primary);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.15);
}

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

.form-success {
  display: none;
  background: #dcfce7;
  color: #166534;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  text-align: center;
}

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

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

.map-placeholder span {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* CTA Banner */
section.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.cta-banner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}

.cta-banner p {
  opacity: 0.95;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Two Column Layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.two-col h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.75rem;
}

.two-col p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Timeline / Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

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

.value-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.value-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.value-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.85);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-grid ul {
  list-style: none;
}

.footer-grid li {
  margin-bottom: 0.5rem;
}

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

.footer-grid a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    box-shadow: var(--shadow-lg);
    display: none;
    padding: 1rem;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    padding: 0.75rem 1rem;
  }

  .two-col,
  .contact-grid,
  .locations-grid,
  .maps-grid {
    grid-template-columns: 1fr;
  }

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

  section {
    padding: 3rem 0;
  }

  .gallery-slide iframe {
    height: 200px;
  }

  .logo-img {
    height: 40px;
    max-width: min(180px, 50vw);
  }
}
