/* 
====================================================================
  MENDRA SERVICES LTD - Global Stylesheet
  Architecture: Reset, Variables, Base, Typography, Utilities,
  Components, Layouts, Pages, Animations, Media Queries
==================================================================== 
*/

/* 1. CSS Reset / Normalize */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 100%;
  scroll-behavior: smooth;
}
body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}
input, button, textarea, select {
  font: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}
ul, ol {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
}

/* 2. CSS Custom Properties */
:root {
  /* Palette: Finance/Trust & Luxury */
  --color-primary: #0F2044;    /* Navy - Trust/Authority */
  --color-secondary: #C9A84C;  /* Gold - Premium Quality */
  --color-accent: #1E3A5F;     /* Dark Blue */
  
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8FAFC;     /* Light Gray - Modernity */
  --color-text: #334155;       /* Slate 700 */
  --color-heading: #0F172A;    /* Slate 900 */
  --color-muted: #94A3B8;      /* Slate 400 */
  
  --color-success: #10B981;
  --color-error: #EF4444;

  /* Typography */
  --font-heading: 'Merriweather', serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;   /* 8px */
  --spacing-sm: 1rem;     /* 16px */
  --spacing-md: 1.5rem;   /* 24px */
  --spacing-lg: 2rem;     /* 32px */
  --spacing-xl: 3rem;     /* 48px */
  --spacing-xxl: 5rem;    /* 80px */

  /* Borders & Shadows */
  --border-radius-sm: 4px;
  --border-radius: 8px;
  --border-radius-lg: 16px;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 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);
  --shadow-gold: 0 4px 14px 0 rgba(201,168,76, 0.39);

  /* Transitions */
  --transition-speed: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3. Global / Base styles */
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

section {
  padding: var(--spacing-xxl) 0;
}
.section-light { background-color: var(--color-bg); }
.section-alt { background-color: var(--color-bg-alt); }
.section-dark { 
  background-color: var(--color-primary); 
  color: #fff; 
}
.section-dark .section-title,
.section-dark .section-subtitle {
  color: #fff;
}

/* 4. Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p { margin-bottom: var(--spacing-sm); }
.lead {
  font-size: 1.25rem;
  color: var(--color-text);
  margin-bottom: var(--spacing-lg);
}
.text-center { text-align: center; }
.text-gold { color: var(--color-secondary); }

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-xs);
}
.section-subtitle {
  text-align: center;
  color: var(--color-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--spacing-xl);
  font-family: var(--font-body);
  font-size: 0.875rem;
}

/* 5. Utility Classes */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-0 { margin-bottom: 0; }

.hidden { display: none !important; }

/* 6. Component Styles */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-speed);
  cursor: pointer;
  border: 2px solid transparent;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.875rem;
}
.btn i { margin-right: 0.5rem; }

.btn-primary {
  background-color: var(--color-secondary);
  color: var(--color-primary);
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover {
  background-color: #dfbb56;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(201,168,76, 0.5);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-bg);
  border-color: var(--color-bg);
}
.btn-secondary:hover {
  background-color: rgba(255,255,255,0.1);
}

.btn-outline-dark {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline-dark:hover {
  background-color: var(--color-primary);
  color: #fff;
}

/* Cards */
.card {
  background: var(--color-bg);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  border: 1px solid rgba(0,0,0,0.05);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.card-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(201,168,76, 0.1);
  color: var(--color-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-md);
}
.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-heading);
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #CBD5E1;
  border-radius: var(--border-radius-sm);
  background-color: #fff;
  transition: border-color var(--transition-speed);
}
.form-input:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(201,168,76, 0.1);
}
textarea.form-input {
  min-height: 120px;
  resize: vertical;
}
.form-error {
  color: var(--color-error);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.badge-gold {
  background-color: var(--color-secondary);
  color: var(--color-primary);
}

/* 7. Layout Components */

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  transition: box-shadow var(--transition-speed), padding var(--transition-speed);
}
.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: var(--shadow-md);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo span { color: var(--color-secondary); }
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-link {
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition-speed);
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-secondary);
  transition: width var(--transition-speed);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
}

