/* ==========================================================================
   Motilal Oswal Web Application - Pixel-Perfect UI & Interactivity Styles
   ========================================================================== */

/* 1. Global Typography & Clean Base */
:root {
  --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-secondary: 'Playfair Display', 'Butler', 'Georgia', serif;
  --color-primary: #2b2e8c;
  --color-primary-dark: #1a1c5d;
  --color-navy: #1e2268;
  --color-text-main: #182a4e;
  --color-text-muted: #55627a;
  --bg-gradient-hero: linear-gradient(180deg, #edf4ff 0%, #f6f9ff 400px, #ffffff 600px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: #ffffff var(--bg-gradient-hero) no-repeat top center;
  background-size: 100% 700px;
  color: var(--color-text-main);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.5;
  visibility: visible !important;
  opacity: 1 !important;
  overflow-x: hidden;
}

/* Hide Accessibility Skip-to-main off-screen until focused */
.skip-to-main, a.skip-to-main, .skip-link {
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.skip-to-main:focus, a.skip-to-main:focus, .skip-link:focus {
  position: fixed !important;
  top: 10px !important;
  left: 10px !important;
  width: auto !important;
  height: auto !important;
  padding: 10px 20px !important;
  background: #2b2e8c !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  border-radius: 6px !important;
  z-index: 999999 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  clip: auto !important;
}

/* 2. Top Header & Navigation Bar */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  transition: box-shadow 0.25s ease;
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
}

.header-wrapper.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.header .header, footer .footer {
  visibility: visible !important;
}

/* 3. Hero Section Typography */
.home-heading-text h1,
main h1,
.hero-bg h1,
#thinkequity-thinkmotilal-oswal {
  font-family: var(--font-secondary, 'Playfair Display', serif) !important;
  font-size: 52px !important;
  font-weight: 500 !important;
  line-height: 1.36 !important;
  color: var(--color-navy) !important;
  margin-top: 26px !important;
  margin-bottom: 34px !important;
  letter-spacing: -0.3px !important;
}

.home-heading-text h1 strong,
#thinkequity-thinkmotilal-oswal strong {
  font-weight: 500 !important;
  color: var(--color-navy) !important;
}

/* 4. Hero 5 Value Proposition Badges */
.block.icon-card {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 20px !important;
  padding: 10px 0 28px !important;
  max-width: 1200px !important;
}

.icon-card-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 1 auto !important;
}

.icon-wrapper {
  width: 38px !important;
  height: 38px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.icon-wrapper img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.text-content {
  display: flex !important;
  flex-direction: column !important;
  text-align: left !important;
}

.icon-card-title {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--color-navy) !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.icon-card-description {
  font-size: 13px !important;
  color: var(--color-text-muted) !important;
  margin: 2px 0 0 0 !important;
  line-height: 1.3 !important;
  font-weight: 400 !important;
}

/* 5. Hero Demat Lead Form */
.landing-demat-form-wrapper {
  margin-top: 10px;
  margin-bottom: 35px;
  max-width: 760px;
}

.landing-demat-form .home-page-form {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(43, 46, 140, 0.08) !important;
  padding: 8px 12px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  width: auto !important;
}

/* 6. Section Titles */
h2, main h2, .section h2 {
  font-family: var(--font-secondary) !important;
  font-size: 34px !important;
  font-weight: 600 !important;
  color: var(--color-navy) !important;
  text-align: center !important;
  margin-top: 40px !important;
  margin-bottom: 24px !important;
  letter-spacing: -0.3px !important;
}

/* 7. Centered Auto-Advancing Highlights Carousel */
.highlights-section {
  padding: 30px 16px 50px;
  background: #ffffff;
}

.highlights-carousel-wrap {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.highlights-slides-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
}

.highlights-slide {
  min-width: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  cursor: default;
}

.highlights-img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  cursor: default;
  user-select: none;
}

.highlights-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.hl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.hl-dot.active {
  width: 26px;
  border-radius: 4px;
  background: #2b2e8c;
}

/* Hide all unstyled white semicircle/oval buttons and pause button */
.carousel-navigation-buttons,
.carousel-navigation-buttons button,
.carousel-slide-indicators,
button[aria-label="Pause Carousel"],
.carousel-wrapper .sr-only {
  display: none !important;
}

/* 8. Investment Opportunities & Section Containers */
.link-cards-container {
  padding: 40px 16px !important;
}

/* 9. CTA Buttons in Sections */
.button-arrow .button-container a,
.button-arrow .button-container button,
.button-arrow a.button {
  background: #2b2e8c !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  padding: 12px 28px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.button-arrow .button-container a:hover,
.button-arrow .button-container button:hover {
  background: #1a1c5d !important;
  transform: translateY(-1px) !important;
}

/* 10. Modals */
.mo-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 31, 80, 0.6);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mo-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mo-modal-card {
  background: #ffffff;
  border-radius: 12px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  padding: 30px;
  position: relative;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s ease;
}

.mo-modal-backdrop.open .mo-modal-card {
  transform: translateY(0) scale(1);
}

.mo-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #f1f5f9;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.mo-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.mo-modal-title {
  font-size: 20px;
  color: #2b2e8c;
  font-weight: 700;
  margin-bottom: 6px;
}

.mo-modal-subtitle {
  color: #64748b;
  font-size: 13px;
  margin-bottom: 20px;
}

.otp-digit-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 18px 0;
}

.otp-digit-input {
  width: 44px;
  height: 48px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
}

.otp-digit-input:focus {
  border-color: #2b2e8c;
}

/* 11. Floating Demat Bar: removed from active UI */
.floating-demat-bar,
.floating-demat-close {
  display: none !important;
}

/* 12. Toast Container */
.mo-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.mo-toast {
  background: #ffffff;
  color: #1e293b;
  border-left: 4px solid #2b2e8c;
  padding: 12px 18px;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
  animation: slideInToast 0.3s ease forwards;
}

.mo-toast.success { border-left-color: #10b981; }
.mo-toast.error { border-left-color: #ef4444; }

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 13. Responsive Rules */
@media (max-width: 768px) {
  .home-heading-text h1, main h1, .hero-bg h1 {
    font-size: 32px !important;
  }
  
  .block.icon-card {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .landing-demat-form .home-page-form {
    flex-direction: column !important;
    width: 100% !important;
    padding: 16px !important;
  }

  .landing-demat-form .home-page-form .name-wrapper,
  .landing-demat-form .home-page-form .mobile-wrapper {
    width: 100% !important;
  }

  .landing-demat-form .home-page-form .submit-btn {
    width: 100% !important;
  }
}

/* 14. SEO Service Descriptions
   Crawlable text section for Equity, Mutual Funds/SIP, IPO.
   Sits directly below the link-cards block; matches site design tokens. */
.seo-service-descriptions {
  background: #f0f4ff;
  padding: 32px 16px 40px;
}

.seo-service-descriptions__grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.seo-service-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

.seo-service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(43, 46, 140, 0.1);
  border-color: var(--color-navy);
}

.seo-service-card h3 {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 8px;
  letter-spacing: -0.1px;
}

.seo-service-card p {
  font-family: var(--font-primary);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0;
}

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

@media (min-width: 769px) and (max-width: 1024px) {
  .seo-service-descriptions__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
