/* All Saints Polyclinic — lightweight, mobile-first styles */
:root {
  --color-primary: #0b5c5c;
  --color-primary-dark: #084444;
  --color-accent: #c4a035;
  --color-accent-soft: #f5ecd4;
  --color-text: #1a2b2b;
  --color-muted: #4a5f5f;
  --color-bg: #f7faf9;
  --color-white: #ffffff;
  --shadow: 0 8px 24px rgba(11, 92, 92, 0.12);
  --radius: 12px;
  --header-h: 72px;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max-width: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-primary-dark);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent);
  color: #111;
  padding: 0.5rem 1rem;
  z-index: 10000;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(11, 92, 92, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-primary-dark);
}

.brand-location {
  font-size: 0.72rem;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--color-primary);
  margin-inline: auto;
  transition: transform 0.2s ease;
}

.site-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: var(--color-white);
  border-bottom: 1px solid rgba(11, 92, 92, 0.1);
  padding: 1rem 1.5rem 1.25rem;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  box-shadow: var(--shadow);
}

.site-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-nav a {
  display: block;
  padding: 0.65rem 0.5rem;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--color-accent-soft);
  color: var(--color-primary-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-actions .btn-primary {
  display: none;
}

.lang-select label {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-right: 0.25rem;
}

.lang-select select {
  border: 1px solid rgba(11, 92, 92, 0.25);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font: inherit;
  background: var(--color-white);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font: inherit;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
}

.btn-accent {
  background: var(--color-accent);
  color: #1a1a1a;
}

.btn-accent:hover {
  filter: brightness(1.05);
  color: #111;
}

/* Hero */
.hero {
  position: relative;
  min-height: clamp(420px, 70vh, 560px);
  display: flex;
  align-items: center;
  color: var(--color-white);
  background-color: var(--color-primary-dark);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8, 68, 68, 0.2) 0%,
    rgba(11, 92, 92, 0.15) 45%,
    rgba(0, 0, 0, 0.1) 100%
  );
  z-index: -1;
}

.hero-inner {
  padding: 3rem 0;
}

.hero-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #1a1a1a;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.65rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.hero-lead {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  max-width: 42rem;
  margin: 0 0 1.5rem;
  opacity: 0.95;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-slogan {
  font-style: italic;
  opacity: 0.9;
  margin: 0;
  font-size: 0.95rem;
}

.page-hero {
  min-height: 220px;
}

.page-hero h1 {
  max-width: none;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.page-hero .hero-lead {
  max-width: 40rem;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-alt {
  background: var(--color-white);
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin: 0 0 0.75rem;
  color: var(--color-primary-dark);
}

.section-lead {
  color: var(--color-muted);
  max-width: 52rem;
  margin: 0 0 2rem;
}

.grid-3 {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(11, 92, 92, 0.06);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--color-primary);
}

.card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.icon-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.icon-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.services-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.service-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill-list li {
  background: var(--color-white);
  border: 1px solid rgba(11, 92, 92, 0.15);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

.cta-band {
  background: linear-gradient(120deg, var(--color-primary), var(--color-primary-dark));
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.cta-band h2 {
  margin: 0;
  font-size: 1.35rem;
}

.cta-band p {
  margin: 0;
  opacity: 0.92;
}

.about-grid {
  display: grid;
  gap: 1rem;
}

.contact-layout {
  display: grid;
  gap: 1.5rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.contact-list li {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.contact-list strong {
  display: block;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.contact-list a {
  font-weight: 600;
  word-break: break-word;
}

.contact-list .hint {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

.whatsapp-link {
  color: #128c7e;
}

form.contact-form {
  background: var(--color-white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid rgba(11, 92, 92, 0.25);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.form-row textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin: 0.75rem 0 0;
}

.gallery-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, 1fr);
}

.gallery-row img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

/* Carousel */
.carousel-container {
  overflow: hidden;
  margin: 2rem 0;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  animation: scroll 30s linear infinite;
  width: max-content;
}

.carousel-track:hover {
  animation-play-state: paused;
}

.carousel-slide {
  flex-shrink: 0;
  width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.carousel-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.carousel-slide span {
  font-weight: 600;
  color: var(--color-primary-dark);
  font-size: 0.9rem;
  text-align: center;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Footer */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.88);
  padding: 2.5rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.site-footer a {
  color: #dff5f3;
}

.footer-brand img {
  width: 64px;
  margin-bottom: 0.75rem;
}

.site-footer h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #fff;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.35rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1rem;
  font-size: 0.85rem;
  text-align: center;
}

/* Floating WhatsApp */
.fab-whatsapp {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  font-size: 1.6rem;
}

.fab-whatsapp:hover {
  filter: brightness(1.05);
  color: #fff;
}

.fab-whatsapp span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Tablet+ */
@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .cta-band {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    border: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
  }

  .header-actions .btn-primary {
    display: inline-flex;
  }

  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
  }

  .site-nav {
    justify-self: center;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
