/* Reset some basic elements */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #f8f8f8;
  color: #333;
  padding: 0;
  margin: 0;
}

header {
  background-color: #003366;
  color: white;
  padding: 1em;
  text-align: center;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.menu-toggle {
    display: inline-block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
  }


h3 a {
    text-decoration: none;
}

h4 a {
    text-decoration: none;
}

nav {
  width: 100%;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
  gap: 1em;
  margin-top: 0.5em;
  padding: 0;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5em 1em;
  border-radius: 4px;
  transition: background 0.3s;
}

nav a:hover {
  background-color: #005599;
}

main {
  width: 100%;
  margin: 0;
  background: white;
  padding: 2em;
  border-radius: 0;
}

section {
  margin-bottom: 2em;
  padding: 0 2em;
}

section h3 {
  color: #003366;
  margin-bottom: 0.5em;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.25em;
}

ul {
  padding-left: 1.5em;
}

footer {
  text-align: center;
  padding: 1em 0;
  background-color: #eee;
  color: #555;
  font-size: 0.9em;
  border-top: 1px solid #ccc;
  width: 100%;
}

/* Flex Card Styling */
.flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  justify-content: center;
}

.flex-card {
  background-color: #e5e8e8;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 1.5em;
  width: 48%;
  transition: all 0.3s ease;
}

.flex-card:hover {
  background-color: #ffffff;
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#contact iframe {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 12px;
  margin-top: 1em;
}

/* Stylish Login/Register Buttons */
.button {
  display: inline-block;
  padding: 0.6em 1.2em;
  margin: 0.5em;
  font-size: 1em;
  font-weight: bold;
  color: #fff;
  background-color: #003366;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
}

.button:hover {
  background-color: #005599;
  transform: scale(1.05);
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  height: 90%;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.modal-content iframe {
  width: 100%;
  height: 100%;
}

.close-button {
  position: absolute;
  top: 1.5em;
  right: 1em;
  font-size: 1.5em;
  cursor: pointer;
  color: #333;
  z-index: 10000;
}

.back-button {
  display: inline-block;
  margin: 1em 0;
  padding: 0.5em 1.2em;
  background-color: #003366;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.back-button:hover {
  background-color: #005599;
}

.site-footer { background:#111; color:#eee; padding:2rem 1rem; }
.site-footer a { color:#eee; text-decoration:none; }

.site-footer a:hover { text-decoration:underline; }

.site-footer .social { justify-content: center; }
.site-footer .footer-links ul{
      list-style: none;
}

ul {
  list-style-type: none; /* Removes the bullet points */
}

.footer-grid { display:grid; gap:1.25rem; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); max-width:1100px; margin:0 auto; }
.footer-grid h4 { 
    text-align: center;
}
.footer-brand .tagline { margin:.25rem 0 1rem; }

.social { list-style:none; display:flex; gap:.5rem; padding:0; margin:.5rem 0 0; }
.social-icon { width:36px; height:36px; display:inline-block; vertical-align:middle; transition:transform .15s ease, filter .15s ease; }
.social a:hover .social-icon { transform:translateY(-1px); filter:brightness(1.05); }
.footer-bottom { border-top:1px solid #2a2a2a; margin-top:1.25rem; padding-top:1rem; display:flex; flex-wrap:wrap; gap:.75rem; align-items:center; justify-content:space-between; max-width:1100px; margin-left:auto; margin-right:auto; }

/* ==== General Nav Styles ==== */
#nav-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 160px; /* adjust if your header height is different */
  left: 0;
  width: 100%;
  background-color: #003366;
  z-index: 1000;
  border-top: 1px solid #ccc;
}

#nav-menu.show {
  display: flex;
}

/* ==== Hamburger Menu Button ==== */
.menu-toggle {
  display: inline-block;
  background: none;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  margin-right: 1rem;
}

/* ==== Desktop Overrides ==== */
@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  #nav-menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: none;
    border: none;
  }
}

/* Mobile Menu Fix for CCARC */
@media screen and (max-width: 768px) {

  .menu-toggle {
    display: none;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    background-color: #003366;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    padding: 1em 0;
  }

  nav ul.show {
    display: flex;
  }

  nav ul li {
    text-align: center;
    padding: 0.5em 0;
  }

  main {
    padding: 1em;
  }

  section {
    padding: 0 1em;
  }

  .flex-card {
    width: 100%;
  }
}


/* --- Admin half-circle tab + drawer --- */
.admin-wrap{ position:fixed; right:0; top:40%; z-index:10000; }
.admin-tab{
  position:relative;
  display:flex; align-items:center; gap:.5rem;
  width:56px; height:60px;               /* collapsed */
  padding:0 14px 0 16px;
  border:0; cursor:pointer; color:#fff;
  background:#b23a2a;
  border-radius:60px 0 0 60px;            /* half-circle */
  box-shadow:-6px 8px 18px rgba(0,0,0,.18);
  transition:width .25s ease, box-shadow .25s ease;
  outline:none;
}
.admin-tab .star{
  display:inline-flex; width:28px; height:28px;
  border-radius:50%; background:rgba(255,255,255,.18);
  align-items:center; justify-content:center;
}
.admin-tab .label{
  white-space:nowrap; overflow:hidden;
  max-width:0; opacity:0; transition:max-width .25s ease, opacity .2s ease;
  font-weight:700; letter-spacing:.5px;
}
.admin-wrap:hover .admin-tab,
.admin-tab:focus{ width:190px; }
.admin-wrap:hover .admin-tab .label,
.admin-tab:focus .label{ max-width:140px; opacity:1; }

