/**
 * Keshava Eye Care - Main Stylesheet
 * Responsive design tokens, typography, grid, buttons & components.
 */

:root {
  /* Brand Palette */
  --keshava-navy: #012267;
  --keshava-navy-dark: #001748;
  --keshava-blue: #012267;
  --keshava-blue-dark: #001748;
  --keshava-blue-light: #e6effd;

  /* Accent Color Palette */
  --keshava-accent: #00F0AC;
  --keshava-accent-dark: #00c98f;
  --keshava-accent-light: #e6fdf6;

  --keshava-bg: #ffffff;
  --keshava-bg-soft: #f4f8fc;
  --keshava-bg-card: #ffffff;
  --keshava-bg-alt: #ebf3fb;

  --keshava-text: #07132f;
  --keshava-text-muted: #62708b;
  --keshava-text-light: #94a3b8;
  --keshava-text-white: #ffffff;

  --keshava-border: rgba(1, 34, 103, 0.12);
  --keshava-border-dark: rgba(255, 255, 255, 0.15);

  /* Radius System */
  --keshava-radius-xs: 8px;
  --keshava-radius-sm: 12px;
  --keshava-radius-md: 18px;
  --keshava-radius-lg: 28px;
  --keshava-radius-xl: 36px;
  --keshava-radius-pill: 9999px;

  /* Typography */
  --font-sans: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: var(--font-sans);

  /* Shadow System */
  --shadow-sm: 0 4px 12px rgba(6, 45, 118, 0.04);
  --shadow-md: 0 12px 32px rgba(6, 45, 118, 0.06);
  --shadow-lg: 0 20px 50px rgba(6, 45, 118, 0.08);
  --shadow-hover: 0 24px 60px rgba(6, 45, 118, 0.12);

  /* Container */
  --container-max: 1320px;
  --container-gutter: 40px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--keshava-text);
  background-color: var(--keshava-bg);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

svg,
svg.icon-svg {
  width: 20px;
  height: 20px;
  max-width: 100%;
  max-height: 100%;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

/* Container System: Maintains exact equal 40px side gutters on desktop and 20px on mobile */
.container {
  width: min(100% - (var(--container-gutter) * 2), var(--container-max));
  margin-inline: auto;
  box-sizing: border-box;
}

.container-narrow {
  width: min(100% - (var(--container-gutter) * 2), 960px);
  margin-inline: auto;
  box-sizing: border-box;
}

@media (max-width: 768px) {

  .container,
  .container-narrow {
    width: min(100% - 40px, 100%) !important;
    margin-inline: auto !important;
  }
}

/* Section Spacing */
.section {
  padding-block: 100px;
  position: relative;
}

@media (max-width: 1024px) {
  .section {
    padding-block: 75px;
  }
}

@media (max-width: 640px) {
  .section {
    padding-block: 55px;
  }
}

/* Typography Classes */
.font-serif {
  font-family: var(--font-sans);
}

.font-sans {
  font-family: var(--font-sans);
}

/* Inner Page Hero Section: Fixed 400px Desktop / 250px Mobile Height */
.page-hero-section {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  padding-block: 40px;
  background-color: var(--keshava-navy);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-sizing: border-box;
}

.page-hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(1, 34, 103, 0.75); /* var(--keshava-navy) with opacity */
  z-index: 1;
}

.page-hero-section > .container {
  position: relative;
  z-index: 2;
}

.page-hero-section .heading-hero,
.page-hero-section .page-hero-subtitle {
  color: var(--keshava-text-white);
}

.page-hero-section .text-highlight,
.page-hero-section .pill-tag {
  color: var(--keshava-accent);
}

.page-hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 1050px;
  width: 100%;
}

.page-hero-title {
  margin-block: 14px 16px;
  max-width: 1000px;
  width: 100%;
  font-size: clamp(2.1rem, 3.6vw, 3.3rem);
  line-height: 1.18; 
}

.page-hero-subtitle {
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--keshava-text-muted);
  max-width: 780px;
}

/* Universal Mobile Left-Alignment & Uniform 250px Mobile Hero Height */
@media (max-width: 768px) {
  .page-hero-section {
    min-height: 250px !important;
    padding-block: 30px !important;
  }

  .page-hero-content,
  .inner-page-header,
  .page-hero-title,
  .page-hero-subtitle,
  .pill-tag,
  .text-center,
  .heading-section,
  .heading-hero {
    text-align: left !important;
    align-items: flex-start !important;
    margin-inline: 0 !important;
  }
}

.heading-display {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--keshava-navy);
}

.heading-hero {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 4.5vw, 3.85rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--keshava-text);
}

.heading-section {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--keshava-text);
}

.text-highlight {
  color: var(--keshava-blue);
}

.pill-tag {
  display: inline-block;
  background: transparent !important;
  padding: 0;
  color: var(--keshava-blue);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  border: none !important;
}

.pill-tag::before {
  display: none;
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding-inline: 26px;
  border-radius: var(--keshava-radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--keshava-accent);
  color: #012267 !important;
  box-shadow: 0 8px 24px rgba(0, 240, 172, 0.32);
}

.btn-primary:hover {
  background-color: #00d99b;
  color: #012267 !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 240, 172, 0.42);
}

.btn-primary svg,
.btn-primary svg.icon-svg {
  color: #012267 !important;
}

.btn-secondary,
.btn-white {
  background-color: #ffffff;
  color: #012267 !important;
  border: 1.5px solid #012267;
  box-shadow: 0 4px 14px rgba(1, 34, 103, 0.08);
}

.btn-secondary:hover,
.btn-white:hover {
  background-color: #f0f5ff;
  border-color: #012267;
  color: #012267 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(1, 34, 103, 0.15);
}

.btn-secondary svg,
.btn-secondary svg.icon-svg,
.btn-white svg,
.btn-white svg.icon-svg {
  color: #012267 !important;
}

.btn-outline-white {
  background-color: transparent;
  color: var(--keshava-text-white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: var(--keshava-text-white);
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.btn:hover svg.arrow-icon {
  transform: translateX(4px);
}

/* Card System */
.card {
  background: #ffffff;
  border-radius: var(--keshava-radius-md);
  border: 1px solid var(--keshava-border);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(7, 92, 255, 0.25);
}

.card-navy {
  background: var(--keshava-navy);
  color: var(--keshava-text-white);
  border-color: transparent;
}

.card-blue {
  background: var(--keshava-blue);
  color: var(--keshava-text-white);
  border-color: transparent;
}

/* Helper Utilities */
.text-center {
  text-align: center;
}

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

.text-right {
  text-align: right;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-24 {
  gap: 24px;
}

.gap-32 {
  gap: 32px;
}

.w-full {
  width: 100%;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--keshava-navy);
}

.form-control {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: var(--keshava-radius-xs);
  border: 1px solid rgba(7, 92, 255, 0.2);
  background: var(--keshava-bg-soft);
  font-size: 0.95rem;
  color: var(--keshava-text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: var(--keshava-blue);
  background: var(--keshava-bg);
  box-shadow: 0 0 0 3px rgba(7, 92, 255, 0.15);
}

textarea.form-control {
  height: auto;
  padding: 14px 16px;
  resize: vertical;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--keshava-blue);
  color: #fff;
  padding: 12px 20px;
  z-index: 10000;
  border-radius: var(--keshava-radius-xs);
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 20px;
}

/* Form Layout Classes */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .form-row-2col {
    grid-template-columns: 1fr;
  }
}

/* Blog & Card Hover Micro-Animations */
.card:hover .blog-card-img {
  transform: scale(1.06);
}