:root {
  --color-bg: #f8fafc;
  --color-text: #374151;
  --color-heading: #1a4d2e;
  --color-primary: var(--dynamic-primary, #2d9d67);
  --color-accent: var(--dynamic-accent, #d86a3f);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow-hover: 0 8px 24px rgba(0,0,0,.15);
  --transition-fast: .3s ease;
  --max-width: 1280px;
  --section-gap: 4.5rem;
  --gradient-hero: linear-gradient(160deg,#1a4d2e 0%,#2d9d67 50%, #1a4d2e 100%);
}

*, *::before, *::after { box-sizing: border-box; }

body { background: var(--color-bg); color: var(--color-text); transition: background .3s ease, color .3s ease; font-feature-settings: "liga" on; }
body { overflow-x: hidden; }
img, video, iframe, embed, object { max-width: 100%; height: auto; }
input, textarea, select, button { max-width: 100%; }
a, p, li, h1, h2, h3, h4, h5, h6, .card, .badge { overflow-wrap: anywhere; }

/* Utility */
.fade-in { animation: fadeIn .6s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px);} to { opacity:1; transform:translateY(0);} }
.section { padding: var(--section-gap) 0; position: relative; }
.section + .section { margin-top: 0; }
.section:nth-child(even) { background: rgba(240,249,244,.35); }
.section-title { font-family:'Playfair Display',serif; font-size:2.25rem; letter-spacing:-.02em; position:relative; margin:0 0 2rem; color: var(--color-heading); }
.section-title:after { content:''; position:absolute; left:0; bottom:-.6rem; width:120px; height:4px; background:linear-gradient(90deg,var(--color-primary), var(--color-accent)); border-radius:2px; }
.section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; flex-wrap:wrap; }

/* Container */
.container { max-width: var(--max-width); margin:0 auto; padding:0 2rem; }

