/* ═══════════════════════════════════════════════════════
   Tennis Ireland Foundation — Stylesheet
   Design: ISF wave aesthetic + Team Ireland Foundation
   palette blended with Tennis Ireland teal branding
   ═══════════════════════════════════════════════════════ */

/* ─── Variables ─── */
:root {
  --navy:        #0a2540;
  --navy-mid:    #0d2f4e;
  --teal:        #00D6DB;
  --teal-dark:   #009da2;
  --light-bg:    #f0feff;
  --white:       #ffffff;
  --text-dark:   #182522;
  --text-mid:    #4a6070;
  --border:      rgba(10, 37, 64, 0.08);
  --footer-bg:   #071828;
  --transition:  0.3s ease;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --radius-full: 9999px;
  --shadow-sm:   0 4px 16px rgba(10,37,64,0.08);
  --shadow-md:   0 8px 32px rgba(10,37,64,0.14);
  --shadow-lg:   0 16px 56px rgba(10,37,64,0.18);
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  line-height: 1.65;
  background: var(--white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 0.9rem; }

p {
  color: var(--text-mid);
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

/* ─── Layout Utilities ─── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 90px 0;
}

.text-center { text-align: center; }
.text-white { color: var(--white) !important; }

/* ─── Section Labels ─── */
.section-label {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 10px;
}

.section-label.light {
  color: var(--teal);
}

.section-header {
  margin-bottom: 52px;
}

.section-intro {
  color: var(--text-mid);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 14px auto 0;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 30px;
  border-radius: var(--radius-full);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-teal {
  background: var(--teal);
  color: var(--navy);
  border-color: var(--teal);
}
.btn-teal:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,214,219,0.35);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-navy:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-white {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn-white:hover {
  background: var(--light-bg);
  transform: translateY(-1px);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn-large {
  padding: 16px 42px;
  font-size: 0.95rem;
}

/* ─── Wave Dividers ─── */
.wave-div {
  line-height: 0;
  display: block;
  margin: 0;
}

.wave-div svg {
  display: block;
  width: 100%;
}

/* ═══ HEADER ═══ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(10, 37, 64, 0.06);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 2px 24px rgba(10, 37, 64, 0.1);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 70px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  margin-right: 8px;
}

.nav-links a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
  color: var(--teal-dark);
  background: var(--light-bg);
}

.nav-cta {
  padding: 9px 22px;
  font-size: 0.82rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ═══ HERO ═══ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://www.tennisireland.ie/wp-content/uploads/2022/10/O-Hare-Carr-IRL_6_S1A7385-scaled.jpg');
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.08);
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    145deg,
    rgba(7, 24, 40, 0.92) 0%,
    rgba(10, 37, 64, 0.80) 50%,
    rgba(0, 150, 160, 0.25) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 700px;
  margin: 0 auto;
  padding: 140px 24px 110px;
  text-align: center;
}

.eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 18px;
  display: block;
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 22px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-sub {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 38px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.wave-bottom {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 3;
}

.wave-bottom svg {
  display: block;
  width: 100%;
}

/* ═══ ABOUT ═══ */
.about {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.img-ellipse-wrap {
  position: relative;
  padding-bottom: 115%;
  overflow: hidden;
  border-radius: 60% 60% 50% 50% / 55% 55% 45% 45%;
  box-shadow: 0 24px 70px rgba(0, 214, 219, 0.18), 0 4px 20px rgba(10,37,64,0.1);
}

.img-ellipse-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h2 {
  margin-bottom: 22px;
}

.about-text p {
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.75;
}

.about-text .btn {
  margin-top: 10px;
}

/* ═══ PILLARS ═══ */
.pillars {
  background: var(--light-bg);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.pillar-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.pillar-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-md);
}

.pillar-img-wrap {
  height: 210px;
  overflow: hidden;
}

.pillar-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.pillar-card:hover .pillar-img-wrap img {
  transform: scale(1.06);
}

.pillar-body {
  padding: 26px;
}

.pillar-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
  line-height: 1;
}

.pillar-body h3 {
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.pillar-body p {
  font-size: 0.93rem;
  line-height: 1.65;
}

/* ═══ IMPACT ═══ */
.impact {
  background: var(--navy);
  padding: 100px 0;
}

.impact .section-header {
  margin-bottom: 56px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat {
  padding: 36px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  transition: background var(--transition), border-color var(--transition);
}

.stat:hover {
  background: rgba(0, 214, 219, 0.06);
  border-color: rgba(0, 214, 219, 0.3);
}

.stat-num {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 900;
  color: var(--teal);
  margin-bottom: 10px;
  line-height: 1;
}

.stat-label {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ═══ NEWS ═══ */
.news {
  background: var(--white);
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 44px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.news-img-wrap {
  height: 210px;
  overflow: hidden;
}

.news-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.news-card:hover .news-img-wrap img {
  transform: scale(1.05);
}

.news-body {
  padding: 24px;
}

.news-date {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.news-body h3 {
  font-size: 1.02rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.news-body h3 a {
  color: var(--navy);
  transition: color var(--transition);
}

.news-body h3 a:hover {
  color: var(--teal-dark);
}

.news-body p {
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.65;
}

.read-more {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal-dark);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition), gap var(--transition);
}

.read-more:hover {
  color: var(--navy);
  gap: 8px;
}

/* ═══ SPONSORS ═══ */
.sponsors {
  background: #f4f7f9;
  padding: 64px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sponsors-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 40px;
}

.sponsors-row {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-items: center;
  justify-content: center;
}

.sponsors-row img {
  height: 46px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: filter var(--transition), opacity var(--transition), transform var(--transition);
}

.sponsors-row img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

/* ═══ DONATE CTA ═══ */
.donate-cta {
  position: relative;
  background: var(--navy);
  padding: 110px 0;
  overflow: hidden;
}

.donate-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://www.tennisireland.ie/wp-content/uploads/2023/12/Background-Tennis-Court.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.12;
}

.donate-inner {
  position: relative;
  z-index: 1;
}

.donate-cta h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.donate-desc {
  color: rgba(255, 255, 255, 0.78);
  max-width: 540px;
  margin: 0 auto 44px;
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ─── Donate Form ─── */
.donate-form {
  max-width: 520px;
  margin: 0 auto;
}

.donate-form fieldset {
  border: none;
  padding: 0;
  margin: 0 0 28px;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.amount-btn {
  padding: 16px 10px;
  border-radius: var(--radius-full);
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: var(--white);
  transition: all var(--transition);
}

.amount-btn:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.amount-btn.selected {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.amount-btn--other {
  font-size: 0.85rem;
}

.custom-amount-wrap {
  margin-bottom: 4px;
}

.custom-amount-input-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: border-color var(--transition);
}

.custom-amount-input-group:focus-within {
  border-color: var(--teal);
  background: rgba(255, 255, 255, 0.15);
}

.currency-symbol {
  padding: 0 4px 0 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

.custom-amount-input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 14px 20px 14px 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  width: 100%;
}

.custom-amount-input-group input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
}

.custom-amount-input-group input::-webkit-inner-spin-button,
.custom-amount-input-group input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.donate-submit {
  width: 100%;
  margin-bottom: 14px;
  opacity: 0.45;
  cursor: not-allowed;
  transition: all var(--transition);
}

.donate-submit:not(:disabled) {
  opacity: 1;
  cursor: pointer;
}

.donate-note {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .amount-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══ FOOTER ═══ */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.65);
  padding-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 52px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
  filter: brightness(0) invert(1);
  opacity: 0.88;
  margin-bottom: 18px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.75;
  max-width: 340px;
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  transition: background var(--transition), color var(--transition);
}

.social-links a:hover {
  background: var(--teal);
  color: var(--navy);
}

.footer-nav h4,
.footer-contact h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 22px;
  font-weight: 700;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--teal);
}

.footer-contact address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.6;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.footer-contact a:hover {
  color: var(--teal);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 22px 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.4);
  transition: color var(--transition);
}

.footer-bottom a:hover {
  color: var(--teal);
}

.footer-credit {
  color: rgba(255, 255, 255, 0.28) !important;
}

/* ═══ SCROLL ANIMATIONS ═══ */
.fade-up,
.fade-left,
.fade-right {
  opacity: 0;
  transition: opacity 0.75s ease, transform 0.75s ease;
  transition-delay: var(--delay, 0s);
}

.fade-up    { transform: translateY(32px); }
.fade-left  { transform: translateX(-32px); }
.fade-right { transform: translateX(32px); }

.in-view {
  opacity: 1 !important;
  transform: translate(0, 0) !important;
}

/* ═══ RESPONSIVE ═══ */

/* Tablet */
@media (max-width: 980px) {
  .section { padding: 70px 0; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-image {
    max-width: 380px;
    margin: 0 auto;
  }

  .pillars-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .news-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-brand p {
    max-width: 100%;
  }
}

/* Mobile */
@media (max-width: 720px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px 24px 28px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(10, 37, 64, 0.12);
    z-index: 999;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }

  .amount-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content {
    padding: 130px 24px 100px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}
