/* ==================== THEME COLORS ==================== */
:root {
  --maroon: #5b0f0f;
  --maroon-dark: #4a0c0c;
  --gold: #d4a017;
  --gold-dark: #b8860b;
  --cream: #faf8f0;
  --cream-soft: #f5e9d6;
  --text: #2e2e2e;
}

/* ==================== BASE ==================== */
body {
  font-family: Georgia, "Times New Roman", serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  padding-top: 100px; /* push content below navbar */
}

/* ==================== HELPERS ==================== */
.bg-maroon { background: var(--maroon) !important; }
.text-maroon { color: var(--maroon) !important; }
.bg-cream-soft { background: var(--cream-soft); }

.btn-gold {
  background: var(--gold);
  border: none;
  color: #271d00;
}
.btn-gold:hover { background: var(--gold-dark); color: #1b1400; }

.btn-outline-maroon {
  border: 1px solid var(--maroon);
  color: var(--maroon);
}
.btn-outline-maroon:hover {
  background: var(--maroon);
  color: #fff;
}

/* ==================== NAVBAR ==================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1030;
  background-color: var(--maroon) !important;
  height: 100px;
  min-height: 100px;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  align-items: center;
}

.navbar .nav-link {
  color: #f5e3b3 !important;
}
.navbar .nav-link:hover {
  color: #ffd966 !important;
}

/* ==================== LOGO ==================== */
.logo-img {
  height: 100px;
  width: 100px;
  object-fit: contain;
}

/* ==================== HERO ==================== */
/* ==================== HERO ==================== */
.hero {
  min-height: 70vh;
  background:
    linear-gradient(180deg, rgba(91,15,15,0.75), rgba(91,15,15,0.75)),
    url('../images/hero-2.png') center/cover no-repeat;
  background-attachment: scroll;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-title, .hero-sub {
  opacity: 0; /* fade-in via jQuery */
}

/* Tablet */
@media (max-width: 991px) {
  .hero {
    min-height: 60vh;
  }
}

/* Mobile - fill width completely */
@media (max-width: 768px) {
  .hero {
    min-height: 60vh;
    background:
      linear-gradient(180deg, rgba(91,15,15,0.75), rgba(91,15,15,0.75)),
      url('../images/hero-2.png') center/cover no-repeat;
    background-size: 100% auto; /* Full width, auto height */
    background-position: center center;
  }
}

/* Small mobile */
@media (max-width: 576px) {
  .hero {
    min-height: 50vh;
    background-size: 100% auto;
    background-position: center top;
  }
}
/* ==================== CARDS ==================== */
.card-title {
  letter-spacing: .3px;
}

/* ==================== YEAR BUTTONS ==================== */
.year-btn {
  border: 1px solid var(--maroon);
  background: #fff;
  color: var(--maroon);
  padding: .5rem .75rem;
  border-radius: .5rem;
  text-decoration: none;
  transition: .2s;
}
.year-btn:hover {
  background: var(--maroon);
  color: #fff;
}

/* ==================== LANGUAGE BUTTON ==================== */
.lang-btn.active {
  background: #fff !important;
  color: var(--maroon) !important;
  border-color: #fff !important;
}

/* ==================== FOOTER ==================== */
footer {
  letter-spacing: .3px;
}

/* ==================== MOBILE DROPDOWN ==================== */
.navbar-collapse {
  background-color: var(--maroon);
  padding: 0.5rem 1rem;
  border-radius: 0 0 8px 8px;
}

.navbar-collapse .nav-link {
  color: #f5e3b3 !important;
  padding: 0.5rem 0;
}
.navbar-collapse .nav-link:hover {
  color: #ffd966 !important;
}

/* ==================== FORM STYLES ==================== */
.form-control:focus {
  border-color: var(--maroon);
  box-shadow: 0 0 0 0.2rem rgba(91, 15, 15, 0.25);
}

.form-check-input:checked {
  background-color: var(--maroon);
  border-color: var(--maroon);
}

.form-check-input:focus {
  border-color: var(--maroon);
  box-shadow: 0 0 0 0.2rem rgba(91, 15, 15, 0.25);
}

.submission-type-card .form-check-input:checked + .form-check-label .border {
  border-color: var(--maroon) !important;
  background-color: var(--cream-soft);
}

.submission-type-card .form-check-label:hover .border {
  border-color: var(--maroon);
  transition: border-color 0.2s;
}

.nav-link.active {
  color: var(--gold) !important;
  font-weight: 500;
}

/* ==================== ENHANCED SUBMIT PAGE STYLES ==================== */

/* Enhanced file upload area */
.file-upload-area {
  border: 2px dashed var(--maroon);
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  background-color: transparent;
}

.file-upload-area:hover {
  border-color: var(--maroon-dark);
  background-color: var(--cream-soft);
}

.file-upload-area.drag-over {
  border-color: var(--gold);
  background-color: var(--cream-soft);
  transform: scale(1.02);
  border-style: solid;
}

.upload-placeholder {
  padding: 3rem 2rem;
  transition: all 0.3s ease;
}

.upload-placeholder h6 {
  color: var(--maroon);
  font-weight: 600;
}

.upload-placeholder svg {
  color: var(--maroon);
  opacity: 0.7;
}

/* Progress bar styling */
.progress {
  background-color: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  transition: width 0.6s ease;
  border-radius: 10px;
  background: linear-gradient(45deg, var(--maroon), var(--maroon-dark));
}

/* Enhanced button loading state */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-loading .spinner-border {
  width: 1rem;
  height: 1rem;
}

/* Smooth transitions */
.transition-all {
  transition: all 0.3s ease;
}

/* Enhanced form validation */
.form-control.is-valid {
  border-color: #198754;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.8-.77-.76-.77-.76.77.72.77zm1.48-2.69L6.06 1.76l-.77-.77L3.88 2.4 2.4.92l-.77.77 1.48 1.48 1.77 1.77z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
  padding-right: calc(1.5em + 0.75rem);
}

.form-control.is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4 1.4-1.4M8.6 7.4 7.2 6 5.8 7.4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
  padding-right: calc(1.5em + 0.75rem);
}

/* Animation for submission type cards */
.submission-type-card {
  transition: all 0.3s ease;
}

.submission-type-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.submission-type-card .form-check-input:checked + .form-check-label {
  transform: translateY(-1px);
}

.submission-type-card .form-check-input:checked + .form-check-label .border {
  box-shadow: 0 4px 12px rgba(91, 15, 15, 0.2);
}

/* Character counter styling */
#charCount {
  font-weight: 500;
  color: var(--maroon);
  font-size: 0.875rem;
}

