/*────────────────────────────────────────────────────────
  base.css — CAA Digital Library Store
────────────────────────────────────────────────────────*/

/* 1) Custom Properties */
:root {
  --color-gold:       #e89e01;
  --color-blue:       #1e4d6b;
  --color-blue-dark:  #153a52;
  --color-gray-light: #f4f4f4;
  --color-gray:       #ccc;
  --font-sans:        'Helvetica Neue', Arial, sans-serif;
}

/* 2) Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: #333;
  background: #fff;
}

/* 3) Typography & Links */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-blue);
  font-weight: 600;
  margin-bottom: 1rem;
}
p {
  margin-bottom: 1rem;
}
a {
  color: var(--color-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--color-gold);
}

/* 4) Top Bar */
.top-bar {
  background: var(--color-blue-dark);
  color: #fff;
  font-size: 0.85rem;
  text-align: right;
  padding: 0.5rem 1rem;
}
.top-bar a {
  color: #fff;
  margin-left: 0.75rem;
}

/* 5) Header + Nav */
.site-header {
  background: var(--color-blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  position: relative;
  z-index: 10;
}
.site-header .logo img {
  height: 40px;
}

/* Nav icons container */
.nav-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: auto !important;
}
.nav-icons a {
  color: #fff;
  font-size: 1.5rem;
}

/* === Cart icon link === */
.nav-cart {
  display: inline-flex;
  align-items: center;
  position: relative;
  color: #fff;
  text-decoration: none;
  font-size: 1.4rem;
  padding: 0.5rem 0.75rem;
  transition: color 0.3s ease;
}
.nav-cart:hover {
  color: var(--color-gold);
}
/* Always show the emoji */
.nav-cart .cart-icon {
  display: inline-block;
}
/* never show text on desktop or mobile */
.nav-cart .cart-text {
  display: none;
}

/* Badge styling */
.cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--color-gold);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 12px;
  line-height: 1;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

/* Hamburger */
.nav-toggle {
  display: none;
}
.nav-toggle-label {
  display: none;
  cursor: pointer;
  position: relative;
  width: 24px;
  height: 24px;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: '';
  display: block;
  background: #fff;
  height: 2px;
  width: 100%;
  position: absolute;
}
.nav-toggle-label span {
  top: 50%;
  transform: translateY(-50%);
}
.nav-toggle-label span::before { top: -6px; }
.nav-toggle-label span::after  { top:  6px; }

/* Main nav links */
.site-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.site-nav a {
  color: #fff;
  font-weight: 500;
  padding: 0.5rem;
  transition: color 0.3s ease;
}
.site-nav a:hover {
  color: var(--color-gold);
}

/* 6) Hero & Page Banner */
.hero {
  background-size: cover;
  background-position: center;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-title {
  color: #fff;
  background: rgba(0,0,0,0.4);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 1.5rem;
  text-align: center;
  width: 100%;
  max-width: 600px;
}

/* Slim page banner (if used) */
.page-banner {
  background-size: cover;
  background-position: center;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}
.page-banner h1 {
  color: #fff;
  background: rgba(0,0,0,0.5);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 2rem;
  text-align: center;
}

/* 7) Layout Container */
.container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* 8) Buttons */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}
.btn-primary {
  background: var(--color-gold);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn-primary:hover {
  filter: brightness(0.9);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.btn-secondary {
  background: var(--color-blue);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn-secondary:hover {
  background: var(--color-blue-dark);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.btn-outline {
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
}

/* 9) Forms */
input, textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--color-gray);
  border-radius: 4px;
  margin-top: 0.25rem;
  transition: border-color 0.3s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-gold);
}

/* 10) Media Grid & Cards */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 1.5rem;
}
.media-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}
.media-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.media-card .card-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.media-card h2 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}
.media-card p {
  flex: 1;
  margin-bottom: 1rem;
  color: #555;
}

