/* Video player styles */

/* Estilos para Artigo Relacionado */
.related-article-section {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.related-article-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
}

.article-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.article-thumbnail {
    position: relative;
    width: 200px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #6c757d;
    font-size: 2rem;
}

.article-info {
    flex: 1;
    min-width: 0;
}

.article-info h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.article-description {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.5;
    font-size: 0.95rem;
}

.article-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #777;
}

.article-date,
.article-read-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-article-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.read-article-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

@media (max-width: 768px) {
    .article-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .article-thumbnail {
        width: 100%;
        height: 150px;
    }
    
    .article-info h4 {
        font-size: 1.1rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }
}

.item-description {
    max-height: 3em;
    overflow: hidden;
    transition: max-height 0.3s ease;
    line-height: 1.5;
    color: #64748b;
}

.item-description.expandido {
    max-height: none;
}

/* Botão Mostrar Mais Estilizado */
.show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
}

.show-more-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
    transform: translateY(-1px);
}

.show-more-icon {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.show-more-btn.expanded .show-more-icon {
    transform: rotate(180deg);
}

.show-more-text {
    font-weight: 500;
}

/* Container de Meta Informações */
.video-meta-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.meta-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.meta-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .video-meta-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .meta-item {
        justify-content: flex-start;
    }
}

.uk-slider-items .uk-card {
    cursor: pointer;
    height: 280px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.uk-slider-items .uk-card:hover {
    height: 320px;
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.uk-slider-items .uk-card .uk-card-media-top {
    flex-shrink: 0;
    height: 140px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.uk-slider-items .uk-card .uk-card-media-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.uk-slider-items .uk-card:hover .uk-card-media-top img {
    transform: scale(1.05);
}

.uk-slider-items .uk-card .uk-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 30px 12px 30px;
}

.uk-slider-items .uk-card .uk-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-bottom: 8px;
    flex-shrink: 0;
    padding: 0;
}

.uk-slider-items .uk-card .card-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    margin-bottom: 8px;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.uk-slider-items .uk-card:hover .card-description {
    max-height: 4.2em; /* 3 linhas x 1.4 line-height */
    opacity: 1;
}

.uk-slider-items .uk-card .uk-text-meta {
    margin-top: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    overflow: visible;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

/* Section Headers com linha colorida */
.section-header {
    margin-bottom: 40px;
    position: relative;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    padding-left: 20px;
    position: relative;
}

.linha-topo {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 60px;
    border-radius: 3px;
    background: linear-gradient(180deg, #1d44b8, #1e40af);
}

/* Content Sections */
.content-section {
    margin-bottom: 80px;
}

/* Breadcrumbs melhorados */
.uk-slider-items .uk-card .uk-text-meta {
    margin-top: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    overflow: visible;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.uk-slider-items .uk-card .uk-text-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.uk-slider-items .uk-card .uk-text-meta span:first-child {
    color: #0ea5e9;
}

.uk-slider-items .uk-card .uk-text-meta span:last-child {
    color: #10b981;
}

/* Estilos padronizados para todos os cards (playlist e relacionados) */

/* Content Grid - Estrutura idêntica às páginas dos canais */
.content-grid {
    position: relative;
    overflow: visible;
}

/* Navigation Buttons - Idênticos aos das páginas dos canais */
.section-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.section-navigation:hover {
    background: #1d44b8;
    color: white;
    border-color: #1d44b8;
    transform: translateY(-50%) scale(1.1);
}

.nav-prev {
    left: -25px;
}

.nav-next {
    right: -25px;
}

/* Estilizar os ícones SVG dentro dos botões */
a[uk-slidenav-previous] svg,
a[uk-slidenav-next] svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
}

/* Ajuste para alinhamento dos cards com a barra vertical do título */
[uk-slider] {
    margin-left: -20px; /* Alinha o primeiro card com a barra vertical */
    position: relative;
}

.uk-slider-items {
    padding-left: 20px; /* Compensa o margin negativo */
}

/* Video player responsivo */
#hero-video {
    margin-bottom: 2rem;
}

#video-player {
    margin-top: 60px;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Ensure content is not hidden under the fixed header */
.main-content {
    margin-top: 110px;
    padding: 20px 0;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .main-content {
        margin-top: 110px;
        padding: 10px 0;
    }

    #video-player {
        margin-top: 70px;
        height: auto;
        min-height: 200px;
    }

    #item-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .uk-container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .main-content {
        margin-top: 110px;
    }

    #video-player {
        margin-top: 70px;
        height: auto;
        min-height: 200px;
    }

    #item-title {
        font-size: 1.3rem;
    }

    .uk-container {
        padding: 0 10px;
    }
}

