/* ================= ART GALLERY ================= */
#art-tabs {
  padding: 60px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: visible;
}

#art-tabs::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background-image: 
    linear-gradient(#aaa 1px, transparent 1px),
    linear-gradient(90deg, #ccc 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.25; 
  z-index: -1;
  pointer-events: none;
}

#art-tabs .tabs-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

#art-tabs .tabs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

#art-tabs .tabs-header h2 {
  font-size: 2rem;
  background: #fff;
  color: #333;
  padding: 10px 25px;
  border-radius: 20px;
  box-shadow: 0 0 25px rgba(107, 42, 165, 0.15);
  font-weight: 700;
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#art-tabs .tabs-header h2:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(107, 42, 165, 0.2);
}

#art-tabs .tabs-header input,
#art-tabs #sortSelect {
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: border 0.3s;
}

#art-tabs .tabs-header input {
  flex: 1;
  width: 220px;
}

#art-tabs .tabs-header input:focus,
#art-tabs #sortSelect:focus {
  border-color: #6b2aa5;
  outline: none;
}

#art-tabs #tabs-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 25px;
}

#art-tabs .tab-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background-color: #e0e0e0;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s, transform 0.2s;
}

#art-tabs .tab-btn:hover {
  background-color: #d0c4ff;
  transform: translateY(-2px);
}

#art-tabs .tab-btn.active {
  background-color: #6b2aa5;
  color: #fff;
  transform: translateY(-2px);
}

/* ===== Gallery grid ===== */
#art-tabs #posts-display {
  display: grid;
  gap: 15px;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Art card styling */
#art-tabs .art-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 250px;
  padding: 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

#art-tabs .art-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(107, 42, 165, 0.15);
}

#art-tabs .art-card img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
}

#art-tabs .art-card h3 {
  margin: 10px 0 5px;
  font-size: 1rem;
  color: #222;
}

#art-tabs .art-card .read-more {
  display: inline-block;
  width: auto;
  padding: 0.3em 0.6em;
  margin: 5px auto 0 auto; /* center horizontally */
  background-color: #6b2aa5;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  transition: background 0.3s, transform 0.2s;
}

#art-tabs .art-card .read-more:hover {
  background-color: #541d82;
  transform: translateY(-2px);
}

/* Hover overlay for expand text */
#art-tabs .image-wrapper {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

#art-tabs .image-wrapper .expand-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(107, 42, 165, 0.75);
  color: #fff;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

#art-tabs .image-wrapper:hover .expand-text {
  opacity: 1;
}

/* ===== Lightbox ===== */
#art-tabs .lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
  z-index: 1000;
}

#art-tabs .lightbox-img {
  max-width: 90%;
  max-height: 70%;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

#art-tabs .lightbox-caption .read-more-lightbox {
  display: inline-block;
  background-color: #6b2aa5;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 10px;
  transition: background 0.3s, transform 0.2s;
}

#art-tabs .lightbox-caption .read-more-lightbox:hover {
  background-color: #541d82;
  transform: translateY(-2px);
}

#art-tabs .lightbox .close {
  position: fixed;
  top: 20px;
  right: 20px;
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 1100;
  transition: color 0.3s;
}

#art-tabs .lightbox .close:hover {
  color: #6b2aa5;
}

/* ===== Gallery arrows ===== */
#art-tabs .gallery-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

#art-tabs .nav-btn {
  background-color: #6b2aa5;
  color: #fff;
  border: none;
  font-size: 1.8rem;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

#art-tabs .nav-btn:hover {
  background-color: #541d82;
  transform: scale(1.1);
}

#art-tabs .nav-btn:disabled {
  background-color: #ccc;
  cursor: default;
  transform: none;
}

/* ===== GRID COLUMNS ===== */
@media (min-width: 981px) { #posts-display { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 980px) { #posts-display { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 650px) { #posts-display { grid-template-columns: 1fr; } }

@media (max-width: 650px) {
  #art-tabs .nav-btn { width: 35px; height: 35px; font-size: 1.5rem; }
  #art-tabs .tabs-header input,
  #art-tabs #sortSelect { width: 90%; }
  #art-tabs .tabs-header h2 { font-size: 1.5rem; }
}

.art-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.art-card .image-wrapper {
  width: 100%;
  flex: 0 0 auto; /* default height */
}

.art-card .image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.art-card .image-wrapper.no-link {
  flex: 1 1 auto; /* take all available vertical space */
}

.art-card .image-wrapper.no-link img {
  height: 100%;
  max-width: 200px;
  object-fit: cover;
}
