/* ===== Clerihan GAA – Theme & Visual Polish (clean) ===== */

/* ---------- Theme Variables ---------- */
:root {
    --brand: #027a3a;
    --brand-dark: #09681f;
    --accent: #b30000;
    --text: #1e1e1e;
    --muted: #6a6a6a;
    --bg: #fafafa;
    --border: #e6e6e6;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(0,0,0,0.07);
  }
  
  /* ---------- Reset ---------- */
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; height: 100%; }
  img { max-width: 100%; display: block; }
  
  /* ---------- Base & Layout (sticky footer) ---------- */
  body {
    font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  main {
    max-width: 2000px;
    width: 80%; 
    margin: 0 auto;
    padding: 24px;
    text-align: center;
    flex: 1 0 auto; /* push footer down on short pages */
  }
  
  footer { flex-shrink: 0; }
  
  main img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
  }
  
  /* ---------- Typography ---------- */
  h1, h2, h3 { letter-spacing: -0.02em; margin: 0 0 12px; }
  h1 { font-size: clamp(1.6rem, 2.5vw, 2rem); }
  h2 {
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    padding-left: 10px;
    margin-bottom: 14px;
    font-weight: 600;
  }
  h3 { font-size: clamp(1.1rem, 1.8vw, 1.3rem); }
  
/* ---------- Header / Nav ---------- */
header {
  background: linear-gradient(
    to bottom,
    #000 0%,
    #000 3%,          /* thin black strip at top */
    #027a3a 3%,
    #027a3a 97%,      /* rich Clerihan jersey green */
    #000 97%,
    #000 100%         /* thin black strip at bottom */
  );
  color: #fff;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
  .club-crest,
  .hero-crest {
    display: block;
    margin: 12px auto 6px;
    height: auto;
    width: auto;
    max-height: 80px; /* adjust if needed */
  }
  
  header h1 { text-align: center; color: #fff; }
  
  nav ul {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 10px 16px 16px;
    justify-content: center;
  }
  
  nav a {
    text-decoration: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background .2s ease;
  }
  nav a:hover { background: rgba(255,255,255,0.15); }
  nav a.active { background: #fff; color: #006b3c; font-weight: 600; }
  
  /* ---------- Global Links (modern, green) ---------- */
  main a, section a, .card a, footer a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
  }
  main a:hover, section a:hover, .card a:hover, footer a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  main a:visited { color: var(--brand); }
  
  /* Optional CTA arrow */
  .link-arrow { display: inline-flex; align-items: center; gap: 6px; }
  .link-arrow::after { content: "→"; transition: transform .15s ease; }
  .link-arrow:hover::after { transform: translateX(2px); }
  
  /* ---------- Buttons ---------- */
  .btn {
    background: linear-gradient(135deg,  #027a3a 0%,#027a3a 100% );
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s ease, transform .05s ease;
  }
  .btn:hover { background: var(--brand-dark); }
  .btn:active { transform: translateY(1px); }
  .btn.small { padding: 6px 10px; font-size: 0.93rem; }
  .btn.danger { background: var(--accent); }
  .btn.danger:hover { background: #8f0000; }
  
  /* ---------- Forms ---------- */
  .contact-form input,
  .contact-form textarea,
  .contact-form select {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid #cfcfcf;
    border-radius: 10px;
    background: #fff;
    transition: box-shadow .2s ease, border-color .2s ease;
  }
  .contact-form input:focus,
  .contact-form textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(11,122,36,.15);
  }
  label strong { font-weight: 600; }
  
  /* ---------- Cards ---------- */
  .card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
  }
  
  /* ---------- News ---------- */
  .news-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 16px;
    text-align: left;
  }
  .news-item h3 { margin-bottom: 6px; }
  .news-item .actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
  .news-thumb {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
  }
  
  /* ---------- Fixtures ---------- */
  #fixture-list {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    list-style: none;
    margin: 0;
  }
  #fixture-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 6px;
    border-bottom: 1px dashed #e7e7e7;
  }
  #fixture-list li:last-child { border-bottom: none; }
  
  /* ---------- Gallery ---------- */
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 16px;
  }
  .img-box {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #f2f2f2;
    position: relative;
  }
  .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.0001);
    transition: transform .3s ease, filter .3s ease;
  }
  .img-box img:hover {
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.03);
  }

  .gallery-page .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));  
  }
  
  /* ---------- Footer ---------- */
  footer {
    background: #f4faf6;
    border-top: 2px solid var(--brand);
    padding: 16px 0;
    color: #444;
    text-align: center;
    margin-top: 36px;
  }
  
  /* ---------- Responsive tweaks ---------- */
  @media (max-width: 640px){
    .club-crest, .hero-crest { max-height: 64px; } /* smaller crest on mobile */
    main { padding: 18px; }
    nav ul { gap: 6px; }
  }

