/* ============================= */
/* Media Gallery - TikTok-Inspired Grid Design */
/* ============================= */

.media-gallery-wrapper {
}

.media-gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(160deg, #ff6f91, #ff9671);
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    border-radius: 20px;
}

.gallery-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.gallery-header h1 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.gallery-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.gallery-meta span {
    color: #f6f2f2;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gallery-meta i { color: #bbb; }
.gallery-views { color: #00f0ff !important; font-weight: 600; }

.gallery-description {
    color: #eee;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ============================= */
/* Swiss Grid Layout - Asymmetric TikTok Style */
/* ============================= */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
    margin-bottom: 60px;
}
@media (min-width: 768px) {
    .media-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 220px;
    }
}

.media-item {
    position: relative;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.media-item:nth-child(4n+1) { grid-row: span 2; }
.media-item:nth-child(7n+2) { grid-column: span 2; }
.media-item:nth-child(5n+3) { grid-row: span 2; grid-column: span 2; }

.media-item:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 40px rgba(0, 240, 255, 0.3);
    z-index: 10;
}

.media-item.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: auto;
}

.media-item.fullscreen img,
.media-item.fullscreen video {
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    display: block;
    object-fit: contain;
}

/* ============================= */
/* Media Content Styling */
/* ============================= */
.media-content {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.media-content img,
.media-content video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

/* ============================= */
/* Caption Overlay */
/* ============================= */
.media-caption {
    position: absolute;
    bottom: 75px;
    left: 0; right: 0;
    padding: 20px 15px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.media-item:hover .media-caption { opacity: 1; }
.media-caption p {
    color: #fff;
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}

/* ============================= */
/* Like/Dislike Actions */
/* ============================= */
.media-actions {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-around;
    padding: 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.7));
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.media-item:hover .media-actions { opacity: 1; }

.media-actions button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
}
.media-actions button:hover {
    background: rgba(0, 240, 255, 0.2);
    transform: scale(1.08);
}
.media-actions button.active {
    background: rgba(0, 240, 255, 0.3);
    border-color: rgba(0, 240, 255, 0.5);
}
.like-btn.active {
    background: rgba(0, 229, 255, 0.3);
    border-color: rgba(0, 229, 255, 0.5);
}
.dislike-btn.active {
    background: rgba(255, 48, 48, 0.3);
    border-color: rgba(255, 48, 48, 0.5);
}
.media-actions button .icon { font-size: 1.3rem; }
.media-actions button .count { font-size: 1rem; min-width: 22px; }

/* ============================= */
/* Default WP Comments - Sexy Neon (No Replies) */
/* ============================= */

/* Comments Container */
.comments-section {
  background: linear-gradient(160deg, #1a1a1a, #222);
    padding: 30px 15px;
  border-radius: 28px;
  box-shadow: 0 0 80px rgba(0, 217, 255, 0.4);
  margin-top: 50px;
  color: whitesmoke;
}

/* Comment Title */
.comments-section h3#comments {
  color: #00f0ff;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 30px;
  border-bottom: 2px solid rgba(0,240,255,0.4);
  padding-bottom: 12px;
  text-shadow: 0 0 8px #00f0ff;
}

/* Comment List */
ol.commentlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Single Comment */
.comment {
  background: linear-gradient(145deg, #111, #1b1b1b);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 25px;
  border-left: 5px solid #ff00ff;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.2);
  transition: all 0.3s ease, box-shadow 0.3s ease;
  color: #fff;
}

.comment:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.5), 0 8px 20px rgba(0, 240, 255, 0.3);
}

/* Comment Author */
.comment .comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.comment .comment-author img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  border: 2px solid #ff00ff;
  box-shadow: 0 0 12px #ff00ff77;
}

/* Comment Meta (Date/Edit Link) */
.comment .comment-meta {
  font-size: 0.85rem;
  color: #bbb;
  margin-bottom: 12px;
}

.comment .comment-meta a {
  color: #00f0ff;
  text-decoration: none;
  transition: all 0.2s;
}