/* Cards */
.card { background:rgba(255,255,255,.96); border:1px solid rgba(26,77,46,.12); border-radius:16px; padding:2rem; box-shadow:0 2px 10px rgba(0,0,0,.05); backdrop-filter:blur(8px); transition:.35s cubic-bezier(.4,0,.2,1); }
.card:hover { box-shadow:0 12px 34px rgba(0,0,0,.12); transform:translateY(-4px); border-color:rgba(45,157,103,.35); }
.card-title { font-size:1.35rem; margin:0 0 .75rem; font-family:'Playfair Display',serif; letter-spacing:-.5px; }
.card-text { font-size:.95rem; line-height:1.55; color:#4a5b64; }

/* Announcement */
.announcement-title { font-size:1.5rem; margin:0 0 .5rem; font-family:'Playfair Display',serif; letter-spacing:-.5px; }
.announcement-date { font-size:.75rem; text-transform:uppercase; letter-spacing:.15em; color:#6b7280; }
.announcement-header { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin-bottom:1rem; }

/* Event cards */
.event-title { font-size:1.25rem; margin:0 0 .75rem; font-family:'Playfair Display',serif; }
.event-details { display:flex; flex-direction:column; gap:.4rem; font-size:.85rem; }
.event-detail { display:flex; align-items:center; gap:.5rem; color:#44545e; }
.event-icon { font-size:1rem; }

/* Grid helpers */
.grid { display:grid; gap:1.75rem; }
.grid-3 { grid-template-columns:1fr; }
@media (min-width:768px){ .grid-3 { grid-template-columns:repeat(3,1fr); } }
.grid-4 { grid-template-columns:1fr; }
@media (min-width:900px){ .grid-4 { grid-template-columns:repeat(4,1fr); } }

/* Gallery */
.gallery-grid { display:grid; gap:1.25rem; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); }
.gallery-card { background:rgba(255,255,255,.96); border:1px solid rgba(26,77,46,.12); border-radius:16px; padding:.75rem; box-shadow:0 2px 10px rgba(0,0,0,.05); display:flex; flex-direction:column; gap:.6rem; }
.gallery-thumb { display:block; aspect-ratio:4/3; overflow:hidden; border-radius:10px; background:#0f1c17; }
.gallery-thumb img { width:100%; height:100%; object-fit:cover; transition:transform .4s ease; display:block; }
.gallery-thumb:hover img { transform:scale(1.04); }
.gallery-meta { display:flex; flex-direction:column; gap:.25rem; font-size:.85rem; }
.gallery-title { font-weight:600; color:#1f2937; }
.gallery-date { color:#6b7280; font-size:.75rem; text-transform:uppercase; letter-spacing:.08em; }

/* Buttons */
.btn { display:inline-block; padding:.8rem 1.4rem; border-radius:8px; font-size:.85rem; font-weight:600; cursor:pointer; border:none; background:linear-gradient(135deg,#d86a3f,#c95434); color:#fff; box-shadow:0 2px 10px rgba(216,106,63,.25); transition:.3s; }
.btn:hover { transform:translateY(-2px); box-shadow:0 6px 18px rgba(216,106,63,.35); }
.btn-primary { background:linear-gradient(135deg,var(--color-primary),#1f7d52); box-shadow:0 2px 10px rgba(45,157,103,.25); }
.btn-primary:hover { box-shadow:0 6px 18px rgba(45,157,103,.35); }
.btn-secondary { background:linear-gradient(135deg,#2d9d67,#1f7d52); box-shadow:0 2px 10px rgba(45,157,103,.25); }
.btn-secondary:hover { box-shadow:0 6px 18px rgba(45,157,103,.35); }
.btn-outline { background:#fff; color:#1f2937; border:1px solid #d1d5db; box-shadow:none; }
.btn-sm { padding:.6rem 1rem; font-size:.75rem; }
.btn-full { width:100%; text-align:center; }

/* Forms and alerts */
.form-group { margin-bottom:1rem; }
.form-label { display:block; margin-bottom:.35rem; font-weight:700; color:#374151; }
.form-input,
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="tel"],
.form input[type="number"],
.form input[type="date"],
.form select,
.form textarea {
  width:100%;
  padding:.75rem .9rem;
  border:1px solid rgba(26,77,46,.22);
  border-radius:8px;
  background:#fff;
  color:#1f2937;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.form-input:focus,
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline:none;
  border-color:var(--color-primary);
  box-shadow:0 0 0 3px rgba(45,157,103,.12);
}
.alert { padding:1rem; border-radius:8px; margin-bottom:1rem; border:1px solid transparent; }
.alert-success { background:#dcfce7; border-color:#86efac; color:#166534; }
.alert-error { background:#fee2e2; border-color:#fca5a5; color:#991b1b; }
.alert-warning { background:#fef3c7; border-color:#fcd34d; color:#92400e; }
.alert-info { background:#dbeafe; border-color:#93c5fd; color:#1e40af; }
.link-primary { color:var(--color-primary); font-weight:600; }
.link-primary:hover { text-decoration:underline; }
.text-center { text-align:center; }
.error { color:#991b1b; }

/* Badges */
.badge { display:inline-block; padding:.35rem .75rem; border-radius:999px; font-size:.65rem; font-weight:600; background:linear-gradient(135deg,#daf2e4,#c8ead6); color:#1a6444; letter-spacing:.05em; }
.badge-primary { background:linear-gradient(135deg,#2d9d67,#1f7d52); color:#fff; }

/* Footer */
.footer { background:linear-gradient(135deg,#1a4d2e,#1f7d52); color:#e8f5ef; padding:3.5rem 0 0; margin-top:5rem; position:relative; } 
.footer-container { max-width:var(--max-width); margin:0 auto; padding:0 2rem; }
.footer-grid { display:grid; gap:2.5rem; grid-template-columns:1fr; }
@media (min-width:900px){ .footer-grid { grid-template-columns:2fr 1fr 1fr; } }
.footer-heading { font-family:'Playfair Display',serif; font-size:1.3rem; margin:0 0 1rem; letter-spacing:-.5px; color:#e8f5ef; }
.footer-text { font-size:.85rem; line-height:1.6; }
.footer-links { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.5rem; }
.footer-links a { color:#daf2e4; font-size:.8rem; }
.footer-links a:hover { color:#fff; }
.footer-contact { font-size:.8rem; line-height:1.5; }
.contact-label { font-size:.65rem; text-transform:uppercase; letter-spacing:.15em; color:#b7e4cd; margin:0 0 .25rem; }
.footer-bottom { border-top:1px solid rgba(255,255,255,.15); margin-top:3rem; padding:1.25rem 0; display:flex; flex-direction:column; gap:.75rem; align-items:center; font-size:.65rem; letter-spacing:.05em; }
@media (min-width:700px){ .footer-bottom { flex-direction:row; justify-content:space-between; } }
.footer-bottom-links { display:flex; gap:1rem; }
.footer-bottom-links a { color:#b7e4cd; font-size:.65rem; }
.footer-bottom-links a:hover { color:#fff; }

/* Hero adjustments (when not overridden by inline) */
.hero-title { font-family:'Playfair Display',serif; font-size:3.25rem; letter-spacing:-.03em; margin:0 0 1.2rem; }
.hero-subtitle { font-size:1.15rem; max-width:720px; margin:0 auto; line-height:1.7; color:#4a5b64; }
.hero-wordmark { font-family:'Playfair Display',serif; font-size:1.5rem; margin:0; line-height:1.1; letter-spacing:-.035em; }
.hero-wordmark span { display:block; }
.hero-wordmark .line-2 { font-size:1.25rem; letter-spacing:.2em; font-weight:400; opacity:.9; }
@media (min-width:480px) { .hero-wordmark { font-size:2rem; } .hero-wordmark .line-2 { font-size:1.65rem; } }
@media (min-width:768px) { .hero-wordmark { font-size:3.5rem; } .hero-wordmark .line-2 { font-size:2.8rem; letter-spacing:.25em; } }
@media (min-width:1024px) { .hero-wordmark { font-size:4rem; } .hero-wordmark .line-2 { font-size:3.2rem; } }

/* Accessibility & motion */
@media (prefers-reduced-motion: reduce) {
  .card, .btn, .hero-title, .hero-wordmark { transition:none !important; animation:none !important; }
}

/* Scroll Reveal */
.reveal { opacity:0; transform:translateY(24px); transition:opacity .8s ease, transform .8s cubic-bezier(.22,.61,.36,1); }
.reveal-visible { opacity:1; transform:translateY(0); }
.reveal-delay-1 { transition-delay:.1s; }
.reveal-delay-2 { transition-delay:.2s; }
.reveal-delay-3 { transition-delay:.3s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity:1 !important; transform:none !important; }
}

.responsive-table { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.responsive-table table { width: 100%; border-collapse: collapse; }

@media (max-width: 760px) {
  .container, .footer-container { padding-left: 1rem; padding-right: 1rem; }
  .section { padding: 2rem 0; }
  .section-title { font-size: 1.75rem; }
  .section-head, .announcement-header, .footer-bottom { flex-direction: column; align-items: stretch; }
  .card { padding: 1.15rem; border-radius: 10px; }
  .card:hover { transform: none; }
  .btn { width: 100%; text-align: center; white-space: normal; }
  .grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
  .footer { padding-top: 1.75rem; margin-top: 2rem; }
  .footer-container { padding-left: 1rem; padding-right: 1rem; }
  .footer-grid { gap: 1.35rem; }
  .footer-heading { font-size: 1.05rem; margin-bottom: .5rem; }
  .footer-text { margin: 0; font-size: .8rem; line-height: 1.45; }
  .footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .75rem; }
  .footer-contact > div { margin-bottom: .65rem !important; }
  .footer-bottom { margin-top: 1.35rem; padding: .9rem 0 1.1rem; gap: .55rem; }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; }
  .contact-card-content, .list-item, [style*="display:flex;justify-content:space-between"] { flex-direction: column !important; align-items: stretch !important; gap: .75rem !important; }
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:2fr 1fr"],
  [style*="grid-template-columns:1fr 140px"],
  [style*="grid-template-columns:320px 1fr"],
  [style*="minmax(240px"],
  [style*="minmax(260px"],
  [style*="minmax(320px"],
  [style*="minmax(360px"],
  [style*="minmax(400px"] { grid-template-columns: 1fr !important; }
  [style*="max-width:150px"],
  [style*="max-width:200px"],
  [style*="max-width:220px"],
  [style*="max-width:320px"] { max-width: 100% !important; width: 100% !important; }
  table { max-width: 100%; }
  .responsive-table { overflow: visible; }
  .responsive-table table,
  .responsive-table thead,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table th,
  .responsive-table td { display: block; width: 100%; }
  .responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .responsive-table tr {
    background: #fff;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px;
    padding: .75rem;
    margin-bottom: .85rem;
  }
  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(7rem, 38%) minmax(0, 1fr);
    gap: .75rem;
    align-items: center;
    border: 0 !important;
    padding: .45rem 0 !important;
    overflow-wrap: anywhere;
  }
  .responsive-table td::before {
    content: attr(data-label);
    color: #6b7280;
    font-size: .78rem;
    font-weight: 700;
  }
  .responsive-table td[data-label="Action"],
  .responsive-table td[data-label="Receipt"] {
    display: block;
  }
  .responsive-table td[data-label="Action"]::before,
  .responsive-table td[data-label="Receipt"]::before {
    display: block;
    margin-bottom: .45rem;
  }
}
