/* ============================================
   SKELETON LOADING - Numaker
   Melhora a percepção de velocidade do site
   ============================================ */

/* Variáveis do Skeleton */
:root {
    --skeleton-bg: #1a1a2e;
    --skeleton-shine: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.08) 50%, 
        transparent 100%);
    --skeleton-radius: 8px;
    --skeleton-animation-duration: 1.5s;
}

/* Estado inicial - Esconde conteúdo real enquanto carrega */
.skeleton-loading .skeleton-hide {
    opacity: 0;
    visibility: hidden;
}

/* Container do Skeleton */
.skeleton-wrapper {
    position: relative;
    overflow: hidden;
}

/* Elemento base do Skeleton */
.skeleton {
    background-color: var(--skeleton-bg);
    border-radius: var(--skeleton-radius);
    position: relative;
    overflow: hidden;
}

/* Animação de brilho (shimmer) */
.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--skeleton-shine);
    animation: skeleton-shimmer var(--skeleton-animation-duration) infinite;
    transform: translateX(-100%);
}

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

/* Animação de pulse alternativa */
.skeleton-pulse {
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

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

/* ============================================
   TIPOS DE SKELETON
   ============================================ */

/* Skeleton para Texto */
.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-text.skeleton-title {
    height: 32px;
    width: 60%;
    margin-bottom: 20px;
}

.skeleton-text.skeleton-subtitle {
    height: 24px;
    width: 80%;
    margin-bottom: 15px;
}

.skeleton-text.skeleton-paragraph {
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
}

.skeleton-text.skeleton-paragraph:last-child {
    width: 70%;
}

/* Skeleton para Imagens */
.skeleton-image {
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    border-radius: var(--skeleton-radius);
}

.skeleton-image.skeleton-square {
    padding-top: 100%;
}

.skeleton-image.skeleton-avatar {
    width: 60px;
    height: 60px;
    padding-top: 0;
    border-radius: 50%;
}

.skeleton-image.skeleton-logo {
    width: 200px;
    height: 50px;
    padding-top: 0;
}

/* Skeleton para Cards */
.skeleton-card {
    background-color: var(--skeleton-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

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

.skeleton-card .skeleton-card-title {
    height: 24px;
    width: 70%;
    margin-bottom: 12px;
}

.skeleton-card .skeleton-card-text {
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
}

.skeleton-card .skeleton-card-text:last-child {
    width: 60%;
}

/* Skeleton para Botões */
.skeleton-button {
    height: 48px;
    width: 150px;
    border-radius: 25px;
}

.skeleton-button.skeleton-button-large {
    width: 200px;
    height: 56px;
}

/* Skeleton para Ícones */
.skeleton-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
}

.skeleton-icon.skeleton-icon-small {
    width: 40px;
    height: 40px;
}

/* ============================================
   SKELETON PARA SEÇÕES ESPECÍFICAS
   ============================================ */

/* Hero Section Skeleton */
.skeleton-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
}

.skeleton-hero-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skeleton-hero-title {
    height: 60px;
    width: 80%;
    border-radius: 8px;
}

.skeleton-hero-subtitle {
    height: 40px;
    width: 60%;
    border-radius: 8px;
}

.skeleton-hero-text {
    height: 20px;
    width: 90%;
    border-radius: 4px;
}

.skeleton-hero-image {
    width: 100%;
    height: 400px;
    border-radius: 16px;
}

/* Service Cards Skeleton */
.skeleton-service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background-color: var(--skeleton-bg);
    border-radius: 12px;
    margin-bottom: 20px;
}

.skeleton-service-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-bottom: 20px;
}

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

.skeleton-service-text {
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
    border-radius: 4px;
}

/* Portfolio/Cases Skeleton */
.skeleton-portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.skeleton-portfolio-image {
    width: 100%;
    height: 300px;
}

.skeleton-portfolio-content {
    padding: 20px;
    background-color: var(--skeleton-bg);
}

.skeleton-portfolio-title {
    height: 24px;
    width: 70%;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-portfolio-desc {
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
    border-radius: 4px;
}

/* Testimonial Skeleton */
.skeleton-testimonial {
    padding: 30px;
    background-color: var(--skeleton-bg);
    border-radius: 12px;
}

.skeleton-testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
}

.skeleton-testimonial-text {
    height: 16px;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-testimonial-name {
    height: 20px;
    width: 40%;
    margin-top: 20px;
    border-radius: 4px;
}

/* Brand/Logo Skeleton */
.skeleton-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.skeleton-brand-logo {
    width: 120px;
    height: 40px;
    border-radius: 4px;
}

/* Stats/Counter Skeleton */
.skeleton-stat {
    text-align: center;
    padding: 20px;
}

.skeleton-stat-number {
    height: 48px;
    width: 100px;
    margin: 0 auto 15px;
    border-radius: 8px;
}

.skeleton-stat-label {
    height: 16px;
    width: 80%;
    margin: 0 auto;
    border-radius: 4px;
}

/* Form Skeleton */
.skeleton-form-group {
    margin-bottom: 20px;
}

.skeleton-form-label {
    height: 16px;
    width: 30%;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-form-input {
    height: 50px;
    width: 100%;
    border-radius: 8px;
}

.skeleton-form-textarea {
    height: 150px;
    width: 100%;
    border-radius: 8px;
}

/* Navigation Skeleton */
.skeleton-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.skeleton-nav-item {
    height: 16px;
    width: 80px;
    border-radius: 4px;
}

/* Footer Skeleton */
.skeleton-footer-col {
    margin-bottom: 30px;
}

.skeleton-footer-title {
    height: 24px;
    width: 60%;
    margin-bottom: 20px;
    border-radius: 4px;
}

.skeleton-footer-link {
    height: 14px;
    width: 80%;
    margin-bottom: 12px;
    border-radius: 4px;
}

/* ============================================
   UTILITÁRIOS
   ============================================ */

/* Larguras */
.skeleton-w-25 { width: 25%; }
.skeleton-w-50 { width: 50%; }
.skeleton-w-75 { width: 75%; }
.skeleton-w-100 { width: 100%; }

/* Alturas */
.skeleton-h-sm { height: 12px; }
.skeleton-h-md { height: 16px; }
.skeleton-h-lg { height: 24px; }
.skeleton-h-xl { height: 32px; }

/* Margens */
.skeleton-mb-sm { margin-bottom: 8px; }
.skeleton-mb-md { margin-bottom: 16px; }
.skeleton-mb-lg { margin-bottom: 24px; }

/* ============================================
   TRANSIÇÃO SUAVE
   ============================================ */

/* Fade out do skeleton quando conteúdo carrega */
.skeleton-fade-out {
    animation: skeleton-fade-out 0.3s ease-out forwards;
}

@keyframes skeleton-fade-out {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
        display: none;
    }
}

/* Fade in do conteúdo real */
.content-fade-in {
    animation: content-fade-in 0.3s ease-out forwards;
}

@keyframes content-fade-in {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVO
   ============================================ */

@media (max-width: 991px) {
    .skeleton-hero-title {
        height: 40px;
    }
    
    .skeleton-hero-subtitle {
        height: 30px;
    }
    
    .skeleton-hero-image {
        height: 300px;
    }
    
    .skeleton-portfolio-image {
        height: 200px;
    }
}

@media (max-width: 767px) {
    .skeleton-hero-title {
        height: 32px;
        width: 100%;
    }
    
    .skeleton-hero-subtitle {
        height: 24px;
        width: 80%;
    }
    
    .skeleton-card .skeleton-card-image {
        height: 150px;
    }
}