.comment .comment-meta a:hover {
  color: #ff69b4;
  text-shadow: 0 0 6px #ff69b4;
}

/* Comment Text */
.comment .comment-content p {
  color: #fff;
  font-size: 1rem;
  line-height: 1.5;
  text-shadow: 0 0 4px #00f0ff, 0 1px 2px rgba(0,0,0,0.5);
}

/* Comment Form Container */
#respond, #commentform {
  margin-top: 50px;
  background: linear-gradient(160deg, #1a1a1a, #222);
  padding: 30px;
  border-radius: 24px;
  box-shadow: 0 0 60px rgba(0, 217, 255, 0.3);
}

/* Reply Title / Form Title */
#reply-title, #respond h3.comment-reply-title {
  color: #00f0ff;
  font-size: 1.5rem;
  margin-bottom: 18px;
  text-shadow: 0 0 8px #00f0ff;
}

/* Form Labels */
#commentform label {
  display: block;
  font-size: 0.95rem;
  color: #bbb;
  margin-bottom: 6px;
  text-shadow: 0 0 3px #000;
}

/* Form Inputs and Textarea */
#commentform input, #commentform textarea {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 16px;
  border: 1px solid #333;
  background: linear-gradient(90deg, #1c1c1c, #2a2a2a);
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

#commentform input:focus, #commentform textarea:focus {
  border-color: #ff00ff;
  background: linear-gradient(90deg, #222, #333);
  outline: none;
  box-shadow: 0 0 15px #ff00ff, 0 0 10px #00f0ff55;
}

/* Submit Button */
#commentform input[type="submit"] {
  background: linear-gradient(90deg, #00f0ff, #ff00ff);
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: 24px;
  padding: 14px 36px;
  cursor: pointer;
  transition: all 0.3s, transform 0.2s;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5), 0 0 20px rgba(255, 0, 255, 0.5);
}

#commentform input[type="submit"]:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px #00f0ff, 0 0 30px #ff00ff;
}

.media-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none; /* allow clicks to pass through */
    z-index: 1;
}

.media-caption {
    pointer-events: none; /* so clicks pass through caption as well */
}

.media-actions {
    pointer-events: auto; /* buttons remain clickable */
}

.video-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 5;
}

.video-controls button {
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.video-controls button:hover {
    background: rgba(0,240,255,0.8);
    color: #000;
}




/* ============================= */
/* Lightbox Overlay */
/* ============================= */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  overflow: auto;
}
.lightbox-overlay.active { display: flex; }

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  margin: auto;
}
.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  margin: auto;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 0.6rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
  z-index: 10000;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(0,0,0,0.9); }

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { top: 50%; left: 20px; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: 20px; transform: translateY(-50%); }

.lightbox-caption {
    color: #fff;
    font-size: 1rem;
    text-align: center;
    margin-top: 10px;
    line-height: 1.4;
    text-shadow: 0 0 6px rgba(0,0,0,0.7);
}


/* ============================= */
/* Mobile Responsive */
@media (max-width: 767px) {
    #respond {
        padding: 3px;
    }
    .media-gallery-container,
    #commentform {
        padding: 10px; /* minimal padding */
        border-radius: 12px; /* optional, can reduce radius too */
    }
    .media-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 180px;
        gap: 6px;
    }
    .gallery-header h1 { font-size: 1.8rem; padding: 10px 5px; }
    .media-caption { bottom: 50px; padding: 15px 10px 10px; }
    .media-caption p { font-size: 0.85rem; }
    .media-actions { padding: 8px; gap: 6px; }
    .media-actions button { padding: 8px 12px; font-size: 0.85rem; }
    .comments-section { padding: 10px 5px; border-radius: 12px; }
    .comment .comment-author img { width: 32px; height: 32px; }
    .comment .comment-content p { font-size: 0.95rem; }
    #commentform input, #commentform textarea { font-size: 0.95rem; }
    #commentform input[type="submit"] { font-size: 0.95rem; padding: 12px 28px; }
}