.admin-page h1 { font-size: clamp(2rem, 3vw, 2.4rem); }
.admin-page h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); }

.admin-page .contact-form input,
.admin-page .contact-form textarea,
.admin-page .contact-form select {
  width: 100%;
  max-width: 100%;
  padding: 14px 16px;
  font-size: 1.05rem;
  border-radius: 12px;
}


.admin-page label,
.admin-page label strong {
  font-size: 1.05rem;
  line-height: 1.4;
}

.admin-page .btn {
  padding: 12px 18px;
  font-size: 1rem;
  border-radius: 12px;
}

@media (max-width: 640px) {
  .admin-page .contact-form input,
  .admin-page .contact-form textarea,
  .admin-page .contact-form select {
    max-width: 100%;
    font-size: 1.05rem;
  }
}

/* --- News page: make <main> fill the full width --- */
body.news-page main {
    margin: 0 auto !important;     /* keep it centered */
    width: 100% !important;
    max-width: 1100px !important;  /* fixed centered column width */
    text-align: center !important; /* everything inside is centered */
    padding: 24px 16px;
  }
  
  /* News feed & fixtures lists take full width of that column */
  body.news-page #latest-news,
  body.news-page #upcoming-fixtures {
    width: 100%;
    margin: 0 auto 24px;
    text-align: center;            /* center text in sections */
  }
  
  body.news-page #news-feed {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  body.news-page .news-item {
    width: 100%;
    text-align: center;             /* center inside cards */
  }
  
  body.news-page #fixture-list {
    width: 100%;
    text-align: center;             /* center inside list */
  }
  
  body.news-page #fixture-list li {
    justify-content: center;        /* center fixture text */
  }
  
  /* ====== Hero Carousel (uses your palette) ====== */
  .hero-carousel{
    position: relative;
    overflow: hidden;
    /* fill the screen minus the sticky header */
    height: calc(100svh - var(--header-h));
    /* give it a healthy floor so it's never tiny */
    min-height: 680px;
    background: #000;
  }
  
.slides{margin:0; padding:0; list-style:none; height:100%; position:relative}

.slide{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center; 
  opacity:0;
  transform:scale(1.02);
  transition:opacity .6s ease, transform .6s ease;
}

.slide:nth-child(3) {
  background-position: center 30%;
}
.slide::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,.05) 25%, rgba(0,0,0,.55) 100%);
}
.slide.is-active{opacity:1; transform:scale(1)}

.slide-overlay{
  position:absolute; left:max(16px, calc(50% - 560px)); right:16px; bottom:36px; z-index:2;
  color:#fff; text-shadow:0 2px 8px rgba(0,0,0,.35);
}
.slide-overlay h2{margin:0 0 6px; font-size:clamp(24px, 4vw, 44px)}
.slide-overlay p{margin:0; font-size:clamp(14px, 2vw, 18px); opacity:.95}

