/* =====================
   Index Page Styles
   ===================== */

/* Main sections */
.first-section,
.second-section,
.third-section,
.fourth-section {
  margin-bottom: var(--space-lg);
}

/* Profile section */
.profile-container {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.profile-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

/* Profile main row */
.profile-main-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.profile-image-large {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  box-shadow: var(--shadow-md) border-box;
  background: var(--gradient-primary) border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-image-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-main-info {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-start;
  justify-content: center;
}

.profile-info-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  width: 100%;
}

.profile-info-row .info-item {
  background: var(--color-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1rem;
  color: var(--color-text);
  transition: all 0.3s ease;
}

.profile-info-row .info-item i {
  font-size: 1.3rem;
}

/* Social section */
.social-section {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.social-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.social-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-sm);
}

.social-card {
  background: var(--color-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.social-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.social-card:hover {
  transform: translateY(-3px);
  background: var(--gradient-primary-transparent);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.social-card i {
  font-size: 2.5rem;
  width: 60px;
}

.svg-icon {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.social-card-content h3 {
  margin-bottom: var(--space-xs);
}

/* Recent Fursonas Section */
.recent-fursonas-section {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.recent-fursonas-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.recent-fursonas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}

.recent-fursona-item {
  cursor: pointer;
  transition: all 0.3s ease;
}

.fursona-image-container {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.fursona-image-container img {
  width: 100%;
  height: 100%;
  background: var(--color-bg-alt);
  object-fit: cover;
  transition: transform 0.5s ease;
}

.recent-fursona-item:hover .fursona-image-container img {
  transform: scale(1.1);
}

.fursona-info-content {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-sm);
  gap: 0;
}

.fursona-info-content p {
  margin: 0;
}

.new-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--color-green-dark);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.fursona-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--gradient-dark-overlay);
  padding: var(--space-sm);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.recent-fursona-item:hover .fursona-overlay {
  opacity: 1;
}

/* Modal */
.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.gallery-modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
}

.modal-title {
  font-weight: bold;
}

.modal-header-actions {
  margin: var(--space-sm);
  display: flex;
  justify-content: flex-end;
}
/* Image Detail Modal */
#imageDetailModal .modal-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.image-detail-container {
  display: flex;
  flex-grow: 1;
  gap: var(--space-md);
  overflow: hidden;
}

.image-detail-view {
  flex: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.image-detail-view img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-detail-info {
  flex: 1;
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.image-detail-info h3 {
  font-size: 1.5rem;
  color: var(--color-primary);
}

.image-detail-info p {
  flex-grow: 1;
  overflow-y: auto;
}

.image-detail-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
}


/* Setups section */
.setups-section {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.setups-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.setups-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-sm);
}

.setup-card {
  background: var(--color-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  gap: var(--space-md);
  flex-direction: column;
}

.setup-card-content {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  align-items: center;
}

.setup-card:hover {
  box-shadow: var(--shadow-lg);
  background: var(--color-bg-alt);
}

.setup-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.setup-main-picture {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  width: 400px;
  height: 400px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  position: relative;
}

.setup-main-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.setup-card:hover .setup-main-picture img {
  transform: scale(1.05);
}

.setup-thumbnails {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem;
  justify-content: center;
  max-width: 100%;
  overflow-x: hidden;
}

.setup-thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.setup-thumbnails .thumbnail {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.setup-thumbnails .thumbnail:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.setup-right {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.setup-info {
  padding: var(--space-sm);
  text-align: center;
  font-size: 0.9rem;
}

.setup-info ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xs);
}

.setup-info li {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: var(--space-sm) var(--space-sm);
  background: var(--color-secondary);
  border-radius: var(--radius-md);
  gap: var(--space-sm);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.setup-info li strong {
  font-size: 0.9rem;
  white-space: nowrap;
}

.setup-case-fan {
  grid-column: span 2;
}

.setup-info li:hover {
  background: var(--gradient-primary-transparent);
  transform: translateX(3px);
  color: var(--color-white);
}

.setup-info li i {
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

.setup-button-container {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding: var(--space-sm);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

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

/* setup section specific breakpoints */
@media (max-width: 1430px) {
  .setup-card-content {
    flex-direction: column;
    align-items: stretch;
  }
  .setup-main-picture {
    width: 100%;
    max-width: 300px;
    height: 300px;
    margin: 0 auto;
  }
  .setup-info ul {
    grid-template-columns: 1fr;
  }

  .setup-case-fan {
    grid-column: span 1;
  }

  .setup-button-container {
    flex-direction: column;
  }
}

/* Profile section specific breakpoints */
@media (max-width: 980px) {
  .profile-main-row {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }

  .profile-main-info {
    align-items: center;
    justify-content: center;
  }
}

/* Tablette (768px et moins) */
@media (max-width: 768px) {
  /* Profile section */
  .profile-image-large {
    width: 140px;
    height: 140px;
  }

  .profile-info-row {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
  }

  .profile-info-row .info-item {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.9rem;
    flex-direction: column;
    text-align: center;
    gap: 0.3rem;
  }

  .profile-info-row .info-item i {
    font-size: 1.1rem;
  }

  /* Social section */
  .social-container {
    grid-template-columns: 1fr;
  }

  .social-card {
    padding: var(--space-sm);
  }

  .social-card i {
    font-size: 2rem;
    width: 50px;
  }

  .svg-icon {
    width: 35px;
    height: 35px;
  }

  /* Recent fursonas */
  .recent-fursonas-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-sm);
  }

  /* Image detail modal */
  .image-detail-container {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .image-detail-view {
    flex: none;
    height: 50vh;
  }

  .image-detail-info {
    flex: none;
  }
}

/* Mobile (576px et moins) */
@media (max-width: 576px) {
  /* Main sections */
  .first-section,
  .second-section,
  .third-section,
  .fourth-section {
    margin-bottom: var(--space-md);
  }

  /* Profile section */
  .profile-container {
    padding: var(--space-md);
  }

  .profile-image-large {
    width: 120px;
    height: 120px;
  }

  .profile-info-row {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .profile-info-row .info-item {
    padding: var(--space-xs);
    font-size: 0.85rem;
  }

  /* Social section */
  .social-container {
    padding: var(--space-sm);
  }

  .social-card {
    flex-direction: column;
    text-align: center;
    padding: var(--space-sm);
  }

  .social-card i {
    font-size: 2.5rem;
    width: auto;
    margin-bottom: var(--space-xs);
  }

  .svg-icon {
    width: 40px;
    height: 40px;
  }

  /* Recent fursonas */
  .recent-fursonas-section {
    padding: var(--space-md);
  }

  .recent-fursonas-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-xs);
  }

  .fursona-overlay {
    position: static;
    opacity: 1;
    background: none;
    padding: var(--space-xs);
  }

  .fursona-info-content h5 {
    font-size: 1rem;
  }

  .fursona-info-content p {
    font-size: 0.8rem;
  }

  /* Setup section */
  .setups-container {
    padding: var(--space-md);
  }

  .setup-card {
    padding: var(--space-sm);
    margin-bottom: var(--space-md);
  }

  .setup-main-picture {
    width: 100%;
    height: 250px;
    max-width: none;
  }

  .setup-thumbnails {
    gap: 0.5rem;
    padding: 0.25rem;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .setup-thumbnails .thumbnail {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
  }

  .setup-info {
    padding: var(--space-xs);
    font-size: 0.8rem;
  }

  .setup-info li {
    padding: var(--space-xs);
    font-size: 0.8rem;
    flex-direction: column;
    text-align: center;
    gap: 0.25rem;
  }

  .setup-info li strong {
    font-size: 0.8rem;
    white-space: normal;
  }

  .setup-info li i {
    font-size: 1rem;
    margin-right: 0;
  }

  /* Modal adaptations */
  .modal-content {
    width: 95%;
    padding: var(--space-sm);
    max-height: 90vh;
    overflow-y: auto;
  }

  #imageDetailModal .modal-content {
    max-width: 95vw;
  }

  .image-detail-container {
    gap: var(--space-xs);
  }

  .image-detail-view {
    height: 40vh;
  }

  .image-detail-info {
    padding: var(--space-xs);
  }

  .image-detail-actions {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .setup-button-container {
    gap: var(--space-xs);
  }

  /* Disable hover effects on mobile */
  .setup-card:hover {
    transform: none;
    box-shadow: var(--shadow-md);
  }

  .setup-info li:hover {
    transform: none;
    background: var(--color-secondary);
  }

  .recent-fursona-item:hover .fursona-image-container img {
    transform: none;
  }

  .social-card:hover {
    transform: none;
  }

  .setup-card:hover .setup-main-picture img {
    transform: none;
  }
}
