/* ==========================================================================
   Madhu Ambulance Service - Custom Styling Sheet (Vanilla CSS)
   ========================================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
  --primary-color: #d90429; /* Red/Crimson for urgency & medical emergency */
  --primary-hover: #b0021c;
  --secondary-color: #0f172a; /* Slate Dark Blue for professional trust */
  --secondary-hover: #1e293b;
  --accent-color: #0284c7; /* Light Blue for non-emergency & clean medical feel */
  --text-dark: #1e293b;
  --text-medium: #475569;
  --text-light: #64748b;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-alt: #f1f5f9;
  --border-color: #e2e8f0;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-primary: 0 10px 20px -3px rgba(217,4,41,0.25);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 8px;
  --container-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

ul {
  list-style: none;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  border-radius: 30px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--bg-white);
  box-shadow: var(--shadow-primary);
}

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

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--bg-white);
}

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

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

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

/* Header & Navigation Styles */
.top-bar {
  background-color: var(--secondary-color);
  color: #94a3b8;
  font-size: 13.5px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-info {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.top-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-info-item svg {
  width: 14px;
  height: 14px;
  fill: var(--primary-color);
}

.top-socials {
  display: flex;
  gap: 15px;
}

.top-socials a:hover {
  color: var(--primary-color);
}

/* Sticky Main Header */
.main-header {
  background-color: var(--bg-white);
  padding: 15px 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.main-header.scrolled {
  padding: 10px 0;
  box-shadow: var(--shadow-md);
}

.header-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.logo {
  justify-self: start;
}

.nav-menu {
  justify-self: center;
}

.header-action {
  justify-self: end;
  display: block;
}

.mobile-only-action {
  display: none;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 48px;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--secondary-color);
}

.logo-text span {
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dark);
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

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

/* Dropdown Menu styling */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-lg);
  border-radius: var(--border-radius);
  border-top: 3px solid var(--primary-color);
  min-width: 250px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: var(--transition);
  z-index: 100;
  padding: 10px 0;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 10px 20px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-dark);
  transition: var(--transition);
}

.dropdown-link:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
  padding-left: 25px;
}

/* Hamburger Toggler */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 4px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.75)), url('../images/banner.png') no-repeat center center/cover;
  padding: 160px 0;
  color: var(--bg-white);
  overflow: hidden;
}

.hero-content {
  max-width: 700px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  color: var(--bg-white);
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease;
}

.hero p {
  font-size: 18px;
  margin-bottom: 30px;
  color: rgba(255,255,255,0.9);
  animation: fadeInUp 1s ease;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  animation: fadeInUp 1.2s ease;
  flex-wrap: wrap;
}

/* CTA Bar */
.cta-bar {
  background: linear-gradient(135deg, var(--primary-color), #b0021c);
  color: var(--bg-white);
  padding: 20px 0;
  box-shadow: var(--shadow-md);
}

.cta-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.cta-bar h3 {
  color: var(--bg-white);
  font-size: 24px;
}

/* Section Templates */
.section {
  padding: 80px 0;
}

.section-bg {
  background-color: var(--bg-light);
}

.section-title-wrapper {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 50px auto;
}

.section-title-wrapper h2 {
  font-size: 36px;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.section-title-wrapper h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
}

.section-title-wrapper p {
  font-size: 16px;
  color: var(--text-light);
}

/* About Us Section Home */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-img {
  position: relative;
}

.about-img img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

.about-img::after {
  content: '';
  position: absolute;
  top: -15px;
  left: -15px;
  right: 15px;
  bottom: 15px;
  border: 3px solid var(--primary-color);
  border-radius: var(--border-radius);
  z-index: -1;
}

.about-content h3 {
  font-size: 22px;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.about-content h2 {
  font-size: 32px;
  margin-bottom: 20px;
}

.about-content p {
  margin-bottom: 15px;
  color: var(--text-medium);
}

.about-bullets {
  margin: 25px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.bullet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-dark);
}

.bullet-item svg {
  width: 18px;
  height: 18px;
  fill: var(--primary-color);
}

/* Our Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.service-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

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

.service-card-img {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.service-card:hover .service-card-img img {
  transform: scale(1.08);
}

.service-card-body {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.service-card-body h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.service-card-body p {
  color: var(--text-light);
  font-size: 14.5px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.service-card-footer {
  border-top: 1px solid var(--border-color);
  padding: 15px 25px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--primary-color);
}

.read-more:hover {
  color: var(--primary-hover);
}

/* Why Choose Us Grid */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.why-card {
  text-align: center;
  padding: 40px 30px;
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border-bottom: 4px solid var(--primary-color);
}

.why-icon-container {
  width: 70px;
  height: 70px;
  background-color: rgba(217, 4, 41, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
}

.why-icon-container svg {
  width: 32px;
  height: 32px;
  fill: var(--primary-color);
}

.why-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.why-card p {
  color: var(--text-light);
  font-size: 14.5px;
}

/* Embedded Map Section */
.map-section {
  padding: 0;
  line-height: 0;
}

.map-section iframe {
  width: 100%;
  height: 450px;
  border: none;
}

/* Page Header Subpages */
.page-header {
  background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('../images/hero-bg.png') no-repeat center center/cover;
  padding: 70px 0;
  color: var(--bg-white);
  text-align: center;
}

.page-header h1 {
  font-size: 40px;
  color: var(--bg-white);
  margin-bottom: 10px;
}

.breadcrumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

.breadcrumbs a:hover {
  color: var(--primary-color);
}

/* Contact Page Structure */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-card {
  background-color: var(--bg-light);
  padding: 25px;
  border-radius: var(--border-radius);
  display: flex;
  gap: 15px;
}

.contact-card-icon {
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-card-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--bg-white);
}

.contact-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.contact-card p {
  color: var(--text-light);
  font-size: 14.5px;
}

.contact-form-panel {
  background-color: var(--bg-white);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.contact-form-panel h3 {
  font-size: 24px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-control {
  width: 100%;
  padding: 12px 18px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Service Detail Page Layout */
.service-details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 50px;
}

.service-main img {
  border-radius: var(--border-radius);
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-height: 450px;
  object-fit: cover;
}

.service-main h2 {
  font-size: 32px;
  margin-bottom: 20px;
}

.service-main p {
  margin-bottom: 20px;
  color: var(--text-medium);
  font-size: 16px;
}

.service-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-widget {
  background-color: var(--bg-light);
  padding: 30px;
  border-radius: var(--border-radius);
}

.sidebar-widget h3 {
  font-size: 20px;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-color);
  padding-left: 12px;
}

.services-list-widget ul li {
  margin-bottom: 10px;
}

.services-list-widget ul li a {
  display: block;
  padding: 12px 20px;
  background-color: var(--bg-white);
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid var(--border-color);
}

.services-list-widget ul li a:hover,
.services-list-widget ul li.active a {
  background-color: var(--primary-color);
  color: var(--bg-white);
  border-color: var(--primary-color);
}

.contact-widget {
  background-color: var(--secondary-color);
  color: var(--bg-white);
  text-align: center;
  padding: 40px 30px;
}

.contact-widget h3 {
  color: var(--bg-white);
  border: none;
  padding: 0;
  font-size: 22px;
}

.contact-widget p {
  margin: 15px 0 25px 0;
  color: rgba(255,255,255,0.8);
}

.contact-widget .tel-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-color);
  display: block;
  margin-bottom: 10px;
}