/* Controls */
.ctrl{
  position:absolute; top:50%; transform:translateY(-50%);
  background:#ffffffd9; border:none; width:40px; height:40px; border-radius:999px;
  display:grid; place-items:center; font-size:24px; cursor:pointer; z-index:3;
  color: var(--text);
}
.ctrl:hover{background:#fff}
.ctrl.prev{left:16px}
.ctrl.next{right:16px}

/* Dots */
.dots{
  position:absolute; left:50%; transform:translateX(-50%);
  bottom:14px; display:flex; gap:8px; z-index:3;
}
.dot{width:9px; height:9px; border-radius:999px; border:0; background:#cbd5e1; cursor:pointer}
.dot.is-active{background:#ffffff}

/* ---- Optional: nav underline + mobile toggle, using your colours ---- */
nav a { position:relative }
nav a::after{
  content:""; position:absolute; left:8px; right:8px; bottom:2px; height:2px;
  background:transparent; width:0; transition:width .2s ease, background .2s ease;
}
nav a:hover::after, nav a.active::after{ background:#fff; width:calc(100% - 16px) }

/* Mobile dropdown for your existing nav */
.nav-toggle{ 
  display:none; 
  background:transparent; 
  border:2px solid #fff; 
  color:#fff;
  border-radius:8px; 
  padding:4px 8px; 
  margin-left:12px; 
  cursor: pointer;
}

@media (max-width: 900px){
  .nav-toggle{ display:inline-block }
  
  nav {
    position: relative; /* needed for absolute positioning of ul */
  }
  
  nav ul{
    position: absolute; 
    left: 16px;                        /* align to left edge, not center */
    top: calc(100% + 6px);             /* below the nav */
    background: #027a3a;               /* match your header green */
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 12px; 
    padding: 10px; 
    flex-direction: column; 
    gap: 6px; 
    display: none;
    box-shadow: 0 12px 28px rgba(0,0,0,.2);
    min-width: 200px;                  /* give it a decent width */
    z-index: 200;                      /* ensure it's on top */
  }
  
  nav ul.open{ display: flex }
  
  /* Ensure nav links look good in dropdown */
  nav ul li {
    width: 100%;
  }
  
  nav ul a {
    display: block;
    width: 100%;
    text-align: left;
  }
}

/* use your existing card + contact-form; just grid + spacing helpers */
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.admin-full { grid-column: 1 / -1; }

.admin-section { margin-bottom: 22px; }
.admin-actions { display: flex; gap: 10px; align-items: center; }

/* Table polish (reuses your tokens) */
.table {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.96rem; }
.table th { background: #f9fafb; text-align: left; font-weight: 700; color: #374151; }
.table tr:last-child td { border-bottom: none; }
.table .actions { display: flex; gap: 8px; }

/* Status badge */
.badge {
  display: inline-flex; align-items: center; padding: 3px 8px;
  background: #eefaf1; color: var(--brand); border-radius: 999px; font-size: 12px; font-weight: 600;
}

/* Subtle info/warn boxes */
.notice { background:#fff; border:1px solid var(--border); border-left:4px solid var(--brand);
  padding: 12px 14px; border-radius: var(--radius); color:#333; }

/* Make labels consistent (left) on admin */
.admin-page .contact-form label { display:block; text-align:left; margin-bottom:6px; color: var(--muted); }

.teams-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.teams-table thead th {
  background: #f9fafb;
  text-align: left;
  font-weight: 700;
  color: #374151;
  padding: 14px 16px;
  font-size: 0.98rem;
  white-space: nowrap;
}

.teams-table tbody td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

/* make ID & Created a bit narrower so name/desc get space */
.teams-table th:nth-child(1),
.teams-table td:nth-child(1) { width: 70px; }
.teams-table th:nth-child(5),
.teams-table td:nth-child(5) { width: 140px; }

/* Inline edit area */
.inline-edit:not(.update-form) {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}


/* Bigger inputs for easier editing */
.inline-edit input[type="text"],
.inline-edit input:not([type]) {
  padding: 12px 14px;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  font-size: 1rem;
  min-width: 220px;         /* was small; now bigger */
  max-width: 320px;
}

.inline-edit input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11,122,36,.12);
}


/* Make inputs expand nicely */
.actions-cell .update-form input[type="text"],
.actions-cell .update-form input:not([type]) {
  width: 100%;
}

/* Slightly larger buttons in this table */
.teams-table .btn.small {
  padding: 10px 14px;
  font-size: 0.98rem;
  border-radius: 10px;
}

/* Deleted row state (if you use it) */
.teams-table tr.is-deleted td {
  opacity: .6;
  background: #f8faf8;
}

/* Actions: stack and right-align */
.actions-cell {
  display: grid;
  justify-items: end;      /* right edge */
  gap: 10px;               /* space between Update and Delete */
  width: 100%;
}

.update-form input[type="text"],
.update-form input:not([type]) { width: 100%; }

/* Delete sits directly under Update, right-aligned by parent grid */
.delete-form { margin: 0; }

/* Actions area: inputs first, then a row with Update + Delete side-by-side on the right */
.actions-cell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;          /* row will stretch full width */
}

/* Inputs stack vertically; keep them reasonably wide but not full table width */
.update-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
            /* tweak if you want wider/narrower inputs */
  align-self: flex-end;          /* align inputs block to the right column edge */
}

.update-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  font-size: 1rem;
}

/* The button row: side-by-side, right aligned */
.actions-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;     /* push buttons to the right */
}

