/* ==========================================================================
   iCARE - custom styles (Bootstrap 5.3.3 base). Media queries live in css/responsive.css
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/playfair-display-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/playfair-display-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/roboto-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/roboto-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design tokens ---------- */
:root {
  --ic-background: #ffffff;
  --ic-foreground: hsl(240 10% 3.9%);
  --ic-foreground-rgb: 9, 9, 11;
  --ic-primary: hsl(0 72.2% 50.6%);
  --ic-primary-rgb: 220, 38, 38;
  --ic-primary-foreground: hsl(0 0% 98%);
  --ic-secondary: hsl(240 4.8% 95.9%);
  --ic-secondary-foreground: hsl(240 5.9% 10%);
  --ic-muted-foreground: hsl(240 3.8% 46.1%);
  --ic-accent: hsl(240 4.8% 95.9%);
  --ic-border: hsl(240 5.9% 90%);
  --ic-radius: 0.5rem;
  --ic-radius-md: calc(0.5rem - 2px);
  --ic-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --ic-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --ic-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --ic-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --ic-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --ic-font-body: Roboto, sans-serif;
  --ic-font-headline: 'Playfair Display', serif;
}

/* ---------- Base / reset (normalise Bootstrap reboot to the original look) ---------- */
*, ::before, ::after { border-color: var(--ic-border); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ic-font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ic-foreground);
  background-color: var(--ic-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: inherit; }
a:hover { color: inherit; }
img, svg, iframe { display: block; vertical-align: middle; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: transparent; border: 0; padding: 0; cursor: pointer; }
.font-headline { font-family: var(--ic-font-headline); }
.text-primary-red { color: var(--ic-primary); }

.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; overflow-x: clip; }
.site-main { flex-grow: 1; }

/* Tailwind-equivalent container: full width, 16px side padding, max-widths set in responsive.css */
.container {
  --bs-gutter-x: 2rem;
  width: 100%;
  max-width: none;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Grid gutter helpers (gap-8 = 32px, gap-4 = 16px) */
.cards-gutter { --bs-gutter-x: 2rem; --bs-gutter-y: 2rem; }

/* ---------- Buttons ---------- */
.ic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  border-radius: var(--ic-radius-md);
  transition: color .15s cubic-bezier(.4,0,.2,1), background-color .15s cubic-bezier(.4,0,.2,1), border-color .15s cubic-bezier(.4,0,.2,1), box-shadow .15s cubic-bezier(.4,0,.2,1);
}
.ic-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; pointer-events: none; }
.ic-btn-primary { background-color: var(--ic-primary); color: var(--ic-primary-foreground); }
.ic-btn-primary:hover { background-color: rgba(var(--ic-primary-rgb), .9); color: var(--ic-primary-foreground); }
.ic-btn-outline { border: 1px solid var(--ic-border); background-color: var(--ic-background); }
.ic-btn-outline:hover { background-color: var(--ic-accent); color: var(--ic-secondary-foreground); }
.ic-btn-light { background-color: var(--ic-primary-foreground); color: var(--ic-primary); }
.ic-btn-light:hover { background-color: rgba(250, 250, 250, .9); color: var(--ic-primary); }
.ic-btn-link { color: var(--ic-primary); text-underline-offset: 4px; }
.ic-btn-link:hover { color: var(--ic-primary); text-decoration: underline; }
.ic-btn-h10 { height: 2.5rem; padding: 0.5rem 1rem; }
.ic-btn-h11 { height: 2.75rem; padding: 0 2rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--ic-border);
  background-color: rgba(255, 255, 255, .95);
}
@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))) {
  .site-header {
    background-color: rgba(255, 255, 255, .6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
.site-header-inner { height: 5rem; display: flex; align-items: center; justify-content: space-between; }
.brand-logo { display: flex; align-items: center; }
.brand-logo img { width: 80px; height: auto; object-fit: contain; }
.main-nav { align-items: center; gap: 2rem; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.main-nav a { color: rgba(var(--ic-foreground-rgb), .7); transition: color .15s cubic-bezier(.4,0,.2,1); }
.main-nav a:hover { color: var(--ic-primary); }
.main-nav a.active { color: var(--ic-primary); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--ic-border);
  border-radius: var(--ic-radius-md);
  background-color: var(--ic-background);
  transition: background-color .15s;
}
.menu-toggle:hover { background-color: var(--ic-accent); }
.menu-toggle svg { width: 1rem; height: 1rem; }

/* ---------- Mobile menu (Bootstrap offcanvas) ---------- */
.mobile-menu.offcanvas {
  --bs-offcanvas-width: 24rem;
  --bs-offcanvas-transition: transform .5s ease-in-out;
  width: 100%;
  max-width: 24rem;
  border-left: 1px solid var(--ic-border);
  box-shadow: var(--ic-shadow-lg);
}
.offcanvas-backdrop.show { opacity: .8; }
.mobile-menu-head {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--ic-border);
}
.mobile-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--ic-radius-md);
}
.mobile-menu-close:hover { background-color: var(--ic-accent); }
.mobile-menu-close svg { width: 1rem; height: 1rem; }
.mobile-menu-links { display: flex; flex-direction: column; padding: 1.5rem; }
.mobile-menu-links > * + * { margin-top: 1rem; }
.mobile-menu-links a.mobile-link { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; color: var(--ic-foreground); }
.mobile-menu-links a.mobile-link:hover { color: var(--ic-primary); }
.mobile-menu-links a.mobile-link.active { color: var(--ic-primary); font-weight: 700; }

