/* ============================================
   EVENTS GALLERY - RESPONSIVE STYLES
   ============================================ */

/* ---------- Large Desktop (1400px+) ---------- */
@media (min-width: 1400px) {
  .hero-title {
    font-size: 3.5rem;
  }

  .event-hero-title {
    font-size: 3rem;
  }
}

/* ---------- Laptop (992px - 1199px) ---------- */
@media (max-width: 1199.98px) {
  .hero-title {
    font-size: 2.75rem;
  }

  .event-hero-title {
    font-size: 2.25rem;
  }
}

/* ---------- Tablet (768px - 991px) ---------- */
@media (max-width: 991.98px) {
  .hero-section {
    min-height: 240px;
  }

  .hero-content {
    padding: 50px 0;
  }

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

  .stats-card {
    padding: 36px 24px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .event-hero {
    min-height: 420px;
  }

  .event-hero-title {
    font-size: 2rem;
  }

  .lightbox-main {
    padding: 0 60px;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .navbar-nav {
    padding: 16px 0;
  }

  .navbar-nav .nav-link::after {
    display: none;
  }

  .btn-search-nav {
    margin-top: 8px;
  }
}

/* ---------- Mobile Landscape / Small Tablet (576px - 767px) ---------- */
@media (max-width: 767.98px) {
  .top-bar {
    padding: 6px 0;
    font-size: 0.75rem;
  }

  .top-bar-social {
    gap: 8px;
  }

  .brand-title {
    font-size: 0.6rem;
  }

  .brand-subtitle {
    font-size: 0.55rem;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .hero-section {
    min-height: 200px;
  }

  .hero-content {
    padding: 40px 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .events-section {
    padding: 40px 0 50px;
  }

  .event-card-body {
    padding: 16px;
  }

  .date-box {
    width: 50px;
    padding: 8px 6px;
  }

  .date-day {
    font-size: 1.25rem;
  }

  .pagination .page-link {
    padding: 8px 12px;
    font-size: 0.875rem;
    margin: 0 2px;
  }

  .stats-section {
    padding: 0 0 60px;
  }

  .stats-card {
    padding: 28px 16px;
  }

  .stat-icon {
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
  }

  .stat-number {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .site-footer {
    padding: 40px 0 24px;
  }

  .event-hero {
    min-height: 380px;
  }

  .event-hero-content {
    padding: 24px 0 40px;
  }

  .event-hero-top {
    margin-bottom: 24px;
  }

  .event-hero-title {
    font-size: 1.75rem;
  }

  .event-meta {
    gap: 16px;
    font-size: 0.85rem;
  }

  .event-hero-desc {
    font-size: 0.875rem;
  }

  .event-hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .gallery-section {
    padding: 40px 0 60px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .gallery-hover-title {
    font-size: 1rem;
  }

  .gallery-hover-text {
    font-size: 0.8rem;
  }

  .gallery-hover-icon {
    font-size: 1.5rem;
  }

  .gallery-hint {
    font-size: 0.8rem;
    margin-top: 24px;
    padding: 0 8px;
  }

  .lightbox-main {
    padding: 0 48px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .lightbox-controls {
    bottom: 90px;
    right: 12px;
  }

  .lightbox-thumb {
    width: 60px;
    height: 45px;
  }

  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

/* ---------- Mobile Portrait (max 575px) ---------- */
@media (max-width: 575.98px) {
  body {
    font-size: 15px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-breadcrumb {
    font-size: 0.8125rem;
  }

  .event-card-title {
    font-size: 0.9375rem;
  }

  .pagination .page-link {
    padding: 6px 10px;
    font-size: 0.8125rem;
  }

  /* Hide some pagination numbers on very small screens */
  .pagination .page-item.page-number:not(.active):not(:first-child):not(:last-child) {
    display: none;
  }

  .pagination .page-item.page-number.active,
  .pagination .page-item:first-child,
  .pagination .page-item:last-child,
  .pagination .page-item:nth-child(2),
  .pagination .page-item:nth-last-child(2) {
    display: list-item;
  }

  .event-hero-title {
    font-size: 1.5rem;
  }

  .btn-back {
    width: 100%;
    justify-content: center;
    font-size: 0.8125rem;
    padding: 8px 16px;
  }

  .event-hero-top {
    flex-direction: column;
  }

  .lightbox-header {
    padding: 12px 16px;
  }

  .lightbox-main {
    padding: 0 36px;
  }

  .lightbox-image-wrap {
    max-height: 55vh;
  }

  .lightbox-image {
    max-height: 55vh;
  }

  .lightbox-thumbnails {
    padding: 12px 16px 16px;
    justify-content: flex-start;
  }

  .lightbox-control-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}

/* ---------- Prevent horizontal scroll ---------- */
@media (max-width: 991.98px) {
  .container {
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ---------- Touch devices: persistent caption strip ---------- */
@media (hover: none) and (pointer: coarse) {
  .gallery-hover-overlay {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    background: linear-gradient(to top, rgba(30, 64, 175, 0.88) 0%, transparent 55%);
    align-items: flex-end;
    padding-bottom: 14px;
  }

  .gallery-hover-content {
    opacity: 1;
    transform: translateY(0);
  }

  .gallery-hover-icon,
  .gallery-hover-action {
    display: none;
  }

  .gallery-hover-title {
    font-size: 0.85rem;
  }

  .gallery-hover-text {
    font-size: 0.75rem;
  }

  .gallery-hint {
    display: none;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---------- Print ---------- */
@media print {
  .top-bar,
  .main-header,
  .pagination-wrapper,
  .scroll-to-top,
  .page-loader,
  .lightbox {
    display: none !important;
  }

  .hero-section,
  .event-hero {
    min-height: auto;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
