/* ============================================
   GUIALACERDA - Estilos Principais (Optimized)
   Rules below are NOT in the critical inline CSS.
   ============================================ */

/* Utility Animations */
.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Smooth image loading */
img {
    transition: opacity 0.3s;
}
img[loading="lazy"] {
    opacity: 0;
}
img.loaded, img:not([loading="lazy"]) {
    opacity: 1;
}

/* Breadcrumb */
.breadcrumb a {
    transition: color 0.2s;
}
.breadcrumb a:hover {
    color: var(--cor-principal);
}

/* Article content styles */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}
.article-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--cor-titulos);
}
.article-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--cor-titulos);
}
.article-content p {
    margin-bottom: 1.25rem;
}
.article-content img {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    width: 100%;
    height: auto;
}
.article-content blockquote {
    border-left: 4px solid var(--cor-principal);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--cor-principal)08;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
}
.article-content ul, .article-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}
.article-content li {
    margin-bottom: 0.5rem;
}
.article-content a {
    color: var(--cor-principal);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.article-content a:hover {
    opacity: 0.8;
}

/* Share buttons */
.share-btn {
    transition: all 0.3s;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.share-btn:hover {
    transform: scale(1.15);
    color: white !important;
}
.share-btn.facebook:hover { background: #1877F2; }
.share-btn.twitter:hover { background: #1DA1F2; }
.share-btn.whatsapp:hover { background: #25D366; }
.share-btn.telegram:hover { background: #0088CC; }
.share-btn.linkedin:hover { background: #0A66C2; }
.share-btn.email:hover { background: #666; }

/* Form styles */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: white;
}
.form-input:focus {
    outline: none;
    border-color: var(--cor-principal);
    box-shadow: 0 0 0 3px var(--cor-principal)20;
}
.form-input::placeholder {
    color: #9ca3af;
}

/* Video cards */
.video-trending-card {
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    will-change: transform;
}
.video-trending-card:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,.28);
}

/* Category badge */
.cat-badge {
    transition: all 0.3s;
    will-change: transform;
}
.cat-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .breaking-news,
    .animate-slide-up,
    .animate-fade-in,
    .slide-in {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .news-card,
    .featured-card,
    .news-card-img,
    .cat-badge,
    .share-btn {
        transition: none !important;
        transform: none !important;
    }
}

/* Comment System */
.like-btn {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}
.like-btn.liked {
    color: var(--cor-principal, #DC2626) !important;
}
.like-btn.liked svg {
    fill: var(--cor-principal, #DC2626);
}
.like-btn:not(.liked) svg {
    fill: none;
}
.like-btn:hover {
    transform: scale(1.1);
}
.reply-btn {
    cursor: pointer;
    user-select: none;
}

/* Comment Loading */
#commentsLoading {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Comment Loading */
.comment-item {
    transition: box-shadow 0.2s;
}
.comment-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

@keyframes commentFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.comment-item {
    animation: commentFadeIn 0.3s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
    .comment-item {
        animation: none !important;
        opacity: 1 !important;
    }
    .like-btn, .reply-btn {
        transition: none !important;
    }
}

/* ============================================
   Layout System - Slide / Carousel
   ============================================ */
.layout-slide {
    position: relative;
}
.layout-slide .carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1.25rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}
.layout-slide .carousel-track::-webkit-scrollbar {
    display: none;
}
.layout-slide .carousel-item {
    flex: 0 0 calc(33.333% - 0.833rem);
    scroll-snap-align: start;
}
@media (max-width: 768px) {
    .layout-slide .carousel-item {
        flex: 0 0 calc(85%);
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .layout-slide .carousel-item {
        flex: 0 0 calc(50% - 0.625rem);
    }
}
.layout-slide .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    color: #374151;
}
.layout-slide .carousel-btn:hover {
    background: var(--cor-principal, #DC2626);
    color: white;
    border-color: var(--cor-principal, #DC2626);
}
.layout-slide .carousel-btn.prev { left: -16px; }
.layout-slide .carousel-btn.next { right: -16px; }
@media (max-width: 768px) {
    .layout-slide .carousel-btn { display: none; }
}

/* ============================================
   Layout System - Thumbnails (compact)
   ============================================ */
.layout-thumbnails .thumb-card {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}
.layout-thumbnails .thumb-card:hover {
    background: #f9fafb;
}
.layout-thumbnails .thumb-img {
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}
.layout-thumbnails .thumb-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.layout-thumbnails .thumb-body h3 {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.layout-thumbnails .thumb-meta {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   Layout System - List (horizontal)
   ============================================ */
.layout-list .list-card {
    display: flex;
    gap: 1.25rem;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #f3f4f6;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
}
.layout-list .list-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.layout-list .list-img {
    width: 220px;
    min-height: 140px;
    object-fit: cover;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .layout-list .list-img {
        width: 120px;
        min-height: 100px;
    }
}
.layout-list .list-body {
    flex: 1;
    padding: 1rem 1rem 1rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.layout-list .list-body h3 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.layout-list .list-body p {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.layout-list .list-meta {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
@media (prefers-reduced-motion: reduce) {
    .layout-list .list-card {
        transition: none !important;
        transform: none !important;
    }
}