.video-sidebar {
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.related-videos,
.sidebar-ads {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .video-sidebar {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
}

.video-layout {
    /* O grid já está definido inline, mas reforçamos aqui para garantir */
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 20px;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}
.video-player-section,
.video-sidebar {
    width: auto;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* ================================ */
/* MODERN COMMENTS SYSTEM - YouTube Style */
/* ================================ */

.comments-section {
    width: 100%;
    max-width: none;
    margin: 2rem 0;
    padding: 0;
}

.comments-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comments-title::before {
    content: "💬";
    font-size: 1.25rem;
}

/* Comment Form Container */
.comment-form-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.comment-form-container h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form .form-group {
    margin: 0;
}

.comment-form .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
    background: #ffffff;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-submit-comment {
    align-self: flex-start;
    padding: 0.625rem 1.25rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit-comment:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-submit-comment:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.no-comments {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6b7280;
    font-size: 0.925rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #d1d5db;
}

/* Individual Comment */
.comment-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    position: relative;
}

.comment-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Comment Avatar */
.comment-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.comment-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f1f5f9;
}

/* Comment Content */
.comment-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.comment-author {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
}

.comment-date {
    font-size: 0.75rem;
    color: #6b7280;
}

.comment-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #374151;
    margin: 0.25rem 0;
}

/* Comment Actions */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.comment-like-btn,
.comment-dislike-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-like-btn:hover,
.comment-dislike-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.comment-like-btn.active {
    background: #dbeafe;
    color: #3b82f6;
}

.comment-dislike-btn.active {
    background: #fee2e2;
    color: #ef4444;
}

.btn-reply,
.btn-delete {
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reply:hover,
.btn-delete:hover {
    background: #f3f4f6;
    color: #374151;
}

.btn-delete {
    color: #dc3545 !important;
}

.btn-delete:hover {
    background: #f8d7da !important;
    color: #721c24 !important;
}

/* Reply Form */
.reply-form {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.reply-form textarea {
    width: 100%;
    min-height: 60px;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.8125rem;
    resize: vertical;
    background: white;
}

.reply-form .btn-submit-comment {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Comment Children (Replies) */
.comment-children {
    margin-left: 3rem;
    margin-top: 1rem;
    border-left: 2px solid #f1f5f9;
    padding-left: 1rem;
}

.comment-children .comment-item {
    background: #f8fafc;
    border-color: #e5e7eb;
}

.comment-children .comment-avatar {
    width: 32px;
    height: 32px;
}

/* Feedback Messages */
.comment-msg {
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    text-align: center;
}

.comment-login-required {
    text-align: center;
    padding: 2rem;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 12px;
    color: #92400e;
    font-size: 0.925rem;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .comments-section {
        margin: 1.5rem 0;
    }
    
    .comment-form-container {
        padding: 1rem;
    }
    
    .comment-item {
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .comment-avatar {
        width: 32px;
        height: 32px;
    }
    
    .comment-children {
        margin-left: 2rem;
        padding-left: 0.75rem;
    }
    
    .comment-actions {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .comment-like-btn,
    .comment-dislike-btn,
    .btn-reply,
    .btn-delete {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* Animation for new comments */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

.comment-item {
    animation: fadeInUp 0.3s ease-out;
}

@media (min-width: 769px) {
  .comment-text {
    font-size: 1.08rem;
  }
  .comment-author {
    font-size: 1.12rem;
  }
  .comment-date {
    font-size: 0.98rem;
  }
  .comment-actions {
    font-size: 1rem;
  }
}
