/* -- CHARACTER Gallery STYLES -- */

.gallery-section {
  width: 1400px;
  padding: var(--space-xl) var(--space-md);
  margin: 0 auto;
}
.gallery-title {
  font-size: var(--font-size-large);
  font-weight: 600;
  color: var(--color-text-dark);
  margin: 0;
}

.character-grid, .environment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0 auto;
  margin-bottom: 20px;
  padding-top: 3rem;
}

.character-card, .environment-card {
  display: block;
  background-color: var(--color-bg-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 335px; 
  height: 475px;
}

.environment-card {
  width: 690px; 
  height: 341px; 
}
.character-card:hover, .environment-card:hover {
  transform: translateY(0px) scale(1.02);
  box-shadow: var(--shadow-card-hover);
}

.character-card img, .environment-card img {
  display: block;
  width: 100%;
  height: auto;
}

.card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 20%, transparent 100%);
  padding: 3.75rem var(--space-md) var(--space-md) var(--space-md);
  box-sizing: border-box;
  text-align: center;
}
.card-info .card-title {
  font-size: 1.5rem;
  font-weight: 300;
  margin: 0;
  color: var(--color-bg-white);
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* --- Concluding CTA Banner --- */
.cta-banner {
  height: 350px;
  background-color: #ffff;
  margin: var(--space-xl) 0 var(--space-sm) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.1) ;

}
.cta-title {
  font-size: var(--font-size-large);
  font-weight: 600;
  color: var(--color-text-dark);
  margin: 0 0 2rem 0;
}
.cta-banner .realistic-glass-button {
  background-color: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(0, 0, 0, 0.1);
  color: var(--color-text-dark);
}

/* =================================================================== */
/* ==       PORTFOLIO PAGES - SKELETON PLACEHOLDER STYLES           == */
/* =================================================================== */

/* --- 1. Shared Component Placeholders (Headers, Heroes, etc.) --- */

/* Hides the main hero image on portfolio pages */
body.is-loading .hero-image {
  visibility: hidden;
}

