/* ==========================================================
   Stortford Archery Club — Site Stylesheet (v4)
   Deployed as /new.css (linked in <head> as /new.css)
   ========================================================== */

/* ----------------------------------------------------------
   1. Design tokens
   ---------------------------------------------------------- */
:root{
  --green:#009900;
  --green-dark:#006600;
  --green-soft:#e8f5e8;
  --text:#333333;
  --muted:#5c6a5c;
  --border:#d7dfd7;
  --bg:#eef2ee;
  --dark:#1f2a1f;
  --radius:10px;
  --shadow:0 1px 3px rgba(0,0,0,.05);
  --max:1100px;
}

/* ----------------------------------------------------------
   2. Base
   ---------------------------------------------------------- */
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Arial, Verdana, Helvetica, sans-serif;
  font-size:15px;
  line-height:1.6;
}

/* IMPORTANT: no global max-width on images — the legacy pages use
   fixed-size image menus (140x15) and a global rule collapses them. */
img{border:0;}

a{color:var(--green-dark);text-decoration:none;}
a:hover{text-decoration:underline;}

h1,h2,h3,h4,h5,h6{
  color:var(--green-dark);
  font-family:inherit;
  line-height:1.25;
  margin:0 0 .5em;
  font-weight:700;
}
h1{font-size:26px;}
h2{font-size:20px;}
h3{font-size:17px;}

p{margin:0 0 1em;}
ul,ol{margin:0 0 1em;padding-left:1.4em;}
hr{border:0;border-top:1px solid var(--border);margin:1.5em 0;}
small{font-size:.85em;}

/* ----------------------------------------------------------
   3. Legacy compatibility
   ---------------------------------------------------------- */

/* 3a. Centre the old top-level layout tables so pages sit nicely */
body > table,
body > p > table,
body > center > table,
body > div > table{
  max-width:var(--max);
  margin-left:auto;
  margin-right:auto;
}

/* 3b. Links sitting on the green navigation cells stay white */
th[bgcolor="#009900"] a, td[bgcolor="#009900"] a,
th[bgcolor="#006600"] a, td[bgcolor="#006600"] a,
th[bgcolor="#089002"] a, td[bgcolor="#089002"] a,
th[bgcolor="#00A300"] a, td[bgcolor="#00A300"] a{
  color:#ffffff;
}

/* 3c. Marquee notice bar */
marquee{
  display:block;
  background:var(--green-soft);
  color:#2f4a2f;
  padding:10px 12px;
  border-radius:6px;
  font-size:14px;
}

/* 3d. Forms (search page) */
input,select,textarea,button{font:inherit;color:inherit;}
input[type="text"],
input[type="search"],
input:not([type]),
textarea,
select{
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:6px;
  background:#ffffff;
  max-width:100%;
}
input[type="submit"],
input[type="button"],
button{
  background:var(--green);
  color:#ffffff;
  border:0;
  border-radius:6px;
  padding:9px 18px;
  font-weight:700;
  cursor:pointer;
}
input[type="submit"]:hover,
input[type="button"]:hover,
button:hover{background:var(--green-dark);}