/* 11) Table (Dashboard) */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}
.table thead {
  background: var(--color-blue);
  color: #fff;
}
.table th, .table td {
  padding: 0.75rem;
  border: 1px solid var(--color-gray-light);
  text-align: left;
}
.table tbody tr:nth-child(even) {
  background: var(--color-gray-light);
}

/* 12) Footer Grid Layout */
footer {
  background: var(--color-blue-dark);
  color: #fff;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.footer-column h4 {
  margin-bottom: 0.5rem;
  color: var(--color-gold);
}
.footer-column p,
.footer-column ul {
  margin: 0;
  list-style: none;
}
.footer-column ul li {
  margin-bottom: 0.5rem;
}
.footer-column a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-column a:hover {
  color: var(--color-gold);
}
.footer-bottom {
  border-top: 1px solid var(--color-gray);
  padding-top: 1rem;
  text-align: center;
}
/* Make Quick Links into two columns */
.footer-links ul {
  columns: 2;
  -webkit-columns: 2;
  -moz-columns: 2;
  column-gap: 1rem;
  padding: 0;
  list-style: none;
}
.footer-links ul li {
  margin-bottom: 0.5rem;
}


/* 13) Admin Forms */
.login-container,
.upload-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 2rem;
}
.login-container { max-width: 400px; margin: 4rem auto; }
.upload-container { max-width: 800px; margin: 2rem auto; }

/* 14) Utilities */
.text-center { text-align: center; }
.mt-1        { margin-top: 1rem; }
.mb-1        { margin-bottom: 1rem; }

/* 15) Mobile Nav Behavior */
@media (max-width: 768px) {
  /* center top-bar text */
  .top-bar {
    text-align: center;
    font-size: 0.8rem;
  }
  .top-bar a {
    display: inline-block;
    margin: 0 0.5rem;
  }

  /* show hamburger */
  .nav-toggle {
    display: block;
    position: absolute;
    top: 0.9rem;
    right: 1rem;
    width: 32px; height: 32px;
    opacity: 0;
    z-index: 20;
    cursor: pointer;
  }
  .nav-toggle-label {
    display: block;
    position: absolute;
    top: 0.9rem;
    right: 1rem;
    z-index: 15;
  }

  /* reorder header: logo – icons – burger */
  .site-header {
    justify-content: space-between;
  }
  .site-header .logo             { order: 1; }
  .site-header .nav-icons        { order: 2; margin: 0 auto; }
  .site-header .nav-toggle-label { order: 3; }

  /* hide main nav until toggled */
  .site-nav {
    display: none;
    flex-direction: column;
    background: var(--color-blue-dark);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 1rem 0;
    gap: 0;
  }
  .site-nav a {
    display: block;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  /* strip button styling in mobile menu */
  .site-nav a.btn-primary,
  .site-nav a.btn-outline {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 500 !important;
    color: #fff !important;
    padding: 0.75rem 0 !important;
  }
  .site-nav a.btn-primary:hover,
  .site-nav a.btn-outline:hover {
    background: none !important;
    color: var(--color-gold) !important;
  }
}
/* Responsive video wrapper (optional) */
.video-container {
  max-width: 600px;      /* or whatever your desktop max should be */
  margin: 0 auto 1rem;   /* center + bottom-margin */
}

/* Make any <video> or <audio> with this class fill its parent */
.responsive-video {
  width: 100%;
  height: auto;
  display: block;
}

/* grid helpers */
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); }
.gap-1 { gap:1rem; }
.card { background:#fff; padding:1rem; border:1px solid #ddd; border-radius:6px; }
.table { width:100%; border-collapse: collapse; }
.table th, .table td { padding:.5rem; border:1px solid #eee; }

/* Admin cards */
.card {
  padding:1rem; background:#f9f9f9; border-radius:6px;
  box-shadow:0 1px 3px rgba(0,0,0,0.1);
  text-align:center;
}
/* table margin */
.container .table { margin-top:1rem; }