/* For the main titles on pages like Characters, Environments, etc. */
body.is-loading .page-title,
body.is-loading .page-slogan {
  /* It relies on @keyframes placeholder-shimmer from common.css */
  animation: placeholder-shimmer 2s linear infinite;
  background-color: #e0e0e0;
  background-image: linear-gradient(to right, #e0e0e0 0%, #f0f0f0 40%, #e0e0e0 80%, #e0e0e0 100%);
  background-repeat: no-repeat;
  background-size: 2000px 100%;
  color: transparent !important;
  border-radius: var(--radius-xs);
}
body.is-loading .page-title {
  height: 65px;
  width: 270px;
}
body.is-loading .page-slogan {
  height: 36px;
  width: 325px;
}

body.is-loading .hero-image-wrapper {
  animation: placeholder-shimmer 2s linear infinite;
  background-color: #e0e0e0;
  background-image: linear-gradient(to right, #e0e0e0 0%, #f0f0f0 40%, #e0e0e0 80%, #e0e0e0 100%);
  background-repeat: no-repeat;
  background-size: 2000px 100%;
  border-radius: var(--radius-lg);
  width: 1920px;
  height: 1260px;
}

body.is-loading .gallery-title {
  animation: placeholder-shimmer 2s linear infinite;
  background-color: #e0e0e0;
  background-image: linear-gradient(to right, #e0e0e0 0%, #f0f0f0 40%, #e0e0e0 80%, #e0e0e0 100%);
  background-repeat: no-repeat;
  background-size: 2000px 100%;
  color: transparent !important;
  border-radius: var(--radius-xs);
  height: 40px;
  width: 200px;
}

body.is-loading .cta-banner .cta-title {
  animation: placeholder-shimmer 2s linear infinite;
  background-color: #d1d1d1;
  background-image: linear-gradient(to right, #d1d1d1 0%, #e0e0e0 40%, #d1d1d1 80%, #d1d1d1 100%);
  background-repeat: no-repeat;
  background-size: 2000px 100%;
  color: transparent !important;
  border-radius: var(--radius-xs);
  height: 65px;
  width: 550px;
  margin-bottom: 2rem;
}
body.is-loading .cta-banner .realistic-glass-button {
  visibility: hidden;
}

.card-skeleton {
  border-radius: var(--radius-md);
  background-color: #3a3a3e;
  animation: placeholder-shimmer 2s linear infinite;
  background-image: linear-gradient(to right, #3a3a3e 0%, #4a4a4e 40%, #3a3a3e 80%, #3a3a3e 100%);
  background-size: 2000px 100%;
}

.character-skeleton {
  width: 405px;
  height: 575px;
}

.environment-skeleton {
  width: 810px;
  height: 400px;
}

.character-card.hidden,
.environment-card.hidden {
  display: none !important;
}

/* --- Main Responsive Styles --- */
@media (max-width: 1440px) {

  .gallery-section {
    width: 965px;
    border-top: 1px solid var(--color-bg-medium) ;
    padding: 2rem 0;
    margin: 0 auto;
  }
  .character-grid, .environment-grid {
    justify-content: center;
    gap: 0.6rem;
  }
  .character-card, .environment-card {
    width: 220px;
    height: 312px;
    margin: 0;
    border-radius: var(--radius-sm);
  }
  .environment-card {
    width: 620px; 
    height: auto; 
  }   
  .card-info .card-title {
    font-size: 1.1rem;
  }
  .cta-banner {
    height: 250px;
    margin: var(--space-md) 0 var(--space-sm) 0;
  }
  .cta-title {
    font-size: 2rem;
  }
  .cta-banner .realistic-glass-button {
    font-size: 1rem;
    padding: 0.7rem 1rem;
  }
}
@media (max-width: 1069px) {

  .gallery-section {
    width: 775px;
    border-top: 1px solid var(--color-bg-medium) ;
    padding: 2rem 0;
    margin: 0 auto;
  }
  .character-grid, .environment-grid {
    justify-content: center;
    gap: 0.6rem;
  }
  .character-card, .environment-card {
    width: 185px;
    height: 262px;
    margin: 0;
    border-radius: var(--radius-sm);
  }
  .environment-card {
    width: 700px; 
    height: auto; 
  }   
  .card-info .card-title {
    font-size: 1.1rem;
  }
  .cta-banner {
    height: 250px;
    margin: var(--space-md) 0 var(--space-sm) 0;
  }
  .cta-title {
    font-size: 2rem;
  }
  .cta-banner .realistic-glass-button {
    font-size: 1rem;
    padding: 0.7rem 1rem;
  }
}

@media (max-width: 832px) {
  .gallery-section{
    width: 700px;
  }
  .gallery-title{
    font-size: 2rem;
    font-weight: 400;
  }
  .character-card{
    width: 220px;
    height: 312px;
  }
  .card-info .card-title{
    font-size: 0.7rem;
    font-weight: 400;
  }
  .environment-card {
    width: 85%; 
    height: auto; 
  }
  .cta-title {
    font-size: 1.7rem;
    margin: 1rem auto;
    padding: 0;
  }
  .cta-banner .realistic-glass-button{
    font-size: 1rem;
  }
}

@media (max-width: 734px) {
  .gallery-section{
    width: 410px;
    text-align: center;
  }
  .gallery-title{
    font-size: 2rem;
    font-weight: 400;
  }
  .character-card{
    width: 195px;
    height: 277px;
  }
  .card-info{
    display: none;  
  }
  .card-title{
    display: none;
  }
  .environment-card {
    width: 85%; 
    height: auto; 
  }
  .cta-title {
    font-size: 1rem;
    margin: 1rem auto;
    padding: 0;
  }
  .cta-banner .realistic-glass-button{
    font-size: 0.7rem;
  }
}

/* --- Responsive Skeleton Placeholders --- */

@media (max-width: 1069px) {
  body.is-loading .hero-image-wrapper {
    height: 800px;
  }
  body.is-loading .gallery-title {
    margin-left: auto;
    margin-right: auto;
  }
  .environment-skeleton {
    width: 700px;
  }
}

@media (max-width: 832px) {
  body.is-loading .page-title,
  body.is-loading .page-slogan {
    margin-left: 0;
    margin-right: 0;
  }
  body.is-loading .cta-banner .cta-title {
    width: 90%;
  }
  .environment-skeleton {
    width: 730px;
  }
}

@media (max-width: 734px) {
  body.is-loading .hero-image-wrapper {
    height: 500px;
  }
  body.is-loading .page-title {
    width: 60%;
    min-height: 40px;
  }
  body.is-loading .page-slogan {
    width: 50%;
    min-height: 24px;
  }
  body.is-loading .gallery-title {
    width: 40%;
  }
  .character-skeleton,
  .environment-skeleton {
    width: 85%;
  }
  body.is-loading .cta-banner .cta-title {
    height: 50px;
    width: 80%;
  }
}