/* Skeleton Loading CSS - Modern Loading States */

/* Base skeleton styles */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
  overflow: hidden;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-text:last-child {
  width: 60%;
  margin-bottom: 0;
}

.skeleton-title {
  height: 24px;
  width: 80%;
  margin-bottom: 16px;
  border-radius: 4px;
}

.skeleton-image {
  height: 200px;
  width: 100%;
  border-radius: 8px;
  margin-bottom: 16px;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-bottom: 16px;
}

.skeleton-button {
  height: 36px;
  width: 120px;
  border-radius: 4px;
  margin-top: 16px;
}

.skeleton-card {
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.skeleton-card .skeleton-image {
  height: 150px;
  margin-bottom: 20px;
}

.skeleton-card .skeleton-title {
  width: 100%;
  margin-bottom: 12px;
}

.skeleton-card .skeleton-text {
  width: 100%;
}

.skeleton-card .skeleton-text:nth-child(3) {
  width: 90%;
}

.skeleton-card .skeleton-text:nth-child(4) {
  width: 70%;
}

.skeleton-list {
  padding: 0;
  margin: 0;
}

.skeleton-list-item {
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.skeleton-list-item:last-child {
  border-bottom: none;
}

.skeleton-blog-post {
  margin-bottom: 30px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.skeleton-blog-post .skeleton-image {
  height: 250px;
  margin-bottom: 20px;
}

.skeleton-blog-post .skeleton-title {
  width: 100%;
  margin-bottom: 12px;
}

.skeleton-blog-post .skeleton-text {
  width: 100%;
}

.skeleton-blog-post .skeleton-text:nth-child(3) {
  width: 95%;
}

.skeleton-blog-post .skeleton-text:nth-child(4) {
  width: 85%;
}

.skeleton-blog-post .skeleton-text:nth-child(5) {
  width: 75%;
}

.skeleton-service {
  text-align: center;
  padding: 20px;
  margin-bottom: 20px;
}

.skeleton-service .skeleton-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.skeleton-service .skeleton-title {
  width: 100%;
  height: 20px;
  margin-bottom: 12px;
}

.skeleton-service .skeleton-text {
  width: 100%;
}

.skeleton-service .skeleton-text:nth-child(3) {
  width: 80%;
}

.skeleton-portfolio {
  margin-bottom: 20px;
}

.skeleton-portfolio .skeleton-image {
  height: 200px;
  margin-bottom: 15px;
}

.skeleton-portfolio .skeleton-title {
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-portfolio .skeleton-text {
  width: 70%;
}

/* Loading animation */
@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Fade in animation for content replacement */
.skeleton-fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Specific skeleton variations */
.skeleton-dark {
  background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
  background-size: 200% 100%;
}

.skeleton-light {
  background: linear-gradient(90deg, #f8f8f8 25%, #e8e8e8 50%, #f8f8f8 75%);
  background-size: 200% 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .skeleton-image {
    height: 150px;
  }
  
  .skeleton-blog-post .skeleton-image {
    height: 200px;
  }
  
  .skeleton-card .skeleton-image {
    height: 120px;
  }
}

/* Utility classes */
.skeleton-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.skeleton-shimmer {
  position: relative;
  overflow: hidden;
}

.skeleton-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Skeleton para galerias */
.skeleton-gallery-item {
  position: relative;
  overflow: hidden;
}

.skeleton-image-container {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.skeleton-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 15px;
  box-sizing: border-box;
}

.skeleton-overlay .skeleton-image {
  width: 100%;
  height: 120px;
  margin-bottom: 15px;
  background: #e0e0e0;
  border-radius: 4px;
}

.skeleton-overlay .skeleton-text-container {
  width: 100%;
  text-align: center;
}

.skeleton-overlay .skeleton-text {
  background: #e0e0e0;
  border-radius: 4px;
  margin: 0 auto 8px;
}

.skeleton-overlay .skeleton-button {
  background: #d0d0d0;
  border-radius: 4px;
  margin: 10px auto 0;
}

.image-loaded .skeleton-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* Responsive para galerias */
@media (max-width: 768px) {
  .skeleton-image-container {
    height: 150px;
  }
  
  .skeleton-overlay .skeleton-image {
    height: 100px;
  }
}