/* styles/components.css */

/* Global Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--white);
  color: var(--text-grey);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  color: var(--deep-navy);
  font-weight: 700;
}

h1 {
  font-size: var(--font-h1-desktop);
  line-height: 1.2;
}

h2 {
  font-size: var(--font-h2-desktop);
  line-height: 1.3;
  font-weight: 600;
}

p {
  color: var(--text-grey);
}

/* Responsive Headings */
@media (max-width: 768px) {
  h1 {
    font-size: var(--font-h1-mobile);
  }
  h2 {
    font-size: var(--font-h2-mobile);
  }
}

/* Layout Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.section {
  padding: var(--section-padding-vertical-desktop) 0;
}

.section-alt {
  background-color: var(--off-white);
  padding: var(--section-padding-vertical-desktop) 0;
}

@media (max-width: 768px) {
  .section, .section-alt {
    padding: var(--section-padding-vertical-mobile) 0;
  }
}

/* Sticky Navbar Component */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--white);
  border-bottom: 1px solid var(--border-grey);
  transition: box-shadow 0.3s ease;
  height: 80px;
  display: flex;
  align-items: center;
}

.navbar.scrolled {
  box-shadow: var(--shadow-navbar);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-logo-img {
  height: 46px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  display: block;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.navbar-link {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-grey);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 15px;
}

.navbar-link:hover, .navbar-link.active {
  color: var(--primary-blue);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-dropdown-item:hover {
  background-color: var(--sky-blue);
  color: var(--primary-blue) !important;
}

/* Responsive Mobile Navigation Trigger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--deep-navy);
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 992px) {
  .navbar-menu {
    display: none; /* In a real app we'd trigger a mobile overlay drawer */
  }
  .menu-toggle {
    display: block;
  }
}

/* Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  text-align: center;
  min-height: 48px; /* Thumb friendly */
  white-space: nowrap;
}

/* Primary Button style */
.btn-primary {
  background-color: var(--primary-blue);
  color: var(--white);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background-color: var(--primary-blue-hover);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button Style */
.btn-secondary {
  background-color: var(--white);
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.btn-secondary:hover {
  background-color: var(--sky-blue);
}

.btn-secondary:active {
  background-color: rgba(22, 87, 255, 0.1);
}

/* Small Button (for inline actions / pills) */
.btn-sm {
  padding: 8px 18px;
  font-size: 14px;
  min-height: 38px;
  border-radius: var(--radius-badge);
}

/* Card Component */
.card {
  background-color: var(--white);
  border: 1px solid var(--border-grey);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card-normal);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

/* Category Icon Tiles */
.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.category-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-icon-tile);
  background-color: var(--sky-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-icon-wrapper svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary-blue);
  stroke-width: 2px;
  fill: none;
  transition: transform 0.2s ease;
}

.category-tile:hover .category-icon-wrapper {
  background-color: var(--primary-blue);
}

.category-tile:hover .category-icon-wrapper svg {
  stroke: var(--white);
  transform: scale(1.1);
}

.category-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--deep-navy);
  text-align: center;
}

/* Badge Components */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-badge);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
}

.badge-verified {
  background-color: rgba(34, 197, 94, 0.1);
  color: var(--success-green);
}

.badge-top-rated {
  background-color: var(--sky-blue);
  color: var(--primary-blue);
}

.badge-guarantee {
  background-color: rgba(245, 166, 35, 0.1);
  color: var(--warning-amber);
}

/* Form Input Component */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--deep-navy);
}

.form-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background-color: var(--white);
  border: 1px solid var(--border-grey);
  border-radius: var(--radius-input);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--deep-navy);
  outline: none;
  transition: all 0.2s ease;
}

.form-input::placeholder {
  color: var(--text-grey);
  opacity: 0.6;
}

.form-input:focus {
  border-color: var(--primary-blue);
  box-shadow: var(--shadow-focus-glow);
}

/* OTP Code Input Component */
.otp-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 16px 0;
}

.otp-box {
  width: 48px;
  height: 56px;
  border: 2px solid var(--border-grey);
  border-radius: var(--radius-input);
  background-color: var(--white);
  text-align: center;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  color: var(--deep-navy);
  outline: none;
  transition: all 0.2s ease;
}

.otp-box:focus, .otp-box.filled {
  border-color: var(--primary-blue);
  box-shadow: var(--shadow-focus-glow);
}

/* Footer Component */
.footer {
  background-color: var(--deep-navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 40px 0;
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

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

.footer-brand {
  font-family: var(--font-headings);
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-brand span {
  color: var(--mid-blue);
}

.footer-desc {
  max-width: 320px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.footer-heading {
  font-family: var(--font-headings);
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--mid-blue);
}

.footer-divider {
  border: 0;
  height: 1px;
  background-color: rgba(76, 141, 255, 0.2); /* mid blue accent divider */
  margin-bottom: 32px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}

/* Gradients */
.bg-gradient-hero {
  background: linear-gradient(135deg, #0B2545 0%, #1657FF 100%);
}

.bg-gradient-subtle {
  background: linear-gradient(180deg, var(--sky-blue) 0%, var(--white) 100%);
}

/* Breadcrumbs Component */
.breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-family: var(--font-body);
  font-weight: 500;
  margin: 20px 0 28px 0;
  padding: 8px 16px;
  background-color: var(--off-white);
  border: 1px solid var(--border-grey);
  border-radius: var(--radius-badge);
  list-style: none;
  box-shadow: 0 2px 8px rgba(11, 37, 69, 0.04);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-item {
  color: var(--text-grey);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 6px;
  padding: 3px 8px;
}

.breadcrumb-item:hover {
  color: var(--primary-blue);
  background-color: var(--sky-blue);
}

.breadcrumb-item.active {
  color: var(--deep-navy);
  font-weight: 600;
  background-color: transparent;
  cursor: default;
}

.breadcrumb-separator {
  color: var(--text-grey);
  opacity: 0.5;
  display: inline-flex;
  align-items: center;
}

.breadcrumb-separator svg,
.breadcrumb-separator i {
  width: 14px;
  height: 14px;
}

