/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */

.swiper-pagination-horizontal {
	padding-bottom: 15px !important;
}

/* =========================
   Layout Wrapper
========================= */
.student-single-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* =========================
   Back Button
========================= */
.student-back--text.elementor-button {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.student-back--text .elementor-button-text {
  color: var(--e-global-color-text) !important;
}
.student-back--text:hover .elementor-button-text {
  text-decoration: underline !important;
  opacity: 0.8;
}

/* =========================
   Featured Image
========================= */
.student-featured-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* =========================
   QUOTES
========================= */
.student-quotes blockquote {
  font-style: italic;
  margin-bottom: 20px;
  padding-left: 16px;
  border-left: 3px solid var(--e-global-color-accent, #333);
  color: var(--e-global-color-text, #555);
}

/* =========================
   VIDEOS
========================= */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin-bottom: 20px;
}

.video-wrapper iframe,
.video-wrapper embed,
.video-wrapper object {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* =========================
   LINKS
========================= */
.student-links {
  list-style: none;
  padding: 0;
}
.student-links li {
  margin-bottom: 8px;
}

/* =========================
   SECTION DIVIDER
========================= */
.student-section-divider {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--e-global-color-a6beaa5);
    margin: 15px 0 15px;
}

/* =========================
   GALLERY
========================= */
.dynamic-profile-gallery .wp-block-gallery {
  margin: 0;
}

.dynamic-profile-gallery .wp-block-image img {
  border-radius: 4px;
  object-fit: cover;
  width: 100%;
  height: auto;
}

/* =========================
   MOBILE FIXES
========================= */
@media (max-width: 767px) {
  .student-single-wrapper {
    padding: 20px 15px;
  }

  .video-wrapper {
    margin-bottom: 15px;
  }

  .dynamic-profile-gallery .wp-block-gallery {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* =========================
   SERVER-SIDE PAGINATED GALLERY
   Add these styles to your style.css
========================= */

/* Grid layout */
.elementor-widget-gallery .e-gallery-grid,
.elementor-widget-gallery .elementor-gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
}

/* Uniform square thumbnails */
.elementor-widget-gallery .e-gallery-item {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  position: relative !important;
}

/* Cover fill — hides overflow */
.elementor-widget-image-gallery .gallery-item img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  transition: transform 0.3s ease;
}

/* Hover zoom */
.elementor-widget-image-gallery .gallery-item:hover img {
  transform: scale(1.05);
}

/* Fade-in animation for newly loaded images */
.gallery-item-loaded {
  animation: galleryFadeIn 0.4s ease both;
}

@keyframes galleryFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading state */
.gallery-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--e-global-color-text, #777);
  font-size: 14px;
}

/* Error state */
.gallery-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px;
  color: #c0392b;
  font-size: 14px;
}

/* Load More button wrapper */
.gallery-load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.gallery-load-more-wrapper.all-loaded {
  display: none !important;
}

/* Load More button */
.gallery-load-more-btn {
  background: var(--e-global-color-primary, #333);
  color: #fff;
  border: none;
  padding: 12px 36px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  border-radius: 4px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  letter-spacing: 0.03em;
}

.gallery-load-more-btn:hover:not(:disabled) {
  opacity: 0.85;
  transform: translateY(-1px);
}

.gallery-load-more-btn:active:not(:disabled) {
  transform: translateY(0);
}

.gallery-load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive grid */
@media (max-width: 1024px) {
  .elementor-widget-image-gallery .gallery-grid,
  .elementor-widget-image-gallery .elementor-gallery-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 767px) {
  .elementor-widget-gallery .e-gallery-grid,
  .elementor-widget-gallery .elementor-gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 5px !important;
  }

  .gallery-load-more-btn {
    width: 100%;
    max-width: 320px;
  }
}