/* 3e. Legacy class overrides */
.style1,.price{color:var(--green-dark);font-family:inherit;}
.style2,.about_lrg{color:var(--green-dark);font-family:inherit;}
.style4,.style41,.style44{color:#ffffff;font-family:inherit;}
.style13{font-weight:700;font-size:12px;font-family:inherit;}
.style18{font-weight:700;font-family:inherit;}
.style20{font-size:14px;font-weight:700;font-family:inherit;}
.style21,.style46{font-size:22px;color:var(--green-dark);font-weight:700;font-family:inherit;}
.style23,.style32{font-family:inherit;color:var(--text);}
.style24,.style40{color:var(--green-dark);}
.style26{font-size:.85em;}
.style29{color:var(--text);}
.style33{font-size:12px;font-family:inherit;}
.style34{font-family:inherit;font-size:12px;font-weight:700;color:var(--green-dark);}
.style35{font-size:18px;font-family:inherit;}
.style36{font-family:inherit;font-size:18px;font-weight:700;color:var(--green-dark);}
.style39{font-family:inherit;color:var(--green-dark);font-weight:700;font-size:18px;}
.style42{font-weight:700;font-size:12px;font-family:inherit;}
.style43{font-family:inherit;}
.style47,.style48{font-size:14px;font-family:inherit;}

/* ----------------------------------------------------------
   4. New components (scoped box-sizing)
   ---------------------------------------------------------- */
.site-header,.site-header *,
.announce,.announce *,
.wrapper,.wrapper *,
.site-footer,.site-footer *{box-sizing:border-box;}

.site-header{background:linear-gradient(135deg,#00a300,#006600);color:#ffffff;box-shadow:0 2px 6px rgba(0,0,0,.15);}
.site-header__inner{max-width:var(--max);margin:0 auto;padding:18px 20px;display:flex;align-items:center;gap:18px;}
.site-logo{width:62px;height:62px;object-fit:contain;background:#ffffff;border-radius:10px;padding:5px;flex:0 0 auto;}
.site-title{margin:0;font-size:26px;line-height:1.2;font-weight:700;letter-spacing:.3px;color:#ffffff;}

.announce{background:var(--green-soft);border-bottom:1px solid var(--border);}
.announce__inner{max-width:var(--max);margin:0 auto;padding:12px 20px;display:flex;gap:12px;align-items:flex-start;font-size:14px;color:#2f4a2f;}
.announce__inner::before{content:"";flex:0 0 6px;width:6px;align-self:stretch;border-radius:3px;background:var(--green);}

.wrapper{max-width:var(--max);margin:26px auto;padding:0 20px;display:flex;gap:26px;align-items:flex-start;}

.sidebar{flex:0 0 250px;background:#ffffff;border:1px solid var(--border);border-radius:var(--radius);padding:12px;box-shadow:var(--shadow);}
.nav-list{list-style:none;margin:0;padding:0;}
.nav-list a{display:flex;align-items:center;gap:9px;padding:8px 9px;border-radius:6px;font-size:13.5px;font-weight:600;color:#2f3a2f;transition:background .15s ease,color .15s ease;}
.nav-list a:hover{background:var(--green-soft);color:var(--green-dark);text-decoration:none;}
.nav-list img{width:14px;height:14px;flex:0 0 14px;border-radius:50%;}

.content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:20px;}
.card{background:#ffffff;border:1px solid var(--border);border-radius:var(--radius);padding:22px 24px;box-shadow:var(--shadow);}
.card img{max-width:100%;height:auto;}          /* responsive images ONLY inside cards */
.card--flush{padding:0;overflow:hidden;}
.card--flush img{display:block;width:100%;}
.card h2{margin:0 0 14px;font-size:18px;color:var(--green-dark);}
.label{margin:0 0 6px;color:var(--green-dark);font-weight:700;font-size:15px;}
.address{margin:0;font-style:normal;color:#3a463a;line-height:1.7;}

.affil{width:100%;border-collapse:collapse;max-width:100%;}
.affil td{padding:12px 10px;border-bottom:1px solid var(--border);vertical-align:middle;}
.affil tr:last-child td{border-bottom:none;}
.affil td:first-child{width:130px;text-align:center;}
.affil img{max-height:50px;width:auto;}

.notice p{margin:0 0 8px;}
.notice p:last-child{margin-bottom:0;}
.lead{margin:0 0 8px;text-align:center;color:var(--green-dark);font-weight:700;font-size:17px;}
.lead:last-child{margin-bottom:0;}

.env{display:flex;align-items:center;gap:20px;}
.env img{width:70px;height:auto;flex:0 0 auto;}
.env p{margin:0 0 6px;}
.env p:last-child{margin-bottom:0;}

.site-footer{background:var(--dark);color:#cfd8cf;margin-top:40px;}
.site-footer__inner{max-width:var(--max);margin:0 auto;padding:20px;font-size:13px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;}
.site-footer p{margin:0;}
.site-footer a{color:#a9d6a9;}

/* ----------------------------------------------------------
   5. Utilities
   ---------------------------------------------------------- */
.text-center{text-align:center;}
.text-left{text-align:left;}
.text-right{text-align:right;}
.mb-0{margin-bottom:0;}

/* ----------------------------------------------------------
   6. Responsive
   ---------------------------------------------------------- */
@media (max-width:820px){
  .wrapper{flex-direction:column;}
  .sidebar{flex:1 1 auto;width:100%;}
  .site-title{font-size:22px;}
  .env{flex-direction:column;text-align:center;}
}

/* ----------------------------------------------------------
   7. Print
   ---------------------------------------------------------- */
@media print{
  body{background:#ffffff;color:#000000;}
  .site-header,.announce,.sidebar,.site-footer{display:none;}
  .wrapper{display:block;margin:0;padding:0;}
  .card{border:none;box-shadow:none;padding:0;margin-bottom:1em;}
}