/* Hero Section (Home) */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: #fff;
  padding-top: 80px; /* offset for fixed nav */
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background-image: 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="%23c9a84c" 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: 10;
  max-width: 800px;
}
.hero h1 { color: #fff; }
.hero .lead { color: #CBD5E1; }
.hero-btns {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Page Header (Inner pages) */
.page-header {
  padding: 150px 0 80px;
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  position: relative;
}
.page-header h1 { color: #fff; margin-bottom: 0; }

/* Footer */
.footer {
  background-color: var(--color-heading);
  color: #CBD5E1;
  padding: var(--spacing-xxl) 0 var(--spacing-md);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}
.footer-title {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  margin-bottom: var(--spacing-md);
}
.footer-desc {
  margin-bottom: var(--spacing-md);
  max-width: 300px;
}
.footer-links li {
  margin-bottom: 0.75rem;
}
.footer-links a {
  transition: color var(--transition-speed);
}
.footer-links a:hover {
  color: var(--color-secondary);
}
.social-icons {
  display: flex;
  gap: 1rem;
}
.social-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  transition: all var(--transition-speed);
}
.social-icon:hover {
  background-color: var(--color-secondary);
  color: var(--color-primary);
  transform: translateY(-3px);
}
.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.875rem;
}

/* 8. Page Specific Styles & Modules */

/* Preloader */
.preloader {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: var(--color-primary);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}
.loader {
  border: 4px solid rgba(255,255,255,0.1);
  border-left-color: var(--color-secondary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-speed);
}
.whatsapp-float:hover {
  transform: scale(1.1);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 45px;
  height: 45px;
  background-color: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed);
  z-index: 99;
}
.back-to-top.active {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background-color: var(--color-secondary);
}

/* Stats Row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  text-align: center;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}
.stat-label {
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.875rem;
  color: var(--color-heading);
}

/* Features List (Checkmarks) */
.feature-list { margin-bottom: var(--spacing-lg); }
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.feature-icon {
  color: var(--color-success);
  margin-top: 4px;
}
.feature-item.disabled { color: var(--color-muted); }
.feature-item.disabled .feature-icon { color: var(--color-muted); }

/* Pricing Plans */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: var(--spacing-xl);
}
.toggle-switch {
  position: relative;
  width: 60px;
  height: 34px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .4s;
  border-radius: 34px;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 26px; width: 26px;
  left: 4px; bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .toggle-slider { background-color: var(--color-primary); }
input:checked + .toggle-slider:before { transform: translateX(26px); }
.save-badge {
  background-color: var(--color-secondary);
  color: var(--color-primary);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: bold;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.pricing-card.popular {
  border: 2px solid var(--color-secondary);
  transform: scale(1.05);
}
.pricing-card.popular:hover { transform: scale(1.05) translateY(-5px); }
.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-secondary);
  color: var(--color-primary);
  padding: 4px 16px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 12px;
  text-transform: uppercase;
}
.plan-price {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--color-heading);
  display: flex;
  align-items:baseline;
}
.plan-price span { font-size: 1rem; color: var(--color-muted); font-weight: 400; font-family: var(--font-body); }
.plan-features { flex-grow: 1; margin: var(--spacing-lg) 0; }

/* Testimonials (Swiper) */
.testimonial-card {
  background: #fff;
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin: 10px;
}
.stars { color: var(--color-secondary); margin-bottom: 1rem; }
.client-info { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.client-avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--color-bg-alt); display: flex; align-items: center; justify-content: center; font-weight: bold; color: var(--color-primary); }

/* Accordion FAQ */
.faq-item {
  border: 1px solid #CBD5E1;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  overflow: hidden;
  background: #fff;
}
.faq-header {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--color-heading);
  transition: background-color var(--transition-speed);
}
.faq-header:hover { background-color: var(--color-bg-alt); }
.faq-header i { transition: transform var(--transition-speed); }
.faq-item.active .faq-header i { transform: rotate(180deg); }
.faq-content {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.active .faq-content {
  padding: 0 1.5rem 1.25rem;
}

/* 9. Animations & Keyframes */
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  color: #fff;
  font-size: 1.5rem;
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-20px) translateX(-50%); }
  60% { transform: translateY(-10px) translateX(-50%); }
}

/* 10. Media Queries */
@media (max-width: 992px) {
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-card.popular { transform: none; }
  .pricing-card.popular:hover { transform: translateY(-5px); }
  .hero-content { text-align: center; margin: 0 auto; }
  .hero-btns { justify-content: center; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 80%; max-width: 300px;
    height: 100vh;
    background: var(--color-primary);
    flex-direction: column;
    padding-top: 100px;
    transition: right 0.4s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  }
  .nav-links.active { right: 0; }
  .nav-link { color: #fff; font-size: 1.25rem; }
  .mobile-toggle { display: block; z-index: 1001; }
  
  .grid-cols-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  
  section { padding: var(--spacing-xl) 0; }
  .hero { text-align: center; }
  .hero h1 { font-size: 2.5rem; }
  .hero-btns { flex-direction: column; }
}

@media (max-width: 576px) {
  .grid-cols-3, .grid-cols-4, .stats-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .btn { width: 100%; display: flex; }
}
