/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Force mobile layout override for get-started section */
@media(max-width: 768px) {
  .get-started-container {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* Tablet and Mobile Styles */
@media(max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
    cursor: pointer;
    z-index: 1001;
    position: relative;
    /* Ensure touch targets are large enough */
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    /* Improve touch interaction */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Prevent body scrolling when mobile menu is open */
  body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  /* Ensure mobile menu appears above everything */
  .mobile-menu {
    z-index: 1000;
    position: fixed !important;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
  }

  .mobile-menu.active {
    transform: translateY(0);
  }

  /* Improve mobile menu links for touch */
  .mobile-menu ul li a {
    min-height: 44px;
    display: flex !important;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* Ensure mobile menu doesn't interfere with admin toolbar */
  body.toolbar-horizontal .mobile-menu {
    top: calc(100% + 39px);
  }

  body.toolbar-horizontal.toolbar-tray-open .mobile-menu {
    top: calc(100% + 78px);
  }

  .logo-text {
    font-size: var(--font-size-xl);
  }

  .logo-icon {
    height: 35px;
  }

  .hero-container {
    min-height: 60vh;
    padding: 20px;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-left: 0;
  }

  .hero-info-box {
    grid-template-columns: 1fr;
    gap: 50px;
    padding: 50px 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-info-content h1 {
    font-size: var(--font-size-3xl);
    margin-bottom: 15px;
  }

  .hero-subtitle {
    font-size: var(--font-size-base);
    margin-bottom: 12px;
  }

  .hero-description {
    font-size: var(--font-size-sm);
  }

  .hero-database h2 {
    font-size: var(--font-size-xl);
    margin-bottom: 20px;
  }

  .counter-number {
    font-size: var(--font-size-6xl);
  }

  .counter-label {
    font-size: var(--font-size-sm);
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .feature-title {
    font-size: var(--font-size-2xl);
  }

  .feature-subtitle {
    font-size: var(--font-size-sm);
  }

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

  .auction-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .auction-content h2 {
    font-size: var(--font-size-3xl);
  }

  .auction-date {
    font-size: var(--font-size-lg);
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-logo-section {
    grid-column: 1 / 3;
    text-align: center;
    margin-bottom: 40px;
  }

  .footer-logo-section .footer-logo .logo-icon {
    height: 60px;
    width: auto;
  }

  .footer-logo-section .social-icons {
    margin-top: 25px;
    gap: 20px;
  }

  .footer-logo-section .social-icon-footer {
    font-size: 18px;
    padding: 12px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .newsletter-section {
    grid-column: 1 / 3;
    text-align: center;
    margin-bottom: 20px;
  }

  .footer-column {
    text-align: center;
  }
}

/* Mobile Styles */
@media(max-width: 480px) {
  .header-container {
    padding: 0 15px;
  }

  .logo-text {
    font-size: var(--font-size-lg);
  }

  .logo-icon {
    height: 30px;
  }

  .hero-container {
    padding: 15px;
    min-height: 50vh;
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .hero-info-box {
    padding: 30px 20px;
    border-radius: 15px;
    gap: 30px;
  }

  .hero-info-content h1 {
    font-size: var(--font-size-3xl);
    line-height: var(--line-height-tight);
  }

  .hero-subtitle {
    font-size: var(--font-size-sm);
  }

  .hero-description {
    font-size: var(--font-size-xs);
  }

  .hero-database h2 {
    font-size: var(--font-size-lg);
    margin-bottom: 15px;
  }

  .counter-number {
    font-size: var(--font-size-5xl);
    letter-spacing: var(--letter-spacing-tight);
  }

  .counter-label {
    font-size: var(--font-size-xs);
  }

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

  .features-section {
    padding: 40px 0;
  }

  .feature-image img {
    height: 220px;
  }

  .feature-title {
    font-size: var(--font-size-xl);
  }

  .feature-subtitle {
    font-size: var(--font-size-sm);
  }

  .get-started-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .get-started-content {
    padding-right: 0 !important;
    text-align: left !important;
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .video-container {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0 !important;
  }

  .get-started-section {
    padding: 40px 0 !important;
  }

  .get-started-title {
    font-size: var(--font-size-4xl) !important;
  }

  .get-started-description {
    font-size: var(--font-size-sm) !important;
  }

  .events-title {
    font-size: var(--font-size-4xl);
  }

  .events-subtitle {
    font-size: var(--font-size-base);
  }

  .upcoming-events-section {
    height: 250px;
  }

  .auction-content h2 {
    font-size: 24px;
  }

  .auction-section {
    padding: 40px 0;
  }

  .footer {
    padding: 40px 0 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .footer-logo-section,
  .newsletter-section {
    grid-column: 1;
  }

  .footer-logo-section .footer-logo .logo-icon {
    height: 70px;
    width: auto;
  }

  .footer-logo-section .social-icons {
    margin-top: 30px;
    gap: 25px;
  }

  .footer-logo-section .social-icon-footer {
    font-size: 20px;
    padding: 15px;
    min-width: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .social-icons {
    justify-content: center;
  }

  .newsletter-form {
    max-width: 300px;
    margin: 0 auto;
  }
}

/* Small Mobile Styles */
@media(max-width: 320px) {
  .logo-text {
    font-size: var(--font-size-base);
  }

  .logo-icon {
    height: 28px;
  }

  .hero-info-content h1 {
    font-size: var(--font-size-xl);
  }

  .get-started-container {
    padding: 0 15px !important;
    gap: 20px !important;
  }

  .get-started-content {
    text-align: center !important;
  }

  .get-started-title {
    font-size: var(--font-size-3xl) !important;
  }

  .get-started-description {
    font-size: var(--font-size-sm) !important;
  }

  .events-title {
    font-size: var(--font-size-3xl);
  }

  .events-subtitle {
    font-size: var(--font-size-sm);
  }

  .upcoming-events-section {
    height: 200px;
  }

  .auction-content h2 {
    font-size: var(--font-size-xl);
  }

  .header-container {
    padding: 0 10px;
  }
}

/* Large Desktop Styles */
@media(min-width: 1400px) {
  .hero-container {
    max-width: 1800px;
  }

  .hero-info-content h1 {
    font-size: var(--font-size-5xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-base);
  }

  .hero-description {
    font-size: var(--font-size-lg);
  }

  .counter-number {
    font-size: 5.25rem; /* 84px - custom size for large screens */
  }

  .feature-title {
    font-size: var(--font-size-3xl);
  }

  .feature-subtitle {
    font-size: var(--font-size-lg);
  }

  .get-started-title {
    font-size: 3.25rem; /* 52px - custom size for large screens */
  }

  .events-title {
    font-size: 3.25rem; /* 52px - custom size for large screens */
  }
}

/* Print Styles */
@media print {

  .header,
  .mobile-menu,
  .video-container,
  .upcoming-events-section,
  .footer {
    display: none;
  }

  .main-content {
    margin-top: 0;
  }

  body {
    background: white;
    color: black;
  }

  .hero-info-box,
  .feature-card {
    border: 1px solid #ccc;
    background: white;
    color: black;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .hero-info-box {
    border: 3px solid #FFFFFF;
  }

  .feature-card {
    border: 2px solid #FFFFFF;
  }

  .nav-menu li a::after,
  .mobile-menu ul li a::after {
    background-color: #FFFFFF;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .feature-card::before {
    animation: none !important;
  }

  .loading-spinner {
    animation: none !important;
  }
}

/* ========================================
   SEARCH PAGE RESPONSIVE STYLES
======================================== */

/* Mobile Responsive for Search Page */
@media(max-width: 768px) {
  /* Search Page Container */
  .container {
    padding: 15px;
  }

  .page-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  /* Mobile Controls */
  .mobile-controls {
    display: flex;
  }

  .search-subtitle {
    display: block;
  }

  /* Layout Changes */
  .search-layout {
    grid-template-columns: 1fr;
  }

  /* Mobile Sidebar */
  .search-filters {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background-color: #000000;
    padding: 20px;
    z-index: 1000;
    overflow-y: auto;
    border-right: 1px solid #38383B;
  }

  .search-filters.active {
    transform: translateX(300px);
  }

  .filter-close {
    display: block;
    background: none;
    border: none;
    color: #A8A6A1;
    font-size: 24px;
    cursor: pointer;
    margin-bottom: 20px;
    padding: 5px;
  }

  /* Results Display */
  .results-header {
    display: none;
  }

  .results-list {
    display: none;
  }
}

/* ========================================
   ARTIFACT DETAILS RESPONSIVE STYLES
======================================== */

/* Tablet Responsive */
@media (max-width: 1024px) {
  .container {
    padding: 30px 15px;
  }

  .artifact-details {
    gap: 40px;
  }

  .artifact-title {
    font-size: 24px;
  }

  .corrections-section {
    padding: 30px;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .container {
    padding: 20px 10px;
  }

  .artifact-details {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .images-column,
  .details-column {
    padding: 0;
  }

  .artifact-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .detail-item {
    flex-direction: column;
    gap: 5px;
    padding: 15px 0;
  }

  .detail-label {
    min-width: auto;
    color: #A8A6A1;
    font-size: 14px;
  }

  .detail-value {
    text-align: left;
    font-size: 16px;
  }

  .thumbnail-slider {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    overflow-x: visible; /* Allow wrapping instead of horizontal scroll */
    padding: 10px 0;
  }

  .thumbnail {
    min-width: 70px;
    height: 70px;
    flex-shrink: 0;
  }

  /* Ensure main image container works properly without magnify */
  .main-image-container {
    cursor: default !important;
  }

  .main-image {
    max-width: 100%;
    height: auto;
  }

  /* Override any magnify plugin styles on mobile */
  .magnify {
    display: block !important;
    position: static !important;
  }

  .magnify .main-image,
  .magnify img {
    max-width: 100% !important;
    height: auto !important;
    position: static !important;
  }

  .corrections-section {
    padding: 20px;
    margin: 40px 0;
  }

  .corrections-title {
    font-size: 18px;
  }

  .lightbox-close {
    font-size: 30px;
    top: 15px;
    right: 20px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .artifact-title {
    font-size: 20px;
  }

  .main-image {
    max-width: 100%;
  }

  .thumbnail {
    min-width: 60px;
    height: 60px;
  }

  .form-input,
  .form-textarea {
    padding: 10px;
  }

  .submit-btn {
    width: 100%;
    padding: 15px;
  }
}

/* ========================================
   CONTENT BLOCK RESPONSIVE STYLES
======================================== */

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 20px 15px;
  }

  .node-type--artifacts #block-artifactinfo-content {
    font-size: 15px;
  }

  .node-type--artifacts #block-artifactinfo-content h1 {
    font-size: 28px;
  }

  .node-type--artifacts #block-artifactinfo-content h2 {
    font-size: 22px;
  }

  .node-type--artifacts #block-artifactinfo-content h3 {
    font-size: 18px;
  }

  /* On mobile, make all images center-aligned for better readability */
  .node-type--artifacts #block-artifactinfo-content img.align-left,
  .node-type--artifacts #block-artifactinfo-content img.align-right {
    float: none;
    display: block;
    margin: 20px auto;
    max-width: 100%;
  }

  .lightbox-close {
    font-size: 30px;
    top: 15px;
    right: 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px 10px;
  }

  .path--learning-center .container {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .node-type--artifacts #block-artifactinfo-content {
    font-size: 14px;
  }

  .node-type--artifacts #block-artifactinfo-content h1 {
    font-size: 24px;
  }

  .node-type--artifacts #block-artifactinfo-content img.align-left,
  .node-type--artifacts #block-artifactinfo-content img.align-right {
    margin: 15px auto;
  }
}

/* Print Styles */
@media print {
  body {
    background-color: white;
    color: black;
  }

  .node-type--artifacts #block-artifactinfo-content img {
    border: 1px solid #ccc;
  }
}
