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

:root {
  --font-family-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-family-heading: 'Outfit', 'Inter', system-ui, sans-serif;
  
  /* Color Tokens - Premium Deep Teal/Dark Wellness Theme */
  --bg-base: #060d0f;
  --bg-gradient-start: #04090b;
  --bg-gradient-end: #0a181b;
  --bg-card: rgba(14, 28, 31, 0.65);
  --bg-card-hover: rgba(20, 38, 42, 0.8);
  
  --border-color: rgba(72, 155, 141, 0.12);
  --border-hover: rgba(72, 155, 141, 0.3);
  
  --color-primary: #489b8d;        /* Seafoam Teal */
  --color-primary-hover: #3d8478;
  --color-primary-light: rgba(72, 155, 141, 0.1);
  --color-primary-glow: rgba(72, 155, 141, 0.4);
  --color-secondary: #e9c46a;      /* Warm Gold */
  --color-secondary-glow: rgba(233, 196, 106, 0.3);
  --color-text-primary: #f0f5f5;
  --color-text-muted: #8fa5a2;
  --color-text-dark: #060d0f;
  --color-danger: #e07a5f;         /* Soft Coral/Red */
  --color-success: #52b788;        /* Soft Green */
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --glow-primary: 0 0 20px rgba(72, 155, 141, 0.2);
  
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 2.25rem;
  
  --max-width: 1200px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(72, 155, 141, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(233, 196, 106, 0.02) 0%, transparent 45%),
    linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
}

p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

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

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

/* Skip link */
.skip-link {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-secondary);
  color: var(--color-text-dark);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-primary);
}

/* Base Layout Elements */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header & Navigation */
header {
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(6, 13, 15, 0.8);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

.logo svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 2;
  transition: transform var(--transition-normal);
}

.logo:hover svg {
  transform: rotate(30deg);
}

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

nav ul {
  display: flex;
  list-style: none;
  gap: 1.75rem;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  position: relative;
  padding: 0.25rem 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-normal);
}

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

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

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 5rem 0 3rem;
  text-align: center;
  position: relative;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(80vw, 600px);
  height: min(80vw, 600px);
  background: radial-gradient(circle, rgba(72, 155, 141, 0.08) 0%, rgba(233, 196, 106, 0.02) 50%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero h1 {
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 40%, var(--color-text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  max-width: 700px;
  margin: 0 auto 2rem;
  font-size: 1.2rem;
}

/* Glass Card Component */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), var(--glow-primary);
}

/* Calculator Grid Layout */
.calculator-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
  align-items: start;
}

.calculator-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.input-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-label-row label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text-primary);
}

.input-value-badge {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(72, 155, 141, 0.2);
}

/* Custom Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(72, 155, 141, 0.15);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  margin: 10px 0;
}

/* Chrome/Safari Range Thumb */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--bg-base);
  box-shadow: 0 0 10px rgba(72, 155, 141, 0.4);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--color-secondary);
}

input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(0.95);
}

/* Firefox Range Thumb */
input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--bg-base);
  box-shadow: 0 0 10px rgba(72, 155, 141, 0.4);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.15);
  background: var(--color-secondary);
}

/* Dropdowns & Normal Fields */
select {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: rgba(14, 28, 31, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: var(--font-family-sans);
  font-size: 1rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23489b8d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  background-size: 1.25rem;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(72, 155, 141, 0.15);
}

/* Custom Date Input Styling */
input[type="date"] {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: rgba(14, 28, 31, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: var(--font-family-sans);
  font-size: 1rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

input[type="date"]:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(72, 155, 141, 0.15);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(53%) sepia(21%) saturate(718%) hue-rotate(120deg) brightness(92%) contrast(85%);
  cursor: pointer;
}

/* Reset Info Button Styling */
.reset-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.reset-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-text-primary);
  background: var(--color-primary-light);
}

.reset-btn svg {
  width: 0.95rem;
  height: 0.95rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform var(--transition-normal);
}

.reset-btn:hover svg {
  transform: rotate(-180deg);
}

/* Gender Toggles (Radio Group styled as button group) */
.toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.toggle-btn-label {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.85rem;
  background: rgba(14, 28, 31, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  user-select: none;
}

.toggle-group input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.toggle-group input[type="radio"]:checked + .toggle-btn-label {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-text-primary);
  box-shadow: inset 0 0 10px rgba(72, 155, 141, 0.15);
}

.toggle-group input[type="radio"]:focus + .toggle-btn-label {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(72, 155, 141, 0.15);
}

/* Calculator Outputs Column */
.calculator-outputs {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.clock-visualization {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.radial-clock-svg {
  width: 240px;
  height: 240px;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: rgba(72, 155, 141, 0.08);
  stroke-width: 14px;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 14px;
  stroke-linecap: round;
  stroke-dasharray: 691; /* 2 * PI * r (r=110) */
  stroke-dashoffset: 691;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 8px var(--color-primary-glow));
}

.clock-center-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  top: calc(50% - 20px);
  transform: translateY(-50%);
}

.clock-progress-val {
  font-family: var(--font-family-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-text-primary);
}

