/* Glassmorphism Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding: 1rem 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: contain;
}

.logo-text h1 {
  font-size: 1.25rem;
  margin: 0;
  color: var(--primary-color);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.logo-text p {
  font-size: 0.75rem;
  margin: 0;
  color: var(--secondary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.3;
  white-space: nowrap; /* Keep on one line for desktop */
}

.logo-text p span { display: inline; }

/* Navigation */
nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

nav a:hover::after, nav a.active::after {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: var(--font-primary);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 6px rgba(123, 17, 19, 0.2);
}

.btn-primary:hover {
  background-color: var(--accent-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(123, 17, 19, 0.3);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: #c4893a;
  color: var(--primary-color);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Cards (Glassmorphic) */
.card {
  background: var(--surface-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
  .card {
    padding: 1.25rem;
  }
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-new { background-color: #fee2e2; color: #dc2626; }
.badge-info { background-color: #e0f2fe; color: #0284c7; }

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  transition: var(--transition);
  background-color: #f8fafc;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(123, 17, 19, 0.15);
  background-color: white;
}

/* Footer */
footer {
  background-color: #2d0507;
  color: #94a3b8;
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-heading {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #94a3b8;
}

.footer-links a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer-left {
  text-align: left;
}

.footer-left p {
  margin: 0;
  line-height: 1.5;
  font-size: 0.875rem;
}

.footer-right {
  display: flex;
  align-items: center;
}

.admin-portal-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.admin-portal-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
  nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }
  
  nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  nav ul {
    flex-direction: column;
    gap: 1rem;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .hero-mobile-text {
    font-size: 2.5rem !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  .footer-left {
    text-align: center;
  }
}

/* Helper for mobile hero text size */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2.25rem !important;
  }
  .hero p {
    font-size: 1.05rem !important;
  }
  .logo-text p {
    font-size: 0.68rem;
    white-space: normal;
    line-height: 1.25;
    letter-spacing: 0.5px;
    display: block;
  }
  .logo-text p span {
    display: block;
  }
  .logo-container { gap: 0.6rem; }
  .logo-img { width: 42px; height: 42px; }
}

/* Shared Page Header (Slim Cardinal Design) */
.page-header {
  background: linear-gradient(to right, #4a0a0b 0%, #7b1113 100%);
  padding: 2.4rem 0;
  text-align: center;
  border-bottom: 3px solid var(--secondary-color);
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

/* Tighten spacing for sections immediately following a page header */
.page-header + .section,
.page-header + main.section {
  padding-top: 2.5rem;
}

.page-header h1 {
  color: white;
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}

.page-header p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  font-weight: 500;
  margin: 0;
  max-width: 650px;
  margin: 0 auto;
}

.page-header .header-accent {
  display: block;
  font-size: 1.15rem;
  color: var(--secondary-color);
  margin-bottom: 0.35rem;
}

@media (max-width: 768px) {
  .page-header { 
    padding: 1.25rem 0.5rem; 
  }
  .page-header h1 { 
    font-size: clamp(1.2rem, 5.5vw, 1.5rem); 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Fallback for very small screens */
    margin: 0 auto;
    width: 95%;
  }
  .page-header p { 
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 0 1rem;
  }
}