.actions-row .btn {              /* both buttons */
  padding: 10px 14px;
  font-size: 0.98rem;
  border-radius: 10px;
}


/* Make admin link buttons look like real buttons */
a.btn {
  display: inline-block;
  text-align: center;
  color: #fff !important;    /* ensure white text */
  text-decoration: none;     /* remove underline */
  line-height: 1.2;          /* fix squashed text */
}

.admin-page main { 
  max-width: 2000px !important; 
  text-align: left; 
}

.login-page main {
  max-width: 500px !important;  /* Narrow width for login form */
}

.login-page .contact-form {
  max-width: 100%;
}

.contact-page main {
  max-width: 800px !important;  /* Comfortable reading width for contact form */
  width: 100%;
}

/* Teams page - same width as news page */
body.teams-page main {
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 1100px !important;
  text-align: center !important;
  padding: 24px 16px;
}

.team-section {
  margin-bottom: 40px;
  text-align: center;
  width: 100%;
}

.team-section img {
  width: 100%;
  max-width: 700px;
  border-radius: 12px;
  margin: 15px auto 0;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.team-section h2 {
  font-size: 2rem;
  margin-bottom: 5px;
}

.team-description {
  max-width: 700px;
  margin: 0 auto 20px;
  font-size: 1rem;
}
.contact-page section {
  margin-bottom: 40px;
}

.contact-page h2 {
  margin-top: 0;  /* Changed from 40px */
  margin-bottom: 20px;
}

.contact-page p {
  margin-bottom: 20px;
}

.contact-page .contact-form {
  margin-bottom: 40px;
}

.contact-page .contact-form label {
  margin-top: 16px;
  margin-bottom: 8px;
}

.contact-page .contact-form input,
.contact-page .contact-form textarea {
  margin-bottom: 24px;
}

.contact-page .btn {
  margin-top: 10px;
}

.coaching-page ul {
  list-style: none;
  padding-left: 0;
}

.coaching-page p,
.coaching-page li {
  line-height: 1.8; 
}

.coaching-page h2 {
  font-weight: 700;
  position: relative;
  display: inline-block;
}
.coaching-page h2::after {
  content: "";
  position: absolute;
  left: 0;
  width: 60%;
  height: 3px;
  border-radius: 2px;
}

.coaching-page .hero-crest {
  margin-bottom: 20px !important;
}

.map-container {
  width: 100%;
  margin: 20px 0;
}

.map-container iframe {
  width: 100%;
  height: 500px;
  border-radius: 12px;
}

@media (min-width: 768px) {
  .map-container iframe {
    height: 600px;
  }
}