/* ---------- Home: hero carousel ---------- */
.hero { position: relative; width: 100%; }
.hero-slide { position: relative; width: 100%; aspect-ratio: 16 / 9; } /* full image (with its text) visible below desktop */
.hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide-overlay { position: absolute; inset: 0; background-color: rgb(0 0 0 / .3); }
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ic-border);
  border-radius: 9999px;
  background-color: var(--ic-background);
  transition: background-color .15s;
}
.hero-arrow:hover { background-color: var(--ic-accent); }
.hero-arrow svg { width: 1rem; height: 1rem; }
.hero-arrow-prev { left: 1rem; }
.hero-arrow-next { right: 1rem; }

/* ---------- Sections ---------- */
.section-pad { padding-top: 4rem; padding-bottom: 4rem; }
.bg-ic-secondary { background-color: var(--ic-secondary); }
.bg-ic-background { background-color: var(--ic-background); }

/* ---------- Cards ---------- */
.ic-card {
  height: 100%;
  border: 1px solid var(--ic-border);
  border-radius: var(--ic-radius);
  background-color: var(--ic-background);
  color: var(--ic-foreground);
  box-shadow: var(--ic-shadow-sm);
}
.ic-card-header { display: flex; flex-direction: column; padding: 1.5rem; }
.ic-card-header > * + * { margin-top: 0.375rem; }
.ic-card-body { padding: 0 1.5rem 1.5rem; }
.ic-card-title { font-family: var(--ic-font-headline); font-size: 1.5rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.025em; }
.feature-card { text-align: center; }
.feature-icon {
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  padding: 1rem;
  border-radius: 9999px;
  background-color: rgba(var(--ic-primary-rgb), .1);
}
.feature-icon.is-grey { background-color: var(--ic-secondary); }
.feature-icon svg { width: 2.5rem; height: 2.5rem; color: var(--ic-primary); }
.feature-card .ic-card-title { padding-top: 1rem; }
.feature-text { color: rgba(var(--ic-foreground-rgb), .7); }
.feature-card .ic-btn-link { margin-top: 1rem; }

/* ---------- Home: video section ---------- */
.video-copy > * + * { margin-top: 1.5rem; }
.section-heading { font-family: var(--ic-font-headline); font-weight: 700; font-size: 1.875rem; line-height: 2.25rem; }
.video-text { font-size: 1.125rem; line-height: 1.75rem; color: rgba(var(--ic-foreground-rgb), .8); }
.video-tags { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; color: var(--ic-muted-foreground); }
.video-frame { position: relative; overflow: hidden; border-radius: var(--ic-radius); box-shadow: var(--ic-shadow-2xl); padding-top: 56.25%; }
.video-frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Home: call to action ---------- */
.cta { background-color: var(--ic-primary); color: var(--ic-primary-foreground); }
.cta-inner { padding-top: 5rem; padding-bottom: 5rem; text-align: center; }
.cta-text { margin-top: 1rem; margin-left: auto; margin-right: auto; max-width: 42rem; font-size: 1.125rem; line-height: 1.75rem; color: rgba(250, 250, 250, .9); }
.cta .ic-btn { margin-top: 2rem; }

