/* Shared stylesheet for EDA static site
   - Conservative blue palette
   - Responsive layout using simple CSS (no frameworks)
   - Accessible focus styles
*/

:root{
  /* Conservative BC inspired palette */
  --bg:#f5f8fb;
  --surface:#ffffff;
  --nav-bg:#002957; /* deep navy background */
  --primary:#002957; /* primary deep blue */
  --primary-contrast:#ffffff;
  --muted:#6b7785;
  --accent:#ffc72c; /* gold accent */
  --donate:#c82333; /* donate red */
  --max-width:1000px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:var(--nav-bg); /* entire background dark blue */
  color:var(--primary-contrast); /* white text on dark bg */
  line-height:1.4;
}

.container{max-width:var(--max-width);margin:0 auto;padding:1rem}

.site-header{
  background:var(--nav-bg);
  color:var(--primary-contrast);
  border-bottom:1px solid rgba(255,255,255,0.06);
}
.site-header a{color:var(--primary-contrast)}

/* Allow nav to wrap under header on small screens (dropdown) */
.header-inner{
  display:flex;
  align-items:center;
  gap:1rem;
  justify-content:space-between;
  padding:0.75rem 1rem;
  min-height:64px;
  position:relative;
}

.branding{
  display:flex;
  align-items:center;
  gap:1rem;
  margin-right:auto;
  margin-left:calc(50% - 50vw);
  padding-left:1rem;
  z-index:2;
}
.logo{width:240px;height:auto;max-width:40vw;object-fit:contain}
.site-title{font-size:1.3rem;margin:0;color:var(--primary-contrast);font-weight:700;padding-left:0.8rem}

.site-nav ul{list-style:none;margin:0;padding:0;display:flex;gap:1rem;align-items:center}
.site-nav a{text-decoration:none;color:var(--primary-contrast);padding:.45rem .75rem;border-radius:6px;transition:background .12s,transform .08s}
.site-nav a:hover,.site-nav a:focus{background:rgba(255,255,255,0.06);transform:translateY(-1px)}

.nav-toggle{
  display:none;
  background:transparent;
  border:1px solid rgba(255,255,255,0.12);
  padding:.45rem .6rem;
  border-radius:6px;
  color:var(--primary-contrast);
}

