/* ==========================================================
   Tamilan Groups - Official Mobile-First Stylesheet
   Version: 2.2 (Pixel-Perfect Desktop & Strict Mobile-First)
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #ff5722;
  --primary-dark: #e64a19;
  --primary-light: #ff8a65;
  --secondary: #ff9800;
  --secondary-dark: #f57c00;
  --accent: #d81b60;
  --gradient-primary: linear-gradient(135deg, #ff5722 0%, #ff9800 50%, #e91e63 100%);
  --gradient-dark: linear-gradient(135deg, #0b1120 0%, #1e293b 100%);
  --gradient-hero: radial-gradient(circle at 80% 20%, rgba(255, 87, 34, 0.12) 0%, transparent 50%),
                         radial-gradient(circle at 20% 80%, rgba(255, 152, 0, 0.1) 0%, transparent 50%);

  --dark-bg: #0b1120;
  --dark-surface: #1e293b;
  --dark-border: rgba(255, 255, 255, 0.08);
  
  --light-bg: #f8fafc;
  --light-surface: #ffffff;
  --light-border: rgba(226, 232, 240, 0.8);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.05);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

/* 1. GLOBAL RESET & ZERO HORIZONTAL OVERFLOW */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

body {
  font-family: var(--font-body);
  background-color: var(--light-bg);
  color: var(--text-main);
  line-height: 1.6;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

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

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  word-break: break-word;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  box-sizing: border-box;
}

/* 2. TOPBAR & NAVBAR (MOBILE BASE) */
.topbar {
  display: none;
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

.topbar-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.topbar-links, .topbar-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #cbd5e1;
  font-weight: 500;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: rgba(255, 87, 34, 0.12);
  color: var(--primary);
}

.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex-shrink: 0;
}

.brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-tagline {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.d-none-mobile {
  display: none !important;
}

.d-none-desktop {
  display: inline-flex !important;
}

.mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 87, 34, 0.1);
  color: var(--primary);
  cursor: pointer;
  padding: 0.45rem 0.75rem;
  font-size: 1.35rem;
  border-radius: 8px;
  border: none;
  flex-shrink: 0;
}

/* Mobile Navigation Menu */
.nav-menu {
  position: fixed;
  top: 58px;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  background: white;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
  gap: 0.75rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border-bottom: 2px solid var(--light-border);
  transform: translateY(-150%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.25s ease;
  z-index: 999;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}

.nav-menu.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: #334155;
  padding: 0.4rem 0;
  width: 100%;
  white-space: nowrap;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid transparent;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-white);
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(255, 87, 34, 0.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}

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

.btn-whatsapp {
  background: #25d366;
  color: white;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.nav-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* 3. HERO SECTION (MOBILE BASE) */
.hero {
  position: relative;
  padding: 2.5rem 0;
  background: var(--light-bg);
  background-image: var(--gradient-hero);
  width: 100%;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}

.hero-content {
  text-align: center;
  width: 100%;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: white;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 87, 34, 0.2);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

.hero-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.35rem;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
  width: 100%;
}

.hero-cta-group .btn {
  width: 100%;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--light-border);
  width: 100%;
}

.stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--light-border);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  width: 100%;
}

.hero-card-main {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--light-border);
  width: 100%;
}

.verticals-grid-mini {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  width: 100%;
}

.mini-v-card {
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mini-v-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: rgba(255, 87, 34, 0.1);
  color: var(--primary);
}

.mini-v-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.mini-v-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.floating-badge {
  position: static;
  background: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
  width: 100%;
}

/* 4. SECTIONS & ADAPTIVE GRIDS (MOBILE BASE) */
.section {
  padding: 2.75rem 0;
  width: 100%;
  overflow: hidden;
}

.section-dark {
  background: #0b1120;
  color: #f8fafc;
}

.section-dark h2, .section-dark h3, .section-dark h4 {
  color: #ffffff;
}

.section-dark .section-subtitle {
  color: #94a3b8;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
  width: 100%;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.section-title {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.about-grid,
.about-checks-grid,
.about-page-grid,
.about-mission-grid,
.service-detail-row,
.calc-layout-grid,
.services-grid,
.features-grid,
.testimonials-grid,
.contact-grid,
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

.service-detail-row {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--light-border);
}

.service-detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.services-tabs-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  padding-bottom: 0.35rem;
}

