/* ========================================================================
   Ella Rises - Branded Stylesheet
   Empowering Women in STEAM
   ======================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

:root {
  /* Ella Rises Brand Colors */
  --primary: #3A3F3B;        /* Charcoal - headers, navbar */
  --secondary: #9AB59D;      /* Sage Green - buttons, links */
  --accent: #CE325B;         /* Magenta - CTAs, highlights */
  --pink-light: #FFD8D1;     /* Light Pink - backgrounds */
  --pink-medium: #F9AFB1;    /* Rose Pink - cards */
  --peach: #F4B092;          /* Peach - accents */
  --blue-gray: #99B7C6;      /* Blue Gray - info */
  --purple: #978EC4;         /* Purple - special */
  --cream: #F9F5EA;          /* Cream - backgrounds */
  --success: #9AB59D;
  --background: #FFF8F6;
  --text: #3A3F3B;
  --border: #F9AFB1;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: white;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================================================
   Header & Navigation
   ======================================================================== */
header {
  background: #99B7C6;
  color: white;
  padding: 0.4rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

header .container {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 0 20px;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: 0.5rem;
}

.logo a {
  display: block;
  transition: transform 0.3s ease;
}

.logo a:hover {
  transform: scale(1.1);
}

.logo img {
  height: 55px;
  width: auto;
  display: block;
  filter: invert(1) brightness(2);
}

header h1 a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  font-family: 'DM Serif Display', serif;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  margin-left: auto;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

header nav {
  display: flex;
  gap: 0.30rem;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

header nav > * {
  margin: 0;
  padding: 0;
}

header nav .dropdown {
  margin: 0;
  padding: 0;
  display: inline-block;
  margin-right: -0.15rem;
}

header nav .dropdown .dropdown-toggle {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.3s;
  color: white;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

header nav .dropdown .dropdown-toggle:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

header nav.header-nav-mobile {
  display: none;
}

header nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.3s;
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.95rem;
  min-width: fit-content;
}

header nav a:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

/* ========================================================================
   Dropdown Menu
   ======================================================================== */
.dropdown {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.dropdown-toggle i {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.dropdown.active .dropdown-toggle i {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  border: 1px solid var(--pink-light);
}

.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
  border-radius: 0;
}

.dropdown-menu a:hover {
  background: #9AB59D;
  color: white;
  transform: none;
  padding-left: 2rem;
}

.dropdown-menu a:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.dropdown-menu a:first-child:hover {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.dropdown-menu a:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.dropdown-menu a:last-child:hover {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Mobile Dropdown */
.dropdown-mobile {
  position: relative;
}

.dropdown-toggle-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
}

.dropdown-toggle-mobile i {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.dropdown-mobile.active .dropdown-toggle-mobile i {
  transform: rotate(180deg);
}

.dropdown-menu-mobile {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, visibility 0.4s ease-in-out, padding 0.4s ease-in-out;
  background: rgba(255,255,255,0.1);
  margin-bottom: 0;
  padding-bottom: 0;
  opacity: 0;
  visibility: hidden;
}

.dropdown-mobile.active .dropdown-menu-mobile {
  max-height: 800px;
  padding-bottom: 0.5rem;
  opacity: 1;
  visibility: visible;
}

.dropdown-menu-mobile a {
  padding-left: 3rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
}

.dropdown-menu-mobile a:hover {
  background: #9AB59D;
  color: white;
}

header nav a.btn-primary {
  background: linear-gradient(135deg, #9AB59D 0%, #8BA68E 100%);
  padding: 0.5rem 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 12px;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  font-weight: 600;
  will-change: transform, box-shadow;
}

header nav a.btn-primary:hover {
  filter: brightness(0.95);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(154, 181, 157, 0.2);
}

.donate-heart {
  height: 20px;
  width: auto;
  filter: invert(1) brightness(2);
  margin-left: -4px;
}

/* ========================================================================
   Main Content
   ======================================================================== */
main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

h1 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'DM Serif Display', serif;
  font-weight: 600;
}

h2 {
  color: var(--primary);
  margin: 2rem 0 1rem;
  font-family: 'DM Serif Display', serif;
}

/* ========================================================================
   Buttons
   ======================================================================== */
.btn, button[type="submit"] {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #9AB59D 0%, #8BA68E 100%);
  color: white;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  will-change: transform, box-shadow;
}

.btn:hover, button[type="submit"]:hover {
  filter: brightness(0.95);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(154, 181, 157, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, #9AB59D 0%, #8BA68E 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform, box-shadow;
}

.btn-primary:hover {
  filter: brightness(0.95);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(154, 181, 157, 0.3);
}

.btn-secondary {
  background: var(--peach);
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  will-change: transform, box-shadow;
}

.btn-secondary:hover {
  filter: brightness(0.92);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(244, 176, 146, 0.3);
  text-decoration: none;
}

.btn-logout {
  background: transparent;
  border: 2px solid white;
  padding: 0.4rem 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform, box-shadow;
}

.btn-logout:hover {
  background: white;
  color: var(--primary);
}

/* ========================================================================
   Standardized Action Buttons
   ======================================================================== */
.action-buttons {
  display: flex;
  gap: 0.2rem;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
  vertical-align: middle;
}

td .action-buttons {
  display: inline-flex;
  vertical-align: middle;
}

td .action-buttons form {
  display: contents;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  will-change: transform, box-shadow;
}

.btn-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.btn-edit {
  background: linear-gradient(135deg, #9AB59D 0%, #8BA68E 100%);
  color: white;
  text-decoration: none !important;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform, box-shadow;
}

.btn-edit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(154, 181, 157, 0.3);
}

/* Ensure btn-small keeps its styling when combined with other classes */
.btn-small.btn-edit,
.btn-small.btn-delete,
.btn-small.btn-view {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  min-width: 70px;
  text-align: center;
}

.btn-small.btn-edit:hover,
.btn-small.btn-delete:hover,
.btn-small.btn-view:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.btn-delete {
  background: var(--accent);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform, box-shadow;
}

.btn-delete:hover {
  filter: brightness(0.9);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(201, 64, 98, 0.3);
}

.btn-view {
  background: var(--blue-gray);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform, box-shadow;
}

.btn-view:hover {
  filter: brightness(0.92);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 171, 184, 0.3);
}

.btn-add {
  background: linear-gradient(135deg, #9AB59D 0%, #8BA68E 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  white-space: nowrap;
  will-change: transform, box-shadow;
}

.btn-add:hover {
  filter: brightness(0.95);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(154, 181, 157, 0.3);
}

/* ========================================================================
   Pagination
   ======================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.5rem 0;
}

.pagination a {
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, #9AB59D 0%, #8BA68E 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 100px;
  text-align: center;
  display: inline-block;
  will-change: transform, box-shadow;
}

.pagination a:hover {
  filter: brightness(0.95);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(154, 181, 157, 0.3);
}

.pagination span {
  padding: 0.6rem 1rem;
  color: var(--text);
  font-weight: 500;
}

/* ========================================================================
   Forms
   ======================================================================== */
form {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-width: 600px;
  border: 1px solid var(--pink-light);
}

input, textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 2px solid var(--pink-light);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  font-family: 'Montserrat', sans-serif;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

select {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem;
  margin-bottom: 1rem;
  border: 2px solid var(--pink-light);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  font-family: 'Montserrat', sans-serif;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239AB59D' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 4px 12px rgba(154, 181, 157, 0.2);
}

select:hover {
  border-color: var(--secondary);
  box-shadow: 0 2px 10px rgba(154, 181, 157, 0.15);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* ========================================================================
   Tables
   ======================================================================== */
table {
  width: 100%;
  background: white;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-top: 1rem;
  border: 1px solid #8BA68E;
}

thead {
  background: linear-gradient(135deg, var(--primary) 0%, #4a524e 100%);
  color: white;
}

th, td {
  padding: 1rem;
  text-align: left;
}

th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

tbody tr:nth-child(even) {
  background: rgba(154, 181, 157, 0.15);
}

tbody tr:hover {
  background: var(--cream);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.2s;
}

td a {
  color: #7a9b7e;
  text-decoration: none;
  margin-right: 1rem;
  font-weight: 500;
}

td a:hover {
  text-decoration: underline;
  color: #6a8b6e;
}

/* ========================================================================
   Alerts
   ======================================================================== */
.alert {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert.success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid var(--success);
}

.alert.error {
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid var(--accent);
}

/* ========================================================================
   Hero Section
   ======================================================================== */
.hero {
  background: linear-gradient(135deg, var(--pink-light) 0%, var(--pink-medium) 50%, var(--peach) 100%);
  color: var(--primary);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M50 20 L60 40 L40 40 Z" fill="%23ffffff" opacity="0.1"/></svg>');
  opacity: 0.1;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: #000000;
  font-family: 'DM Serif Display', serif;
  text-shadow: none;
  display: block;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: #000000;
  font-weight: 400;
}

.hero .btn {
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

/* ========================================================================
   Mission Section
   ======================================================================== */
.mission {
  padding: 4rem 0;
  background: white;
}

.mission h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--primary);
}

.mission p {
  font-size: 1.2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  color: var(--text);
}

/* ========================================================================
   Dashboard Metrics
   ======================================================================== */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.metric {
  background: linear-gradient(135deg, white 0%, var(--pink-light) 100%);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 2px solid var(--pink-medium);
  transition: all 0.3s;
}

.metric:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.metric h3 {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.metric p {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========================================================================
   Tableau Embed
   ======================================================================== */
.tableau-embed {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  margin-top: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 2px solid var(--pink-light);
}

.tableau-embed h2 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.tableau-embed iframe {
  border: none;
  border-radius: 8px;
}

/* ========================================================================
   Footer
   ======================================================================== */
footer {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 0.5rem 0;
  margin-top: 4rem;
}

footer p {
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--pink-medium);
  text-decoration: none;
  font-size: 1.5rem;
}

footer a:hover {
  color: var(--peach);
}

/* ========================================================================
   Details Pages
   ======================================================================== */
.details {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  margin: 1rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-left: 4px solid var(--accent);
}

.details p {
  margin-bottom: 0.75rem;
}

.details strong {
  color: var(--primary);
  font-weight: 600;
}

/* ========================================================================
   Search Form
   ======================================================================== */
.search-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.search-form input {
  flex: 1;
  margin-bottom: 0;
}

/* ========================================================================
   Login Form
   ======================================================================== */
.login-form {
  max-width: 450px;
  margin: 3rem auto;
}

.login-form h1 {
  text-align: center;
  color: var(--primary);
  display: block;
  margin-bottom: 2rem;
}

.login-form form {
  border: 2px solid var(--pink-medium);
}

/* ========================================================================
   Donation Form
   ======================================================================== */
.donation-form {
  max-width: 600px;
  margin: 2rem auto;
}

/* ========================================================================
   Responsive Design
   ======================================================================== */
@media (max-width: 768px) {
  header {
    position: relative;
    z-index: 1001;
    border-radius: 0;
    transition: border-radius 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
    box-shadow: none;
  }

  header.menu-open {
    border-radius: 0;
    box-shadow: 0 12px 24px rgba(0,0,0,0.20);
  }

  header .container {
    grid-template-columns: auto 1fr;
    gap: 0;
    justify-items: auto;
    max-width: 100%;
    width: 100%;
  }

  header nav.header-nav {
    display: none !important;
  }

  header nav.header-nav-mobile {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, padding 0.4s ease-in-out;
    box-shadow: none;
    z-index: 1000;
    border-radius: 0;
    margin: 0;
    background: transparent;
    opacity: 0;
  }

  header nav.header-nav-mobile.active {
    max-height: 1000px;
    box-shadow: none;
    padding: 1rem 0 0 0;
    background: #99B7C6;
    opacity: 1;
    overflow-y: auto;
  }

  header nav.header-nav-mobile a {
    padding: 1rem 2rem;
    font-size: 1rem;
    text-align: left;
    border-radius: 0;
    white-space: normal;
    border-bottom: none;
    color: white;
    text-decoration: none;
    margin: 0;
    width: 100%;
    display: block;
    box-sizing: border-box;
  }

  header nav.header-nav-mobile .dropdown-mobile {
    margin: 0;
  }

  header nav.header-nav-mobile .dropdown-toggle-mobile {
    padding: 1rem 2rem;
    width: 100%;
    justify-content: space-between;
    display: flex;
    align-items: center;
  }

  header nav.header-nav-mobile .dropdown-menu-mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  header nav.header-nav-mobile .dropdown-mobile.active .dropdown-menu-mobile {
    overflow: visible;
    padding-bottom: 1rem;
  }

  header nav.header-nav-mobile .dropdown-menu-mobile a {
    padding: 1rem 2rem;
    padding-left: 3rem;
    width: 100%;
    box-sizing: border-box;
    display: block;
  }

  header nav.header-nav-mobile a.btn-primary {
    background: linear-gradient(135deg, #9AB59D 0%, #8BA68E 100%);
    padding: 1rem 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    font-weight: 600;
    transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    will-change: transform, box-shadow;
  }

  header nav.header-nav-mobile a.btn-primary:hover {
    filter: brightness(0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(154, 181, 157, 0.2);
  }

  header nav.header-nav-mobile a:hover {
    background: rgba(255,255,255,0.2);
    transform: none;
  }

  header nav.header-nav-mobile a:last-child {
    border-bottom: none;
    margin-top: 0;
    margin-bottom: 0;
  }

  header nav.header-nav-mobile a.btn-logout {
    background: transparent;
    border: none !important;
    width: 100%;
    margin: 0 0 0 0 !important;
    padding: 1rem 2rem;
    display: block;
    box-sizing: border-box;
  }

  header nav.header-nav-mobile a.btn-logout:hover {
    background: rgba(255,255,255,0.2) !important;
    transform: none;
    color: white;
  }

  .menu-toggle {
    display: flex;
  }



  .hero {
    border-radius: 20px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .mission {
    border-radius: 20px;
    margin: 1.5rem;
  }

  .metrics {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
  }

  .metric {
    min-height: 140px;
    padding: 2rem 1.5rem;
  }

  .metric h3 {
    font-size: 2.5rem;
  }

  .metric.donation-metric {
    grid-column: span 1;
    min-height: 160px;
    padding: 2.5rem 1.5rem;
  }

  .metric.donation-metric h3 {
    font-size: 2.8rem;
  }

  .dashboard-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  .dashboard-header h1 {
    font-size: 2rem;
  }

  .dashboard-header p {
    font-size: 1rem;
  }

  .tableau-embed {
    margin-top: 2rem;
    padding: 1.5rem;
  }

  .tableau-embed h2 {
    font-size: 1.5rem;
  }

  .tableau-embed iframe {
    height: 500px;
  }

  table {
    font-size: 0.9rem;
  }

  th, td {
    padding: 0.75rem 0.5rem;
  }

  /* Round corners for impact section on mobile */
  section[style*="background: var(--pink-light)"] {
    border-radius: 20px;
  }
}

/* Tablet screens (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  header {
    padding: 0.2rem 0;
  }

  .logo img {
    height: 50px;
  }

  .container {
    max-width: 960px;
  }
}

/* Medium desktop screens (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
  header {
    padding: 0.3rem 0;
  }

  .logo img {
    height: 55px;
  }

  .container {
    max-width: 1200px;
  }
}

/* Large desktop screens (1441px - 1920px) */
@media (min-width: 1441px) and (max-width: 1920px) {
  .container {
    max-width: 1400px;
  }
}

/* Extra large screens (1920px+) */
@media (min-width: 1921px) {
  .container {
    max-width: 1600px;
  }

  header {
    padding: 0.5rem 0;
  }

  .logo img {
    height: 70px;
  }

  header nav a {
    font-size: 1.1rem;
    padding: 0.6rem 1rem;
  }
}

/* ========================================================================
   Loading States & Animations
   ======================================================================== */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========================================================================
   Utility Classes
   ======================================================================== */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

/* ========================================================================
   Mobile Responsive Enhancements
   ======================================================================== */
@media (max-width: 768px) {
  /* Buttons */
  .btn, button[type="submit"], .btn-primary, .btn-add, .btn-edit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    text-align: center;
    display: block;
    margin: 0.5rem 0;
  }

  .btn:hover, button[type="submit"]:hover, .btn-primary:hover, .btn-add:hover, .btn-edit:hover {
    transform: translateY(-2px);
  }

  /* Tables */
  .table-container {
    margin: 0 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    font-size: 0.9rem;
    min-width: 600px;
    border: none;
  }

  th, td {
    padding: 0.75rem 0.5rem;
  }

  /* Forms */
  .login-form, form {
    padding: 1.5rem;
    margin: 1rem;
  }

  .login-form input, input[type="text"], input[type="email"], input[type="password"], select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 1rem;
  }

  /* Search containers */
  .search-container {
    flex-direction: column;
    gap: 0.75rem;
  }

  .search-container input[type="text"],
  .search-container select,
  .search-container button[type="submit"],
  .search-container .btn-add {
    width: 100%;
    margin: 0;
  }

  /* Action buttons in tables */
  .action-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-small {
    width: 100%;
    padding: 0.5rem;
    text-align: center;
  }

  /* Pagination */
  .pagination {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    padding: 1rem;
  }

  .pagination a {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }

  /* Page headers */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* Landing page */
  .hero {
    padding: 2rem 1rem !important;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  /* Mission and Impact sections */
  .mission, section {
    padding: 2rem 1rem;
  }

  section h2 {
    font-size: 2rem;
  }

  /* Support section buttons */
  .support-section .btn {
    width: 100%;
    margin: 0.5rem 0;
  }

  /* Footer */
  footer {
    padding: 1rem 0;
  }

  footer img {
    height: 4rem !important;
  }

  footer p {
    font-size: 1.1rem;
  }

  /* Modal */
  .metric-modal-content {
    width: 95%;
    max-width: 95%;
    padding: 1.5rem;
    margin: 1rem;
  }

  .metric-modal-actions {
    flex-direction: column;
  }

  .metric-modal-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  /* Extra small devices */
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .btn, button[type="submit"] {
    font-size: 0.95rem;
    padding: 0.875rem;
  }

  table {
    font-size: 0.85rem;
  }

  th, td {
    padding: 0.5rem 0.25rem;
  }

  .container {
    padding: 0 1rem;
  }

  main {
    padding: 1rem 0;
  }
}


/* ========================================================================
   Custom Confirmation Modal
   ======================================================================== */
.confirm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(58, 63, 59, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.confirm-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  max-width: 450px;
  width: 90%;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.confirm-modal-header {
  background: linear-gradient(135deg, var(--blue-gray) 0%, #89a7b9 100%);
  color: white;
  padding: 1.25rem 1.5rem;
  border-bottom: 3px solid var(--accent);
}

.confirm-modal-header h3 {
  margin: 0;
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
}

.confirm-modal-body {
  padding: 2rem 1.5rem;
  background: var(--background);
}

.confirm-modal-body p {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
}

.confirm-modal-footer {
  padding: 1.25rem 1.5rem;
  background: white;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  border-top: 2px solid var(--pink-light);
}

.confirm-modal-cancel,
.confirm-modal-confirm {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.confirm-modal-cancel {
  background: white;
  color: var(--primary);
  border: 2px solid var(--pink-light);
}

.confirm-modal-cancel:hover {
  background: var(--pink-light);
  border-color: var(--pink-medium);
  transform: translateY(-2px);
}

.confirm-modal-confirm {
  background: linear-gradient(135deg, var(--accent) 0%, #b82849 100%);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(206, 50, 91, 0.3);
}

.confirm-modal-confirm:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(206, 50, 91, 0.4);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .confirm-modal {
    width: 95%;
    max-width: 95%;
  }

  .confirm-modal-header {
    padding: 1rem 1.25rem;
  }

  .confirm-modal-header h3 {
    font-size: 1.25rem;
  }

  .confirm-modal-body {
    padding: 1.5rem 1.25rem;
  }

  .confirm-modal-footer {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }

  .confirm-modal-cancel,
  .confirm-modal-confirm {
    width: 100%;
    padding: 0.875rem;
  }
}