/* Alert positioning and styling */
.alert.position-fixed {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: none;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: #664d03;
  border-left: 4px solid #ffc107;
}

.alert-success {
  background-color: rgba(25, 135, 84, 0.1);
  color: #0f5132;
  border-left: 4px solid #198754;
}

/* File info display */
#fileInfo {
  animation: fadeInUp 0.3s ease;
}

#imagePreview {
  animation: fadeInUp 0.3s ease;
}

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

/* Enhanced card styling */
.card {
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-radius: 12px;
  overflow: hidden;
}

.card-body {
  padding: 2rem;
}

/* Section borders */
.border-bottom {
  border-bottom: 2px solid var(--cream-soft) !important;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

/* Form sections */
.mb-4 {
  margin-bottom: 2rem !important;
}

/* Icons in submission type cards */
.submission-type-card svg {
  opacity: 0.8;
  transition: all 0.3s ease;
}

.submission-type-card .form-check-input:checked + .form-check-label svg {
  opacity: 1;
  color: var(--maroon) !important;
}

/* Enhanced select styling */
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

.form-select:focus {
  border-color: var(--maroon);
  box-shadow: 0 0 0 0.2rem rgba(91, 15, 15, 0.25);
}


/* Mobile responsive improvements */
@media (max-width: 768px) {
  .navbar {
    height: auto !important;
    min-height: 70px !important;
    padding: 0.5rem 1rem !important;
  }
  
  .navbar-brand {
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    font-size: 1.1rem !important;
  }
  
  .logo-img {
    height: 55px !important;
    width: 55px !important;
    object-fit: contain !important;
  }
  
  .navbar-toggler {
    padding: 0.25rem 0.5rem !important;
    font-size: 1rem !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
  }
  
  .navbar-collapse {
    margin-top: 0.25rem;
    padding: 0.75rem;
  }
  
  body {
    padding-top: 80px !important; /* adjust for navbar */
  }
  
  .file-upload-area {
    margin: 1rem 0;
  }
  
  .upload-placeholder {
    padding: 2rem 1rem;
  }
  
  .upload-placeholder h6 {
    font-size: 1rem;
  }
  
  .upload-placeholder small {
    font-size: 0.875rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .submission-type-card {
    margin-bottom: 1rem;
  }
  
  .submission-type-card .form-check-label {
    width: 100%;
  }
  
  .progress {
    height: 6px;
  }
  
  .alert.position-fixed {
    right: 10px;
    left: 10px;
    top: 90px;
    min-width: auto;
  }
}
media (max-width: 576px) {
  .display-6 {
    font-size: 1.75rem;
  }
  
  .lead {
    font-size: 1rem;
  }
  
  .btn-lg {
    font-size: 1rem;
    padding: 0.75rem 2rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .row.g-3 {
    margin: 0 -0.5rem;
  }
  
  .row.g-3 > * {
    padding: 0 0.5rem;
  }
}

/* ==================== MEDIA QUERIES ==================== */
@/* Enhanced tablet responsive */
@media (max-width: 991px) and (min-width: 769px) {
  .navbar {
    height: auto !important;
    min-height: 80px !important;
    padding: 0.5rem 1rem !important;
  }
  
  .navbar-brand {
    height: 70px !important;
    display: flex !important;
    align-items: center !important;
  }
  
  .logo-img {
    height: 65px !important;
    width: 65px !important;
    object-fit: contain !important;
  }
  
  .navbar-collapse {
    margin-top: 0.5rem;
    background-color: var(--maroon);
    padding: 1rem;
    border-radius: 8px;
    margin-left: -1rem;
    margin-right: -1rem;
  }
  
  body {
    padding-top: 90px !important;
  }
}
media (max-width: 576px) {
  .navbar {
    min-height: 60px !important;
  }
  
  .navbar-brand {
    height: 50px !important;
    font-size: 1.1rem !important;
  }
  
  .logo-img {
    height: 40px !important;
    width: 40px !important;
  }
  
  body {
    padding-top: 60px !important;
  }
  
  .navbar-collapse {
    margin-top: 0.25rem;
    padding: 0.75rem;
  }
}
/* Enhanced tablet responsive */
@media (max-width: 991px) and (min-width: 769px) {
  .navbar {
    height: auto !important;
    min-height: 70px !important;
    padding: 0.5rem 1rem !important;
  }
  
  .navbar-brand {
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
  }
  
  .logo-img {
    height: 50px !important;
    width: 50px !important;
    object-fit: contain !important;
  }
  
  .navbar-collapse {
    margin-top: 0.5rem;
    background-color: var(--maroon);
    padding: 1rem;
    border-radius: 8px;
    margin-left: -1rem;
    margin-right: -1rem;
  }
  
  body {
    padding-top: 80px !important;
  }
}
/* ==================== ACCESSIBILITY IMPROVEMENTS ==================== */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  outline: 2px solid var(--maroon);
  outline-offset: 2px;
}

.btn:focus {
  outline: 2px solid var(--maroon);
  outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --maroon: #000000;
    --maroon-dark: #000000;
    --gold: #ffff00;
    --gold-dark: #cccc00;
    --cream: #ffffff;
    --cream-soft: #f0f0f0;
    --text: #000000;
  }
}

/* ==================== FOOTER LINK STYLES ==================== */
.footer-link {
  transition: color 0.3s ease;
  padding: 2px 8px;
  border-radius: 4px;
}

.footer-link:hover {
  color: var(--gold) !important;
  background-color: rgba(255, 255, 255, 0.1);
}

.footer-link.active {
  color: var(--gold) !important;
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.1);
}
/* ==================== ARCHIVE PAGE STYLES ==================== */
/* Archive filter section mobile improvements */
@media (max-width: 768px) {
  .archive-filter-section .col-lg-4 {
    text-align: center !important;
  }
  
  .archive-filter-section .d-flex.flex-column {
    align-items: center !important;
  }
  
  .archive-filter-section .btn-gold {
    margin-top: 0.5rem;
    width: 100%;
    max-width: 200px;
  }
  
  .archive-filter-section .d-flex.gap-2 {
    justify-content: center !important;
    flex-wrap: wrap;
  }
  
  .archive-filter-section .form-select {
    min-width: 140px !important;
    max-width: 160px;
  }
}