/* Footer Section */
.footer {
  background-color: var(--secondary-color);
  color: #94a3b8;
  padding: 80px 0 20px 0;
  border-top: 5px solid var(--primary-color);
}

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

.footer-col h3 {
  color: var(--bg-white);
  font-size: 18px;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-col p {
  margin-bottom: 20px;
  font-size: 14.5px;
}

.footer-col .logo {
  margin-bottom: 20px;
}

.footer-col .logo-text {
  color: var(--bg-white);
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links li a {
  font-size: 14.5px;
}

.footer-links li a:hover {
  color: var(--primary-color);
  padding-left: 6px;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 14.5px;
}

.footer-contact li svg {
  width: 16px;
  height: 16px;
  fill: var(--primary-color);
  flex-shrink: 0;
  margin-top: 4px;
}

.footer-contact .tel-link {
  color: var(--bg-white);
  font-weight: 700;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 14px;
}

.footer-seo {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 20px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 15px;
}

/* Floating Emergency Contact Widgets */
.floating-widgets {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 1100;
}

.floating-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.floating-btn:hover {
  transform: scale(1.1) rotate(5deg);
}

.floating-call {
  background-color: var(--primary-color);
}

.floating-whatsapp {
  background-color: #25d366;
}

.floating-btn svg {
  width: 26px;
  height: 26px;
  fill: var(--bg-white);
}

.floating-btn-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: inherit;
  opacity: 0.6;
  z-index: -1;
  animation: pulse 2s infinite;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
  .why-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-content {
    display: flex;
    justify-content: space-between;
  }

  .header-action {
    display: none;
  }

  .mobile-only-action {
    display: block;
    margin-top: 20px;
    width: 100%;
  }

  .top-bar {
    display: none; /* Hide top bar on mobile for cleaner layout */
  }
  
  .menu-toggle {
    display: block;
    z-index: 1001;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 40px;
    box-shadow: -4px 0 10px rgba(0,0,0,0.1);
    transition: var(--transition);
    gap: 20px;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-item {
    width: 100%;
  }
  
  .nav-link {
    width: 100%;
    justify-content: space-between;
    font-size: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
  }
  
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    display: none;
    transform: none;
    box-shadow: none;
    background-color: var(--bg-light);
    border-top: none;
    padding-left: 20px;
    min-width: 100%;
    margin-top: 5px;
  }
  
  .dropdown.open {
    display: block;
  }
  
  .dropdown-link {
    padding: 10px 15px;
  }
  
  .about-grid, .contact-container, .service-details {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .why-grid {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding: 100px 0;
    text-align: center;
  }
  
  .hero h1 {
    font-size: 34px;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .cta-bar-content {
    flex-direction: column;
    text-align: center;
  }
  
  .section-title-wrapper h2 {
    font-size: 28px;
  }
  
  .about-bullets {
    grid-template-columns: 1fr;
  }
  
  .floating-widgets {
    bottom: 20px;
    right: 20px;
  }
  
  .floating-btn {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .form-row .form-group {
    margin-bottom: 20px;
  }
  .logo-text {
    font-size: 18px;
  }
  .logo img {
    height: 40px;
  }
}