/* ---------- Inner page intro ---------- */
.page-intro { text-align: center; max-width: 48rem; margin-left: auto; margin-right: auto; }
.page-title { font-family: var(--ic-font-headline); font-weight: 700; font-size: 2.25rem; line-height: 2.5rem; color: var(--ic-primary); }
.page-lead { margin-top: 1rem; font-size: 1.125rem; line-height: 1.75rem; color: rgba(var(--ic-foreground-rgb), .8); }
.space-top { margin-top: 4rem; }
.space-top-lg { margin-top: 6rem; }
.row.space-top { margin-top: calc(4rem - var(--bs-gutter-y)); }
.row.space-top-lg { margin-top: calc(6rem - var(--bs-gutter-y)); }

/* ---------- About ---------- */
.about-copy { font-size: 1.125rem; line-height: 1.75rem; color: rgba(var(--ic-foreground-rgb), .9); }
.about-copy > * + * { margin-top: 1.5rem; }
.about-image { width: 100%; height: auto; object-fit: cover; border-radius: var(--ic-radius); box-shadow: var(--ic-shadow-xl); }

/* ---------- Projects & News cards ---------- */
.media-card { display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .3s cubic-bezier(.4,0,.2,1); }
.media-card:hover { box-shadow: var(--ic-shadow-xl); }
.news-card { transition-duration: .15s; }
.media-card-image { position: relative; aspect-ratio: 16 / 9; }
.media-card-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-card .ic-card-body { flex-grow: 1; }
.media-card-text, .news-date { font-size: 0.875rem; line-height: 1.25rem; color: var(--ic-muted-foreground); }
.media-card-footer { display: flex; align-items: center; padding: 0 1.5rem 1.5rem; }
.media-card-footer .ic-btn-link { height: 2.5rem; padding: 0; }
.media-card-footer .ic-btn-link svg { margin-left: 0.25rem; }
.news-card .ic-card-title { transition: color .15s cubic-bezier(.4,0,.2,1); }
.news-card:hover .ic-card-title { color: var(--ic-primary); }
.ic-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 0.5rem;
  padding: 0.125rem 0.625rem;
  border: 1px solid transparent;
  border-radius: 9999px;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  background-color: var(--ic-secondary);
  color: var(--ic-secondary-foreground);
  transition: background-color .15s;
}
.ic-badge:hover { background-color: hsl(240 4.8% 95.9% / .8); }