@media (max-width: 576px) {
  .archive-filter-section .d-flex.gap-2 {
    flex-direction: column;
    align-items: center;
  }
  
  .archive-filter-section .btn,
  .archive-filter-section .form-select {
    width: 100%;
    max-width: 200px;
  }
}/* ==================== ARCHIVE PAGE STYLES ==================== */
/* Archive filter section mobile improvements */
@media (max-width: 768px) {
  .archive-filter-section .col-lg-4 {
    text-align: center !important;
  }
  
  .archive-filter-section .d-flex.flex-column {
    align-items: center !important;
  }
  
  .archive-filter-section .btn-gold {
    margin-top: 0.5rem;
    width: 100%;
    max-width: 200px;
  }
  
  .archive-filter-section .d-flex.gap-2 {
    justify-content: center !important;
    flex-wrap: wrap;
  }
  
  .archive-filter-section .form-select {
    min-width: 140px !important;
    max-width: 160px;
  }
}

@media (max-width: 576px) {
  .archive-filter-section .d-flex.gap-2 {
    flex-direction: column;
    align-items: center;
  }
  
  .archive-filter-section .btn,
  .archive-filter-section .form-select {
    width: 100%;
    max-width: 200px;
  }
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--maroon-dark); /* ✅ matches your palette */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.8s ease;
}
#preloader.hidden {
  opacity: 0;
  pointer-events: none;
}
#preloader-logo {
  max-width: 85vw;   /* never wider than 85% of screen width */
  max-height: 85vh;  /* never taller than 85% of screen height */
  width: auto;       /* auto-scale */
  height: auto;      /* keep aspect ratio */
  animation: fadeInOut 2s infinite;

/*======error handling======*/
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.custom-alert {
    animation: slideInRight 0.3s ease-out;
}
