/* ==========================================================================
   style.css — custom styles Tailwind utilities can't express cleanly
   Nirmala M Halmandge Degree College, Bhalki
   ========================================================================== */

:root {
  --maroon: #7A1F2B;
  --maroon-dark: #5E1620;
  --marigold: #E8A33D;
  --marigold-dark: #C97F1F;
  --forest: #1F4D3D;
  --cream: #FBF6EC;
  --sand: #F0E4CC;
  --ink: #2B2420;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--cream);
  color: var(--ink);
}

.font-display {
  font-family: 'Lora', Georgia, serif;
}

/* ==========================================================================
   Custom scrollbar
   ========================================================================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--sand);
}
::-webkit-scrollbar-thumb {
  background: var(--maroon);
  border-radius: 6px;
  border: 2px solid var(--sand);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--maroon-dark);
}

/* ==========================================================================
   Noticeboard ticker — signature element
   A brass-plate notice board with a continuously scrolling message strip,
   referencing the physical noticeboards found in every Indian college office.
   ========================================================================== */
.noticeboard {
  background: linear-gradient(180deg, #2c2118 0%, #1c150e 100%);
  border-top: 1px solid rgba(232, 163, 61, 0.35);
  border-bottom: 1px solid rgba(232, 163, 61, 0.35);
  position: relative;
  overflow: hidden;
}

.noticeboard::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}

.noticeboard-label {
  background: var(--marigold);
  color: var(--ink);
  font-family: 'Lora', serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 2;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0% 100%);
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 32s linear infinite;
  width: max-content;
}

.noticeboard:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  color: var(--cream);
  padding: 0 2.5rem;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}

.ticker-item::after {
  content: '\2726';
  color: var(--marigold);
  margin-left: 2.5rem;
  font-size: 0.7rem;
}

/* ==========================================================================
   Seal / stamp motif — used on section eyebrows to echo institutional
   affiliation & grant-in-aid stamps common on Indian college documents
   ========================================================================== */
.seal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--maroon);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  position: relative;
}

.seal-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--marigold);
  flex-shrink: 0;
}

/* ==========================================================================
   Hairline divider with center ornament
   ========================================================================== */
.hairline-ornament {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hairline-ornament::before,
.hairline-ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122,31,43,0.35), transparent);
}

/* ==========================================================================
   Header dropdown
   ========================================================================== */
.nav-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* underline grow effect for top nav links */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--marigold);
  transition: width 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ==========================================================================
   Mobile menu accordion
   ========================================================================== */
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-submenu.open {
  max-height: 600px;
}
.mobile-chevron {
  transition: transform 0.25s ease;
}
.mobile-chevron.open {
  transform: rotate(180deg);
}

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Card hover lift
   ========================================================================== */
.lift-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.lift-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 38px -12px rgba(43, 36, 32, 0.25);
}

/* image zoom on hover within overflow-hidden parent */
.img-zoom {
  transition: transform 0.5s ease;
}
.group:hover .img-zoom {
  transform: scale(1.07);
}

/* ==========================================================================
   Gallery lightbox
   ========================================================================== */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 9, 0.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
#lightbox.open {
  display: flex;
}
#lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 4px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.lightbox-btn {
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.lightbox-btn:hover {
  background-color: var(--marigold);
  color: var(--ink);
}
.lightbox-btn:active {
  transform: scale(0.92);
}

/* ==========================================================================
   Gallery filter buttons
   ========================================================================== */
.filter-btn {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.filter-btn.active {
  background-color: var(--maroon);
  color: var(--cream);
  border-color: var(--maroon);
}

/* ==========================================================================
   Form focus states
   ========================================================================== */
.field-input:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(122, 31, 43, 0.12);
}

/* ==========================================================================
   Back to top button
   ========================================================================== */
#backToTop {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}
#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ==========================================================================
   Visible keyboard focus everywhere
   ========================================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--marigold);
  outline-offset: 2px;
}

/* ==========================================================================
   Hero diagonal accent clip
   ========================================================================== */
.hero-clip {
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}

/* ==========================================================================
   Pattern background (subtle texture for section variety, no images)
   ========================================================================== */
.pattern-dots {
  background-image: radial-gradient(rgba(122,31,43,0.08) 1.4px, transparent 1.4px);
  background-size: 18px 18px;
}