.admin-drawer{
  position:fixed; top:0; right:-320px; width:320px; height:100vh;
  background:#fff; box-shadow:-14px 0 28px rgba(0,0,0,.18);
  transition:right .28s ease; z-index:9999; display:flex; flex-direction:column;
}
.admin-drawer.open{ right:0; }
.admin-drawer header{
  padding:1rem; border-bottom:1px solid #eee; display:flex; justify-content:space-between; align-items:center;
}
.admin-drawer .close-x{
  background:#f2f4f7; border:0; width:36px; height:36px; border-radius:8px; cursor:pointer;
  font-size:20px; line-height:36px; text-align:center;
}
.admin-drawer nav{ padding:.75rem 1rem 1rem; }
.admin-drawer nav a{
  display:block; padding:.55rem .65rem; border-radius:8px; color:#111; text-decoration:none;
}
.admin-drawer nav a:hover{ background:#f7f7f7; }

/* Add cursor pointer to sortable headers */
th.sortable {
  cursor: pointer;
  position: relative;
  padding-right: 20px;
}

/* Add arrows for ascending & descending */
th.sortable.asc::after {
  content: " ▲";
  font-size: 12px;
  position: absolute;
  right: 5px;
}

th.sortable.desc::after {
  content: " ▼";
  font-size: 12px;
  position: absolute;
  right: 5px;
}


/* Upload Section Container */
#upload-section {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid #ddd;
  margin-bottom: 25px;
  transition: all 0.3s ease;
}

/* Hover effect */
#upload-section:hover {
  box-shadow: 0px 6px 14px rgba(0, 0, 0, 0.25);
}

/* Form labels */
#upload-section label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
  font-size: 14px;
}

/* Text inputs, dropdowns, and textareas */
#upload-section input[type="text"],
#upload-section input[type="file"],
#upload-section select,
#upload-section textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Focus effect for inputs */
#upload-section input[type="text"]:focus,
#upload-section input[type="file"]:focus,
#upload-section select:focus,
#upload-section textarea:focus {
  border-color: #0077cc;
  box-shadow: 0px 0px 6px rgba(0, 119, 204, 0.4);
  outline: none;
}

/* Upload Button */
#upload-section button {
  background-color: #0077cc;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Hover and active states for button */
#upload-section button:hover {
  background-color: #005fa3;
  transform: scale(1.05);
}

#upload-section button:active {
  transform: scale(0.97);
}

/* Status messages */
#uploadStatus {
  margin-top: 10px;
  font-size: 14px;
  color: #444;
  font-weight: bold;
}


/* Button Base Style */
.btn {
  display: inline-block;
  padding: 6px 14px;
  margin: 2px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  transition: all 0.25s ease;
  cursor: pointer;
}

/* View Button */
.btn-view {
  background-color: #0077cc;
}
.btn-view:hover {
  background-color: #005fa3;
}

/* Edit Button */
.btn-edit {
  background-color: #28a745;
}
.btn-edit:hover {
  background-color: #218838;
}

/* Delete Button */
.btn-delete {
  background-color: #dc3545;
}
.btn-delete:hover {
  background-color: #c82333;
}

/* Actions cell alignment */
td.actions {
  white-space: nowrap;
  text-align: center;
}

.alert {
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
}

.alert.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Overlay background */
#editNewsletterOverlay {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

/* Overlay content box */
#editNewsletterOverlay .overlay-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 450px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

#editNewsletterOverlay input,
#editNewsletterOverlay textarea,
#editNewsletterOverlay select {
  width: 100%;
  padding: 8px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#editNewsletterOverlay button {
  padding: 8px 16px;
  margin-right: 10px;
  border: none;
  border-radius: 4px;
  background-color: #0077cc;
  color: white;
  cursor: pointer;
}

#editNewsletterOverlay button:hover {
  background-color: #005fa3;
}


#publicNewsletters {
  margin-top: 10px;
}

.newsletter-item {
  padding: 10px;
  border-bottom: 1px solid #ccc;
}

.newsletter-item:last-child {
  border-bottom: none;
}

.newsletter-item .btn-view {
  display: inline-block;
  margin-top: 5px;
  padding: 5px 12px;
  background-color: #0056b3;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s;
}

.newsletter-item .btn-view:hover {
  background-color: #003d80;
}

.newsletter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.newsletter-btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Hover effect for all */
.newsletter-btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

/* Quarter colors */
.btn-q1 { background-color: #007BFF; } /* Blue */
.btn-q2 { background-color: #FF8C00; } /* Orange */
.btn-q3 { background-color: #8B4513; } /* Brown */
.btn-q4 { background-color: #17A2B8; } /* Cyan */

.btn-newsletter {
  display: inline-block;
  padding: 6px 12px;
  margin: 3px;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  transition: transform 0.2s ease-in-out;
}
.btn-newsletter:hover {
  transform: scale(1.05);
  opacity: 0.9;
}