/* ---------- Gallery (masonry columns) ---------- */
.gallery-grid { column-count: 1; column-gap: 1rem; }
.gallery-grid > .gallery-item { margin: 0; }
.gallery-grid > .gallery-item + .gallery-item { margin-top: 1rem; }
.gallery-item { position: relative; overflow: hidden; border-radius: var(--ic-radius); box-shadow: var(--ic-shadow-md); break-inside: avoid; }
.gallery-item img { width: 100%; height: auto; object-fit: cover; transition: transform .3s cubic-bezier(.4,0,.2,1); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  background-color: rgb(0 0 0 / .5);
  opacity: 0;
  transition: opacity .3s cubic-bezier(.4,0,.2,1);
}
.gallery-item:hover .gallery-caption { opacity: 1; }
.gallery-caption p { color: #fff; font-size: 0.875rem; line-height: 1.25rem; filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06)); }

/* ---------- Contact ---------- */
.contact-banner { position: relative; width: 100%; height: 14rem; }
.contact-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.contact-banner-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background-color: rgba(var(--ic-primary-rgb), .7); }
.contact-banner .page-title { color: var(--ic-primary-foreground); }
.contact-heading { font-family: var(--ic-font-headline); font-weight: 700; font-size: 1.875rem; line-height: 2.25rem; color: var(--ic-foreground); }
.contact-text { margin-top: 1rem; font-size: 1.125rem; line-height: 1.625; color: rgba(var(--ic-foreground-rgb), .7); }
.contact-cta { margin-top: 2.5rem; }
.contact-form-btn {
  height: 3.5rem;
  padding: 0 2rem;
  font-size: 1.125rem;
  line-height: 1.75rem;
  box-shadow: var(--ic-shadow-lg);
  transition: all .15s cubic-bezier(.4,0,.2,1);
}
.contact-form-btn:hover { box-shadow: var(--ic-shadow-xl); }
.contact-form-btn svg { margin-left: 0.75rem; }
.contact-note { margin-top: 3rem; padding: 1.5rem; border: 1px solid var(--ic-accent); border-radius: var(--ic-radius); background-color: hsl(240 4.8% 95.9% / .3); }
.contact-note p { font-size: 0.875rem; line-height: 1.25rem; font-style: italic; color: rgba(var(--ic-foreground-rgb), .8); }
.contact-info { padding: 2rem; border-radius: var(--ic-radius); background-color: var(--ic-secondary); box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); }
.contact-info .contact-heading { padding-bottom: 1rem; border-bottom: 1px solid rgba(var(--ic-foreground-rgb), .1); }
.contact-info-list { margin-top: 2rem; }
.contact-info-list > * + * { margin-top: 2rem; }
.contact-info-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-info-icon { padding: 0.75rem; border-radius: 9999px; background-color: var(--ic-accent); color: var(--ic-secondary-foreground); transition: color .15s, background-color .15s; }
.contact-info-icon svg { width: 1.5rem; height: 1.5rem; }
.contact-info-item:hover .contact-info-icon { background-color: var(--ic-primary); color: var(--ic-primary-foreground); }
.contact-info-item h3 { font-weight: 700; font-size: 1.125rem; line-height: 1.75rem; }
.contact-info-item p { color: rgba(var(--ic-foreground-rgb), .8); }
.contact-info-item a { display: block; margin-top: 0.25rem; color: var(--ic-primary); }
.contact-info-item a:hover { color: var(--ic-primary); text-decoration: underline; }

/* ---------- Join us ---------- */
.join-grid { max-width: 64rem; margin-left: auto; margin-right: auto; }
.join-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.5rem; }
.join-card.is-featured { border: 2px solid var(--ic-primary); box-shadow: var(--ic-shadow-2xl); }
.join-icon { margin-bottom: 1.5rem; padding: 1.25rem; border-radius: 9999px; background-color: rgba(var(--ic-primary-rgb), .1); }
.join-icon svg { width: 3rem; height: 3rem; color: var(--ic-primary); }
.join-card-title { font-family: var(--ic-font-headline); font-weight: 600; letter-spacing: -0.025em; font-size: 1.5rem; line-height: 2rem; }
.join-card-text { margin-top: 1rem; flex-grow: 1; font-size: 1rem; line-height: 1.5rem; color: var(--ic-muted-foreground); }
.join-card .ic-btn { margin-top: 2rem; width: 100%; }

/* ---------- Footer ---------- */
.site-footer { background-color: var(--ic-secondary); color: var(--ic-secondary-foreground); }
.footer-inner { padding-top: 3rem; padding-bottom: 3rem; }
.footer-brand > * + * { margin-top: 1rem; }
.footer-small { font-size: 0.875rem; line-height: 1.25rem; }
.footer-heading { font-family: var(--ic-font-headline); font-weight: 700; font-size: 1.125rem; line-height: 1.75rem; margin-bottom: 1rem; }
.footer-links > * + *, .footer-contact > * + * { margin-top: 0.5rem; }
.site-footer a { transition: color .15s cubic-bezier(.4,0,.2,1); }
.site-footer a:hover { color: var(--ic-primary); }
.footer-social { display: flex; margin-top: 1rem; }
.footer-social > * + * { margin-left: 1rem; }
.footer-bottom { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--ic-border); text-align: center; font-size: 0.875rem; line-height: 1.25rem; color: var(--ic-muted-foreground); }