.clock-progress-lbl {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

/* Outputs Cards styling */
.stats-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-box {
  background: rgba(14, 28, 31, 0.4);
  border: 1px solid rgba(72, 155, 141, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.stat-num {
  font-family: var(--font-family-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.stat-lbl {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.actionable-tips {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tip-card {
  display: flex;
  gap: 0.85rem;
  background: rgba(72, 155, 141, 0.03);
  border: 1px dashed rgba(72, 155, 141, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
  align-items: flex-start;
  transition: background var(--transition-fast);
}

.tip-card:hover {
  background: rgba(72, 155, 141, 0.06);
}

.tip-icon {
  background: var(--color-primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  color: var(--color-primary);
  font-weight: bold;
  font-size: 0.9rem;
}

.tip-text {
  font-size: 0.9rem;
  color: var(--color-text-primary);
  line-height: 1.4;
}

.tip-text strong {
  color: var(--color-secondary);
}

.disclaimer-text {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 1rem;
  border-top: 1px solid rgba(72, 155, 141, 0.08);
  padding-top: 1rem;
}

/* Sections Styling */
.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

/* FAQ Accordions */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-normal);
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-family-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text-primary);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  outline: none;
}

.faq-question svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: var(--color-primary);
  stroke-width: 2;
  transition: transform var(--transition-normal);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  stroke: var(--color-secondary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
  background: rgba(6, 13, 15, 0.3);
}

.faq-answer-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--color-text-muted);
  font-size: 1rem;
}

.faq-answer-content p {
  margin-bottom: 0.75rem;
}

.faq-answer-content p:last-child {
  margin-bottom: 0;
}

/* Article & Content Pages */
.content-wrapper {
  max-width: 800px;
  margin: 0 auto 5rem auto;
  padding: 3rem 0;
}

.content-wrapper h1 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.content-wrapper h2 {
  font-size: 1.6rem;
  margin: 2rem 0 1rem 0;
  border-bottom: 1px solid rgba(72, 155, 141, 0.15);
  padding-bottom: 0.5rem;
}

.content-wrapper h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem 0;
}

.content-wrapper p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.content-wrapper ul, .content-wrapper ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
}

.content-wrapper li {
  margin-bottom: 0.5rem;
}

.content-wrapper table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: rgba(14, 28, 31, 0.4);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.content-wrapper th, .content-wrapper td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(72, 155, 141, 0.08);
}

.content-wrapper th {
  background: rgba(72, 155, 141, 0.08);
  font-family: var(--font-family-heading);
  font-weight: 600;
  color: var(--color-text-primary);
}

.content-wrapper tr:last-child td {
  border-bottom: none;
}

/* Contact form styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 550px;
  margin: 2rem auto 0 auto;
}

.input-field {
  padding: 0.85rem 1.25rem;
  background: rgba(14, 28, 31, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: var(--font-family-sans);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition-normal);
}

.input-field:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(72, 155, 141, 0.15);
}

textarea.input-field {
  min-height: 150px;
  resize: vertical;
}

.btn {
  background: var(--color-primary);
  color: var(--color-text-dark);
  font-family: var(--font-family-heading);
  font-weight: 700;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  font-size: 1rem;
}

.btn:hover {
  background: var(--color-secondary);
  box-shadow: 0 4px 15px rgba(233, 196, 106, 0.3);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(72, 155, 141, 0.4);
}

/* Country Landing Page Local Info Boxes */
.local-stats-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.local-stat-card {
  background: linear-gradient(135deg, rgba(72, 155, 141, 0.05) 0%, rgba(14, 28, 31, 0.8) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.local-stat-card h3 {
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.local-stat-card p {
  color: var(--color-text-primary);
  font-size: 1.15rem;
}

/* Advertisement Placeholder slots */
.ad-slot-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2.5rem 0;
  width: 100%;
}

.ad-slot-mock {
  background: rgba(14, 28, 31, 0.3);
  border: 1px dashed rgba(72, 155, 141, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 90px;
  width: 100%;
  max-width: 728px;
  position: relative;
}

.ad-slot-mock::after {
  content: 'ADVERTISEMENT';
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(72, 155, 141, 0.25);
  position: absolute;
  top: 5px;
}

.ad-slot-mock-square {
  min-height: 250px;
  max-width: 300px;
}

/* Cookie consent modal */
.cookie-banner {
  position: fixed;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  background: rgba(14, 28, 31, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.75rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.show {
  bottom: 2rem;
}

.cookie-content {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.cookie-btns {
  display: flex;
  gap: 0.75rem;
  align-self: flex-end;
}

.cookie-btn-accept {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.cookie-btn-decline {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--color-text-muted);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.cookie-btn-decline:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-primary);
}

/* Footer Section */
footer {
  background: #04090b;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
}

.footer-col h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-col a:hover {
  color: var(--color-text-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(72, 155, 141, 0.08);
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
}

/* Grid & Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

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

/* Accessibility / Animation Controls */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .progress-ring-fill {
    transition: none !important;
  }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }
  
  .calculator-outputs {
    position: static;
  }
  
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 3rem 0 2rem;
  }
  
  .nav-container {
    flex-direction: column;
    height: auto;
    padding: 0.85rem 0;
    gap: 0.65rem;
  }
  
  nav {
    display: block !important;
    width: 100%;
  }
  
  nav ul {
    justify-content: center;
    gap: 0.85rem;
    padding: 0;
  }
  
  nav a {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
  }
  
  .grid-3, .grid-2, .local-stats-banner {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .card {
    padding: 1.25rem;
  }
  
  .stats-cards {
    grid-template-columns: 1fr;
  }
  
  .radial-clock-svg {
    width: 180px;
    height: 180px;
  }
  
  /* Make DOB selectors fit on narrow mobile screens without overflow */
  .dob-row select {
    padding: 0.65rem 1.1rem 0.65rem 0.4rem;
    background-position: right 0.25rem center;
    background-size: 0.75rem;
    font-size: 0.8rem;
  }
  
  .weeks-canvas-container {
    padding: 0.5rem;
  }
  
  .weeks-legend {
    gap: 0.5rem;
    font-size: 0.7rem;
  }
  
  .legend-item {
    gap: 0.2rem;
  }
  
  .comparison-table {
    font-size: 0.8rem;
  }
  
  .comparison-table th, .comparison-table td {
    padding: 0.45rem 0.5rem;
  }
}

/* Ensure flex slider scales properly on mobile */
.input-group div[style*="display: flex"] {
  width: 100%;
}
.input-group div[style*="display: flex"] input[type="range"] {
  flex: 1;
}

/* Custom Styles for Memento Mori Grid & Print layouts */
.weeks-canvas-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
  background: rgba(14, 28, 31, 0.4);
  border: 1px solid rgba(72, 155, 141, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.weeks-canvas-wrapper {
  position: relative;
  max-width: 100%;
}

.weeks-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.85rem;
  font-size: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-lived { background-color: #2b5c54; }
.legend-remaining { background-color: #489b8d; }
.legend-optimized { background-color: #e9c46a; }
.legend-unreached { background-color: rgba(72, 155, 141, 0.08); }

/* Comparison Table Styling */
.comparison-table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table th, .comparison-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(72, 155, 141, 0.08);
  text-align: left;
}

.comparison-table th {
  color: var(--color-primary);
  font-weight: 600;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-val-user {
  font-weight: 700;
  color: var(--color-secondary);
}

.comparison-val-country {
  color: var(--color-text-primary);
}

/* Print Layout Support */
.print-header-blueprint {
  display: none;
}

@media print {
  body {
    background: #ffffff !important;
    background-image: none !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }
  
  /* Hide standard header, footer, side inputs, FAQ, ads, cookies, buttons */
  header, footer, .calculator-inputs, .ad-slot-container, .cookie-banner, .btn, .faq-grid, #info-section, .hero, .disclaimer-text {
    display: none !important;
  }
  
  .calculator-grid {
    display: block !important;
  }
  
  .calculator-outputs {
    width: 100% !important;
    position: static !important;
  }
  
  .card {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #000000 !important;
    padding: 0 !important;
    margin-bottom: 1.5cm !important;
    page-break-inside: avoid;
  }
  
  h1, h2, h3, h4, .stat-num, .clock-progress-val, .tip-text, td, th {
    color: #000000 !important;
  }
  
  .progress-ring-bg {
    stroke: #e0e0e0 !important;
  }
  
  .progress-ring-fill {
    stroke: #333333 !important;
    filter: none !important;
  }
  
  .tip-card {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #000000 !important;
  }
  
  .tip-icon {
    background: #eeeeee !important;
    border: 1px solid #cccccc !important;
    color: #000000 !important;
  }
  
  .print-header-blueprint {
    display: block !important;
    margin-bottom: 2rem;
    border-bottom: 2px solid #000000;
    padding-bottom: 1rem;
    text-align: center;
  }
  
  .print-header-blueprint h1 {
    font-size: 2.2rem;
    font-weight: 800;
  }
  
  .print-header-blueprint p {
    color: #555555 !important;
    font-size: 1rem;
    margin-top: 0.25rem;
  }
}

/* Extra Details Toggle Panel */
.extra-details-panel {
  display: none;
  margin-top: 1.25rem;
  border-top: 1px solid rgba(72, 155, 141, 0.15);
  padding-top: 1.25rem;
  animation: slideDown var(--transition-normal) ease-out;
}

.extra-details-panel.show {
  display: block;
}

.btn-toggle-extra {
  width: 100%;
  margin-top: 1rem;
  background: rgba(72, 155, 141, 0.06);
  color: var(--color-primary);
  border: 1px dashed rgba(72, 155, 141, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-family-heading);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-toggle-extra:hover {
  background: rgba(72, 155, 141, 0.12);
  border-color: var(--color-primary);
  color: var(--color-text-primary);
}

.btn-toggle-extra svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: transform var(--transition-normal);
}

.btn-toggle-extra.active svg {
  transform: rotate(180deg);
  stroke: var(--color-secondary);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
