/**
 * Shalom Hospital Theme — Global Reset & Base Styles
 * FILE: main.css
 */

/* ============================================================
   MODERN CSS RESET
============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--sh-font-body);
  font-size: var(--sh-text-base);
  font-weight: var(--sh-font-normal);
  color: var(--sh-text);
  background-color: var(--sh-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

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

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

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

a:hover {
  text-decoration: underline;
  color: var(--sh-primary-800);
}

a:focus-visible {
  outline: 2px solid var(--sh-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================================
   TYPOGRAPHY — HEADINGS
============================================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--sh-font-heading);
  font-weight: var(--sh-font-bold);
  color: var(--sh-text);
  line-height: var(--sh-leading-tight);
  margin-bottom: 0.5em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: var(--sh-font-extrabold);
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
}

h3 {
  font-size: clamp(1.375rem, 2.5vw, 2rem);
}

h4 {
  font-size: 1.375rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1em;
  line-height: var(--sh-leading-relaxed);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: var(--sh-font-semibold);
}

em {
  font-style: italic;
}

small {
  font-size: var(--sh-text-sm);
}

blockquote {
  border-left: 4px solid var(--sh-primary);
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--sh-muted);
  margin: 1.5rem 0;
}

hr {
  border: none;
  border-top: 1px solid var(--sh-gray-200);
  margin: 2rem 0;
}

code {
  font-family: var(--sh-font-mono);
  font-size: 0.875em;
  background-color: var(--sh-gray-100);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

pre {
  font-family: var(--sh-font-mono);
  background-color: var(--sh-gray-900);
  color: var(--sh-gray-100);
  padding: 1.5rem;
  border-radius: var(--sh-radius-lg);
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

/* ============================================================
   LAYOUT CONTAINERS
============================================================ */
.sh-container {
  width: 100%;
  max-width: var(--sh-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.sh-container--wide {
  width: 100%;
  max-width: var(--sh-container-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.sh-container--narrow {
  width: 100%;
  max-width: var(--sh-container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ============================================================
   SECTIONS
============================================================ */
.sh-section {
  padding-top: var(--sh-section-padding);
  padding-bottom: var(--sh-section-padding);
}

.sh-section--sm {
  padding-top: var(--sh-section-padding-sm);
  padding-bottom: var(--sh-section-padding-sm);
}

.sh-section--lg {
  padding-top: var(--sh-section-padding-lg);
  padding-bottom: var(--sh-section-padding-lg);
}

.sh-section--no-pt {
  padding-top: 0;
}

.sh-section--no-pb {
  padding-bottom: 0;
}

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

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

.sh-section--bg-primary {
  background: var(--sh-gradient-primary);
  color: var(--sh-white);
}

.sh-section--bg-dark {
  background-color: var(--sh-dark);
  color: var(--sh-white);
}

/* ============================================================
   SECTION HEADER
============================================================ */
.sh-section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.sh-section-header--left {
  text-align: left;
}

.sh-section-title {
  font-family: var(--sh-font-heading);
  font-weight: var(--sh-font-bold);
  color: var(--sh-text);
  line-height: var(--sh-leading-tight);
  position: relative;
  display: inline-block;
}

.sh-section-title::after {
  content: '';
  display: block;
  width: 3.5rem;
  height: 4px;
  background: var(--sh-gradient-primary);
  border-radius: var(--sh-radius-full);
  margin: 0.75rem auto 0;
}

.sh-section-header--left .sh-section-title::after {
  margin-left: 0;
}

.sh-section-title--white {
  color: var(--sh-white);
}

.sh-section-title--white::after {
  background: linear-gradient(90deg, var(--sh-accent), rgba(255,255,255,0.5));
}

.sh-section-subtitle {
  color: var(--sh-muted);
  font-size: var(--sh-text-lg);
  max-width: 600px;
  margin: 0.75rem auto 0;
  line-height: var(--sh-leading-relaxed);
}

.sh-section-subtitle--white {
  color: rgba(255, 255, 255, 0.8);
  margin-left: auto;
  margin-right: auto;
}

.sh-section-header--left .sh-section-subtitle {
  margin-left: 0;
}

/* ============================================================
   BADGES & TAGS
============================================================ */
.sh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: var(--sh-primary-50);
  color: var(--sh-primary-700);
  border-radius: var(--sh-radius-full);
  padding: 0.25rem 0.875rem;
  font-size: var(--sh-text-xs);
  font-weight: var(--sh-font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--sh-tracking-wider);
  line-height: 1.5;
  white-space: nowrap;
}

.sh-badge--primary {
  background-color: var(--sh-primary-50);
  color: var(--sh-primary-700);
}

.sh-badge--accent {
  background-color: var(--sh-accent-100);
  color: var(--sh-accent-700);
}

.sh-badge--success {
  background-color: var(--sh-success-100);
  color: var(--sh-success-700);
}

.sh-badge--error {
  background-color: var(--sh-error-100);
  color: var(--sh-error-700);
}

.sh-badge--muted {
  background-color: var(--sh-gray-100);
  color: var(--sh-gray-600);
}

.sh-badge--dark {
  background-color: var(--sh-dark);
  color: var(--sh-white);
}

.sh-tag {
  display: inline-flex;
  align-items: center;
  background-color: var(--sh-gray-100);
  color: var(--sh-gray-600);
  border-radius: var(--sh-radius-full);
  padding: 0.125rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: var(--sh-font-medium);
  text-transform: uppercase;
  letter-spacing: var(--sh-tracking-wider);
  white-space: nowrap;
}

.sh-tag--primary {
  background-color: var(--sh-primary-50);
  color: var(--sh-primary-700);
}

.sh-tag--accent {
  background-color: var(--sh-accent-100);
  color: var(--sh-accent-700);
}

/* ============================================================
   DIVIDER
============================================================ */
.sh-divider {
  border: none;
  height: 2px;
  background: var(--sh-gradient-primary);
  border-radius: var(--sh-radius-full);
  margin: 2rem 0;
  opacity: 0.3;
}

.sh-divider--light {
  background: var(--sh-gray-200);
  height: 1px;
  opacity: 1;
}

/* ============================================================
   UTILITY CLASSES
============================================================ */

/* Text alignment */
.sh-text-center  { text-align: center !important; }
.sh-text-left    { text-align: left !important; }
.sh-text-right   { text-align: right !important; }

/* Text colors */
.sh-text-primary  { color: var(--sh-primary) !important; }
.sh-text-accent   { color: var(--sh-accent) !important; }
.sh-text-muted    { color: var(--sh-muted) !important; }
.sh-text-white    { color: var(--sh-white) !important; }
.sh-text-success  { color: var(--sh-success) !important; }
.sh-text-error    { color: var(--sh-error) !important; }

/* Font */
.sh-font-heading  { font-family: var(--sh-font-heading) !important; }
.sh-font-bold     { font-weight: var(--sh-font-bold) !important; }
.sh-font-semibold { font-weight: var(--sh-font-semibold) !important; }
.sh-font-medium   { font-weight: var(--sh-font-medium) !important; }

/* Display */
.sh-hidden         { display: none !important; }
.sh-invisible      { visibility: hidden !important; }
.sh-block          { display: block !important; }
.sh-inline-block   { display: inline-block !important; }
.sh-flex           { display: flex !important; }
.sh-inline-flex    { display: inline-flex !important; }
.sh-grid           { display: grid !important; }

/* Flex utilities */
.sh-items-center  { align-items: center !important; }
.sh-items-start   { align-items: flex-start !important; }
.sh-items-end     { align-items: flex-end !important; }
.sh-justify-center { justify-content: center !important; }
.sh-justify-between { justify-content: space-between !important; }
.sh-justify-end   { justify-content: flex-end !important; }
.sh-flex-wrap     { flex-wrap: wrap !important; }
.sh-flex-col      { flex-direction: column !important; }
.sh-gap-2         { gap: 0.5rem !important; }
.sh-gap-4         { gap: 1rem !important; }
.sh-gap-6         { gap: 1.5rem !important; }
.sh-gap-8         { gap: 2rem !important; }

/* Spacing */
.sh-mb-0 { margin-bottom: 0 !important; }
.sh-mb-2 { margin-bottom: 0.5rem !important; }
.sh-mb-4 { margin-bottom: 1rem !important; }
.sh-mb-6 { margin-bottom: 1.5rem !important; }
.sh-mb-8 { margin-bottom: 2rem !important; }
.sh-mt-4 { margin-top: 1rem !important; }
.sh-mt-6 { margin-top: 1.5rem !important; }
.sh-mt-8 { margin-top: 2rem !important; }

/* Width */
.sh-w-full  { width: 100% !important; }
.sh-h-full  { height: 100% !important; }
.sh-max-w-full { max-width: 100% !important; }

/* Overflow */
.sh-overflow-hidden { overflow: hidden !important; }

/* Position */
.sh-relative { position: relative !important; }
.sh-absolute { position: absolute !important; }
.sh-fixed    { position: fixed !important; }

/* Screen reader only */
.sh-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================
   WORDPRESS ALIGNMENT CLASSES
============================================================ */
.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.alignwide {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* ============================================================
   WORDPRESS BLOCK CONTENT
============================================================ */
.entry-content {
  max-width: 75ch;
  line-height: var(--sh-leading-relaxed);
}

.entry-content > * + * {
  margin-top: 1.25em;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.5rem;
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content li {
  margin-bottom: 0.5em;
}

.entry-content img {
  border-radius: var(--sh-radius-lg);
}

.entry-content figure {
  margin: 2rem 0;
}

.entry-content figcaption {
  font-size: var(--sh-text-sm);
  color: var(--sh-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.entry-content a {
  color: var(--sh-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: var(--sh-text-sm);
}

.entry-content th,
.entry-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--sh-gray-200);
  text-align: left;
}

.entry-content th {
  background-color: var(--sh-primary-50);
  color: var(--sh-primary-700);
  font-weight: var(--sh-font-semibold);
  font-family: var(--sh-font-heading);
}

.entry-content tr:nth-child(even) td {
  background-color: var(--sh-gray-50);
}

/* ============================================================
   GRADIENT TEXT UTILITY
============================================================ */
.sh-gradient-text {
  background: var(--sh-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   SKIP LINK
============================================================ */
.skip-link {
  position: absolute;
  top: -9999px;
  left: -9999px;
  z-index: 9999;
  background: var(--sh-primary);
  color: var(--sh-white);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--sh-radius-md) var(--sh-radius-md);
  font-weight: var(--sh-font-semibold);
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  left: 1rem;
}

/* ============================================================
   PRINT STYLES
============================================================ */
@media print {
  .sh-header,
  .sh-footer,
  .sh-mobile-menu,
  .sh-whatsapp-btn,
  .sh-back-to-top,
  .sh-modal-overlay,
  .sh-emergency-banner,
  .no-print {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.75em;
    color: var(--sh-muted);
  }

  .entry-content {
    max-width: 100%;
  }

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  img {
    max-width: 100%;
  }
}
