/* Global Design System for Dr. Shahid Islam Dental Clinic */

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

:root {
  /* Color Palette - Premium Dental & Endodontics */
  --primary-color: #0b2240;      /* Deep Trust Navy */
  --primary-hover: #12335c;
  --secondary-color: #00a896;    /* Clinical Teal / Fresh Mint */
  --secondary-hover: #028090;
  --accent-color: #f7a072;       /* Warm Coral/Gold for primary CTA highlights */
  --accent-hover: #f17f43;
  --text-dark: #2b2d42;          /* Charcoal for high contrast readability */
  --text-light: #f8f9fa;         /* Crisp off-white */
  --text-gray: #6c757d;
  --bg-light: #ffffff;
  --bg-gray: #f4f6f8;            /* Contrast section backgrounds */
  --bg-dark: #07172b;            /* Dark mode / footer background */
  --border-color: #e9ecef;
  --error-color: #d90429;
  --success-color: #2ec4b6;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Fluid Typography using CSS clamp() */
  --font-xs: clamp(0.75rem, 0.12vw + 0.72rem, 0.81rem);
  --font-sm: clamp(0.88rem, 0.18vw + 0.83rem, 1rem);
  --font-base: clamp(1rem, 0.24vw + 0.94rem, 1.13rem);
  --font-lg: clamp(1.13rem, 0.36vw + 1.04rem, 1.31rem);
  --font-xl: clamp(1.25rem, 0.54vw + 1.12rem, 1.63rem);
  --font-xxl: clamp(1.5rem, 1.07vw + 1.23rem, 2.25rem);
  --font-display: clamp(2rem, 2.5vw + 1.38rem, 3.75rem);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 3rem;
  --spacing-xl: 5rem;

  /* Layout Constants */
  --max-width: 1200px;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(11, 34, 64, 0.08);
  --shadow-lg: 0 12px 24px rgba(11, 34, 64, 0.12);
  
  /* Transitions */
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-base);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

/* Global Typography Elements */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

h1 { font-size: var(--font-display); }
h2 { font-size: var(--font-xxl); position: relative; padding-bottom: var(--spacing-xs); }
h3 { font-size: var(--font-xl); }
h4 { font-size: var(--font-lg); }

p {
  margin-bottom: var(--spacing-md);
  opacity: 0.9;
}

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

a:hover {
  color: var(--secondary-hover);
}

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

/* Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.text-center { text-align: center; }
.text-left { text-align: left; }

.text-light, .text-light p, .text-light h1, .text-light h2, .text-light h3, .text-light h4 { color: var(--text-light) !important; }
.text-primary, .text-primary p, .text-primary h1, .text-primary h2, .text-primary h3, .text-primary h4 { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color); }
.text-dark, .text-dark p, .text-dark h1, .text-dark h2, .text-dark h3, .text-dark h4 { color: var(--text-dark) !important; }

/* Backgrounds - Now Relying on Inheritance for p */
.bg-primary { background-color: var(--primary-color); color: var(--text-light); }
.bg-gray { background-color: var(--bg-gray); }
.bg-dark { background-color: var(--bg-dark); color: var(--text-light); }

.py-sm { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }
.py-md { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }
.py-lg { padding-top: var(--spacing-xl); padding-bottom: var(--spacing-xl); }

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: var(--spacing-lg); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--spacing-lg); }
}

/* Section Header Utility */
.section-title-wrapper {
  max-width: 700px;
  margin: 0 auto var(--spacing-lg) auto;
}

.section-title-wrapper h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--secondary-color);
  margin: var(--spacing-sm) auto 0 auto;
  border-radius: var(--border-radius-sm);
}

/* Hide elements visually but keep screen-reader accessible */
.sr-only {
  position: absolute;
  width: 1fr;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