.hero{
  position:relative;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  padding:6rem 1rem;
  min-height:420px;
  width:100vw;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:1rem;
  background-image: url("../img/Monashee-Mountains.jpg");
  background-size:cover;
  background-position:center;
  color:var(--primary-contrast);
  border-radius:0;
  overflow:hidden;
  text-align:center;
}
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,41,87,0.64); /* stronger translucent overlay for better contrast */
  pointer-events:none;
}
.hero > *{position:relative; z-index:1}
.hero > .hero-decorative{display:none}
.hero h2{font-weight:700;text-shadow:0 2px 8px rgba(0,0,0,0.6)}
.hero .lede{color:#eef6ff;max-width:60ch;margin:0 auto;text-shadow:0 1px 4px rgba(0,0,0,0.45);background:rgba(0,0,0,0.06);padding:.4rem .6rem;border-radius:6px}
.hero-actions{margin-top:1rem;display:flex;gap:.5rem;justify-content:center}

.btn{display:inline-block;padding:.6rem .9rem;border-radius:6px;background:var(--surface);border:1px solid rgba(0,0,0,0.08);color:var(--nav-bg);text-decoration:none}
.btn.primary{background:var(--donate);color:var(--primary-contrast);border-color:var(--donate)}
.btn.membership{background:var(--surface);color:var(--nav-bg);border:1px solid rgba(0,0,0,0.08)}

/* make non-donate buttons white on deep blue header */
.site-header .btn{background:#ffffff;color:var(--nav-bg);border:none}
.site-header .btn.primary{background:var(--donate);color:#fff}

.events{margin:2rem 0}
.event-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.event-card{background:var(--surface);padding:1rem;border-radius:8px;border:1px solid #e6eef6;color:#0b2540}
.event-card h4{margin:.25rem 0}
.meta{font-size:.9rem;color:var(--muted)}

/* Mission card */
.mission{margin:2rem 0}
.mission-card{background:var(--surface);padding:1.25rem;border-radius:10px;border:1px solid #e6eef6;color:#0b2540;box-shadow:0 6px 18px rgba(11,37,70,0.06)}
.mission-card h4{margin:0.6rem 0 0.3rem;font-size:1rem}
.mission-card p{margin:0.3rem 0;line-height:1.6;color:#0b2540}

@media (max-width:720px){
  .mission-card{padding:1rem}
}

/* President section */
.president{margin:2.5rem 0}

/* Card layout */
.president-card{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:1.5rem;
  align-items:start;
  background:var(--surface);
  padding:1.5rem;
  border-radius:10px;
  border:1px solid #e6eef6;
  color:#0b2540;
}

/* Photo container */
.president-photo{
  width:180px;
  height:180px;
  border-radius:14px; /* rounded edges */
  overflow:hidden;
  background:linear-gradient(180deg, #eaf2fb, #ffffff);
}

/* Image behavior */
.president-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 22%; /* keeps head in frame */
  display:block;
}

/* Text */
.president-bio h4{margin:0 0 .25rem;font-size:1.1rem}
.president-bio .meta{font-size:.95rem;color:var(--muted);margin-bottom:.75rem}
.president-bio .desc{margin:.5rem 0 0;line-height:1.55;color:#0b2540}
.president-bio .desc:first-of-type{margin-top:0}

/* Mobile */
@media (max-width:720px){
  .president-card{
    grid-template-columns:1fr;
    text-align:center;
  }

  .president-photo{
    width:140px;
    height:140px;
    margin:0 auto .5rem;
  }

  .president-bio{text-align:left}
}

.site-footer{background:var(--nav-bg);color:var(--primary-contrast);padding:1rem 0;margin-top:2rem}
.site-footer a{color:var(--primary-contrast)}
.site-footer .footer-address{display:flex;align-items:center;gap:.5rem;margin:.5rem 0}
.site-footer .footer-address a{color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:.5rem}
.site-footer .footer-address a:hover{text-decoration:underline}
.site-footer .footer-address .icon-pin{width:1rem;height:1rem;fill:currentColor;flex-shrink:0}

/* Social links above footer */
.social-links{display:flex;gap:.5rem;justify-content:center;padding:1rem 0;margin-top:0;flex-wrap:wrap}
.social-links a{
  display:inline-flex;
  flex-direction:column;
  width:auto;
  height:auto;
  padding:0.5rem;
  align-items:center;
  justify-content:center;
  background:transparent;
  border:none;
  color:var(--primary-contrast);
  text-decoration:none;
  gap:0.25rem;
}
.social-links a svg{width:20px;height:20px;fill:currentColor}
.social-links a:focus{outline:3px solid rgba(255,255,255,0.14);outline-offset:2px}

/* Form */
.form{
  max-width:720px;
  width:100%;
  margin:1rem auto;
  background:var(--surface);
  padding:1.25rem;
  border-radius:8px;
  border:1px solid #e6eef6;
  color:#0b2540;
  box-shadow:0 6px 18px rgba(11,37,70,0.04);
}
.form-row{margin-bottom:1rem;display:flex;flex-direction:column;gap:.35rem}
.form label{font-weight:600;font-size:.95rem;margin:0;color:#0b2540}
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form textarea,
.form select{
  padding:.65rem;
  border:1px solid #cfe0f2;
  border-radius:6px;
  width:100%;
  box-sizing:border-box;
  background:#fff;
  color:#0b2540;
}
textarea{resize:vertical;min-height:88px}
.form-actions{display:flex;gap:.5rem;margin-top:1rem;justify-content:flex-end;flex-wrap:wrap}
.form-actions .btn{min-width:92px}
.muted{color:var(--muted);font-size:.9rem}

/* Fieldset / role options */
.role-options fieldset{margin:0;padding:0}
.role-options legend{font-weight:700;margin-bottom:.5rem}
.role-options label{display:inline-flex;align-items:center;gap:.4rem;margin-right:0.9rem;font-weight:500;color:#0b2540}

/* Modal header spacing */
.volunteer-modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:.75rem;
  padding-bottom:.5rem;
  border-bottom:1px solid #eef6fb;
}

#volunteer-success{margin-top:.75rem;color:var(--muted)}

/* Volunteer modal styles */
.volunteer-modal-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,0.5);
  z-index:2000;
  padding:1rem;
  overflow:auto; /* allow scrolling on small screens */
}
.volunteer-modal-overlay.is-open{display:flex}

.volunteer-modal{
  background:var(--surface);
  max-width:720px;
  width:100%;
  border-radius:10px;
  padding:1.25rem;
  border:1px solid #e6eef6;
  box-shadow:0 12px 30px rgba(11,37,70,0.12);
  color:#0b2540;
  max-height:calc(100vh - 2rem); /* fit on small screens */
  overflow:auto; /* scroll modal content if needed */
}

.volunteer-modal-close{
  background:transparent;
  border:0;
  font-size:1.4rem;
  line-height:1;
  color:var(--muted);
  cursor:pointer;
}
.volunteer-modal .form-row{margin-bottom:.75rem}
.volunteer-modal fieldset{border:0;padding:0;margin:0}
.volunteer-modal .role-options label{display:inline-flex;align-items:center;gap:.4rem;margin-right:0.9rem;font-weight:500;color:#0b2540}
.volunteer-modal .role-options input{transform:translateY(1px)}

/* Explicit form label and input colors to ensure visibility */
.form label{color:#0b2540}
.form input, .form textarea, .form select{color:#0b2540}
.form input::placeholder, .form textarea::placeholder{color:#6b7785}

/* Accessibility */
a:focus,button:focus,input:focus,textarea:focus{outline:3px solid rgba(11,79,140,.16);outline-offset:2px}

/* Utility: visually hidden (accessible) */
.visually-hidden{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap;border:0;padding:0;margin:-1px}

/* Responsive nav + responsive form */
@media (max-width:720px){
  /* Fix header overflow on small screens */
  .branding{
    margin-left:0;
    padding-left:0;
  }

  .header-inner{
    flex-wrap:wrap;
  }

  .nav-toggle{
    display:inline-block;
  }

  /* Dropdown behavior:
     - show nav when toggle has aria-expanded="true"
     - or if JS uses .is-open on nav, that also works
  */
  .site-nav{
    display:none;
    width:100%;
    flex-basis:100%;
    margin-top:.25rem;
  }
  .nav-toggle[aria-expanded="true"] + .site-nav,
  .site-nav.is-open{
    display:block;
  }

  .site-nav ul{
    flex-direction:column;
    align-items:stretch;
    gap:.5rem;
    padding:.5rem 0;
  }

  .site-nav li{
    width:100%;
  }

  .site-header .btn{
    width:100%;
    text-align:center;
  }

  .logo{width:140px}
  .site-title{font-size:1rem;padding-left:0.4rem}

  /* Form / modal padding and buttons on small screens */
  .form{padding:1rem}
  .form-actions{justify-content:center}
  .form-actions .btn{width:100%}
  .role-options label{display:block;margin-right:0}
  .form input,.form textarea{font-size:1rem}

  .volunteer-modal{padding:.9rem}
  .volunteer-modal .role-options label{display:block;margin-right:0}
}

/* Desktop nav toggle hidden */
@media (min-width:721px){
  .nav-toggle{display:none}
}

/* small print */
.muted small{color:var(--muted)}