.services-tabs {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  padding: 0.2rem;
}

.tab-btn {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  background: white;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  border: 1px solid var(--light-border);
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
}

.service-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-border);
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}

.service-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
  background: rgba(255, 87, 34, 0.1);
  color: var(--primary);
}

.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.service-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

.service-features-list {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.service-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: #475569;
}

.service-features-list li svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.service-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--light-border);
  gap: 0.5rem;
}

.service-link {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--primary);
  cursor: pointer;
}

.feature-box {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid var(--light-border);
}

.feature-box-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.feature-box-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.feature-box-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
}

.rating-stars {
  color: #fbbf24;
  display: flex;
  gap: 0.15rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.testimonial-quote {
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.author-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: white;
}

.author-role {
  font-size: 0.75rem;
  color: #94a3b8;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.faq-item {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--light-border);
  overflow: hidden;
  width: 100%;
}

.faq-question {
  padding: 0.9rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  gap: 0.5rem;
}

.faq-icon {
  transition: transform 0.3s ease;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.15rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.faq-item.active .faq-answer {
  max-height: 400px;
  padding-bottom: 0.95rem;
}

.footer {
  background: #070b14;
  color: #94a3b8;
  padding: 3rem 0 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
}

.footer-brand p {
  margin: 0.75rem 0;
  font-size: 0.85rem;
  line-height: 1.55;
}

.footer-socials {
  display: flex;
  gap: 0.5rem;
}

.social-link {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
}

.footer-heading {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-link {
  color: #94a3b8;
  font-size: 0.85rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  line-height: 1.45;
}

.footer-contact-item svg {
  color: var(--primary);
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  width: 100%;
}

/* ==========================================================
   5. DESKTOP & LAPTOP ENHANCEMENTS (MIN-WIDTH: 992px)
   ========================================================== */
@media (min-width: 992px) {
  .topbar {
    display: block;
  }

  .d-none-mobile {
    display: inline-flex !important;
  }

  .d-none-desktop {
    display: none !important;
  }

  .mobile-toggle {
    display: none !important;
  }

  .navbar-container {
    padding: 0.75rem 0;
  }

  .nav-menu {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: all !important;
    flex-direction: row;
    padding: 0;
    gap: 1.5rem;
    box-shadow: none;
    border-bottom: none;
    max-height: none;
    overflow: visible;
    background: transparent;
    width: auto;
  }

  .nav-link {
    width: auto;
    border-bottom: none;
    padding: 0.35rem 0;
    font-size: 0.92rem;
    position: relative;
  }

  .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2.5px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: var(--transition);
  }

  .nav-link:hover::after, .nav-link.active::after {
    width: 100%;
  }

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

  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
    align-items: center;
  }

  .hero-content {
    text-align: left;
  }

  .hero-pill {
    margin-left: 0;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-description {
    font-size: 1.05rem;
  }

  .hero-cta-group {
    flex-direction: row;
  }

  .hero-cta-group .btn {
    width: auto;
  }

  .hero-stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .stat-item {
    text-align: left;
    background: transparent;
    padding: 0;
    border: none;
  }

  .stat-number {
    font-size: 2rem;
  }

  .verticals-grid-mini {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-visual {
    padding: 1.5rem 0.5rem;
  }

  .floating-badge {
    position: absolute;
    width: auto;
    margin-top: 0;
  }

  .floating-badge.badge-top-right {
    top: 0;
    right: 0;
  }

  .floating-badge.badge-bottom-left {
    bottom: 0;
    left: 0;
  }

  .section {
    padding: 4.5rem 0;
  }

  .section-title {
    font-size: 2.35rem;
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }

  .about-checks-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-page-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
  }

  .about-mission-grid {
    grid-template-columns: 1fr 1fr;
  }

  .service-detail-row {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .calc-layout-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem;
  }

  .services-tabs {
    justify-content: center;
    flex-wrap: wrap;
  }

  .services-grid {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  }

  .features-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .testimonials-grid {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
