/* style.css */
:root {
  --primary: #004e92;
  --secondary: #000428;
  --accent: #00e5ff;
  --bg-light: #f4f7f6;
  --text-dark: #333;
  --white: #ffffff;
  --transition: all 0.3s ease-in-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Navigation */
header {
  background: linear-gradient(to right, var(--secondary), var(--primary));
  padding: 1rem 5%;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Added to allow stacking on smaller screens */
  gap: 1rem;
}

.logo {
  color: var(--white);
  font-size: clamp(1.4rem, 4vw, 1.8rem); /* Fluid typography */
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span {
  color: var(--accent);
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

nav ul li a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

nav ul li a:hover, nav ul li a.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: var(--white);
  padding: clamp(3rem, 10vw, 6rem) 5%; /* Fluid padding */
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem); /* Fluid typography */
  margin-bottom: 1rem;
  animation: slideDown 1s ease-out forwards;
}

.hero p {
  font-size: clamp(1rem, 3vw, 1.2rem);
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0;
  animation: fadeIn 1s ease-out 0.5s forwards;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--secondary);
  padding: 0.8rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
  text-align: center;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5);
  background: var(--white);
}

/* Services & Sections */
.section-title {
  text-align: center;
  margin: 3rem 5% 1.5rem;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  color: var(--primary);
}

.section-subtitle {
  text-align: center;
  color: #666;
  margin: -1rem 5% 2.5rem;
  font-size: 1.1rem;
}

.grid-container, .features-grid, .steps-grid {
  display: grid;
  /* Uses min() to prevent overflow on screens smaller than 300px */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 2rem;
  padding: 0 5% 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card, .step-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid transparent;
}

.card:hover {
  transform: translateY(-10px);
  border-bottom: 4px solid var(--accent);
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* Quick Challan Check */
.quick-check {
  background: var(--white);
  margin: -3rem 5% 3rem;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap; /* Allows stacking on mobile */
}

.quick-check input {
  padding: 1rem;
  width: 100%;
  max-width: 350px; /* Changed from rigid width */
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

/* Forms */
.form-container {
  width: 90%;
  max-width: 500px;
  margin: 3rem auto;
  background: var(--white);
  padding: clamp(1.5rem, 5vw, 3rem);
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

.form-group input, .form-group select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

/* Features & Steps Utilities */
.bg-light-alt {
  background-color: #eef2f5;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: var(--secondary);
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 229, 255, 0.3);
}

.feature-box {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: var(--white);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.feature-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.feature-icon {
  font-size: 2.5rem;
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 10px;
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-50px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- DASHBOARD STYLES --- */
.dashboard-container {
  padding: 2rem 5%;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--white);
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}

.dashboard-header h2 {
  color: var(--primary);
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8rem;
  flex-shrink: 0; /* Prevents squishing */
}

/* Main Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr; 
  gap: 2rem;
}

.dash-section {
  background: var(--white);
  padding: clamp(1rem, 4vw, 2rem);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.dash-section h3 {
  margin-bottom: 1.5rem;
  color: var(--primary);
  border-bottom: 2px solid var(--bg-light);
  padding-bottom: 0.5rem;
}

/* Dashboard Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
}

.dash-table {
  width: 100%;
  min-width: 600px; /* Forces scrolling on small screens instead of squishing */
  border-collapse: collapse;
}

.dash-table th, .dash-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.dash-table th {
  background-color: var(--bg-light);
  color: var(--primary);
  font-weight: 600;
}

/* Utilities & Footer */
.doc-list { display: flex; flex-direction: column; gap: 1rem; }

.doc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Prevent overflow */
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 8px;
  border-left: 4px solid var(--accent);
}

.doc-info { display: flex; align-items: center; gap: 1rem; }

.btn-small {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: var(--transition);
  white-space: nowrap;
}

.pay-btn { background: #ff4757; color: var(--white); }
.outline-btn { background: transparent; border: 1px solid var(--primary); color: var(--primary); }

.professional-footer {
  background: var(--secondary);
  color: #ccc;
  padding: 4rem 5% 1rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 3rem;
}

.footer-links h4, .footer-contact h4 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  position: relative;
}

.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 0.8rem; }
.footer-links ul li a { color: #ccc; text-decoration: none; transition: var(--transition); }
.footer-bottom { text-align: center; padding-top: 2rem; font-size: 0.9rem; }


/* =========================================
   MEDIA QUERIES FOR RESPONSIVENESS
   ========================================= */

/* Tablets and Smaller Desktops */
@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 1fr; /* Stack dashboard columns */
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr; /* 2 columns in footer */
    gap: 2rem;
  }
  
  .quick-check {
    margin: -2rem 5% 2rem; /* Reduce negative margin */
  }
}

/* Mobile Phones (Landscape/Large Mobile) */
@media (max-width: 768px) {
  nav {
    flex-direction: column; /* Stack logo and nav links */
    text-align: center;
  }
  
  nav ul {
    width: 100%;
    justify-content: center;
  }
  
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .dashboard-header .btn {
    width: 100%; /* Full width button on mobile */
  }
  
  .feature-box {
    flex-direction: column; /* Stack icons and text in features */
    align-items: center;
    text-align: center;
  }
}

/* Small Mobile Phones (Portrait) */
@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr; /* Stack all footer sections */
    text-align: center;
  }
  
  .footer-links h4::after {
    left: 50%; /* Center the underline */
    transform: translateX(-50%);
  }

  .quick-check {
    flex-direction: column; /* Stack input and button */
    padding: 1.5rem;
  }
  
  .quick-check input {
    max-width: 100%;
  }

  .quick-check .btn {
    width: 100%;
  }
  
  .doc-item {
    flex-direction: column;
    align-items: flex-start;
  }
}