/*--------------------------------------------------------------
# Avaliações Page Styles
--------------------------------------------------------------*/
.avaliacoes-page {
    background: white;
    min-height: 100vh;
}

.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.875rem;
    color: var(--main-gray-600);
}

.breadcrumbs a {
    color: var(--main-gray-600);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--color-main);
}

.breadcrumbs span.separator {
    margin: 0 0.5rem;
}

.breadcrumbs .current {
    font-weight: 600;
    color: var(--main-gray-800);
}

.header-section {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--main-gray-200);
}

.header-content {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.header-poster {
    width: 100px;
    height: 150px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.header-info {
    flex: 1;
}

.header-info h1 {
    font-size: 1.75rem;
    color: var(--main-gray-900);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--main-gray-600);
    font-size: 16px;
}

.header-meta .dot {
    width: 4px;
    height: 4px;
    background: var(--main-gray-400);
    border-radius: 50%;
}

.rating-badge-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    font-size: 0.5rem;
    font-weight: bold;
    color: white;
    background: var(--main-gray-500);
}

/*--------------------------------------------------------------
# Tabs
--------------------------------------------------------------*/
.tabs-section {
    padding: 1.5rem 0;
}

.tabs-container {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-main);
    border-radius: 50px;
    background: white;
    color: var(--color-main);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: rgba(27, 59, 111, 0.05);
}

.tab-btn.active {
    background: var(--color-main);
    color: white;
}

.tab-btn.disabled {
    border-color: var(--main-gray-300);
    color: var(--main-gray-400);
    cursor: not-allowed;
}

/*--------------------------------------------------------------
# Rating Distribution Box
--------------------------------------------------------------*/
.rating-distribution-box {
    background: white;
    border: 1px solid var(--main-gray-200);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.rating-score-box {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rating-score-number {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    line-height: 1;
}

.rating-score-label {
    font-size: 1rem;
    color: white;
    opacity: 0.9;
}

.rating-distribution-content {
    flex: 1;
}

.rating-distribution-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-main);
    margin-bottom: 1rem;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.rating-bar-label {
    width: 90px;
    font-size: 0.875rem;
    color: var(--main-gray-700);
}

.rating-bar-container {
    flex: 1;
    height: 12px;
    background: var(--main-gray-100);
    border-radius: 6px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.rating-bar-fill.green {
    background: #4caf50;
}

.rating-bar-fill.yellow {
    background: #ffc107;
}

.rating-bar-fill.orange {
    background: #ff9800;
}

.rating-bar-fill.red {
    background: #f44336;
}

.rating-bar-value {
    width: 70px;
    text-align: right;
    font-size: 0.875rem;
    color: var(--main-gray-600);
}

/*--------------------------------------------------------------
# Reviews Section
--------------------------------------------------------------*/
.reviews-section {
    padding: 2rem 0;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.reviews-count {
    color: var(--main-gray-600);
    font-size: 16px;
}

.filter-select {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid var(--main-gray-300);
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
    color: var(--main-gray-700);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.reviews-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-card {
    background: white;
    border: 1px solid var(--main-gray-200);
    border-radius: 12px;
    padding: 1.5rem;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.review-icon {
    width: 20px;
    height: 20px;
    opacity: 0.5;
}

.rating-badge {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 16px;
}

.rating-badge.rating-green {
    background: #4caf50;
}

.rating-badge.rating-yellow {
    background: #ffc107;
    color: #333;
}

.rating-badge.rating-orange {
    background: #ff9800;
}

.rating-badge.rating-red {
    background: #f44336;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--main-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--main-gray-500);
    font-size: 1rem;
}

.author-name {
    font-weight: 600;
    color: var(--main-gray-800);
}

a.author-name:hover {
    color: var(--color-main);
    text-decoration: underline !important;
}

.review-content {
    color: var(--main-gray-700);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--main-gray-100);
}

.review-date {
    color: var(--main-gray-500);
    font-size: 0.85rem;
}

.review-source {
    color: var(--color-main);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.review-source:hover {
    text-decoration: underline;
}

/*--------------------------------------------------------------
# Pagination
--------------------------------------------------------------*/
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
}

.pagination a {
    background: white;
    color: var(--color-main);
    border: 1px solid var(--main-gray-300);
}

.pagination a:hover {
    background: var(--main-gray-100);
}

.pagination .current {
    background: var(--color-main);
    color: white;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--main-gray-500);
}

/*--------------------------------------------------------------
# Two-column Layout
--------------------------------------------------------------*/
.avaliacoes-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: flex-start;
}

.avaliacoes-main {
    min-width: 0;
}

.avaliacoes-sidebar {
    position: sticky;
    top: 100px;
}

.avaliacoes-sidebar .archive-sidebar {
    display: flex;
    flex-direction: column;
}

.avaliacoes-sidebar .archive-sidebar-item {
    background: white;
    border-radius: 12px;
    padding: 1rem;
}

.avaliacoes-sidebar .archive-sidebar-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--main-gray-800);
    display: block;
    margin-bottom: 1rem;
}

.avaliacoes-sidebar iframe {
    max-width: 100%;
    border-radius: 8px;
}

/*--------------------------------------------------------------
# Most Read Cards
--------------------------------------------------------------*/
.most-read-widget--cards {
    background: transparent;
    padding: 0;
}

.most-read-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.most-read-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--main-gray-200);
    text-decoration: none;
    transition: opacity 0.2s;
}

.most-read-card:first-child {
    padding-top: 0;
}

.most-read-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.most-read-card:hover {
    opacity: 0.8;
}

.most-read-card-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--main-gray-400);
    min-width: 24px;
}

.most-read-card-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.most-read-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.most-read-card-placeholder {
    width: 100%;
    height: 100%;
    background: var(--main-gray-200);
}

.most-read-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--main-gray-800);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/*--------------------------------------------------------------
# Cast and Crew Styles
--------------------------------------------------------------*/
.cast-crew-section {
    padding: 0;
}

.cast-section {
    margin-bottom: 2.5rem;
}

.cast-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--main-blue-950);
    margin: 0 0 1rem 0;
}

.cast-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
}

.cast-cards--small {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.cast-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cast-card-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: var(--main-gray-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cast-cards:not(.cast-cards--small) .cast-card-image {
    width: 120px;
    height: 120px;
}

.cast-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cast-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e0e0, #c0c0c0);
    color: #666;
    font-size: 2rem;
    font-weight: 600;
}

.cast-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cast-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--main-blue-950);
}

.cast-card-role {
    font-size: 0.8rem;
    color: var(--main-gray-500);
}

.cast-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease;
}

.cast-card-link:hover {
    transform: translateY(-4px);
}

.cast-card-link:hover .cast-card-name {
    color: var(--main-blue-700, #1e40af);
    text-decoration: underline;
}

.cast-card-link:hover .cast-card-image {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/*--------------------------------------------------------------
# Crew List Styles
--------------------------------------------------------------*/
.crew-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--main-gray-200);
}

.crew-section:last-child {
    border-bottom: none;
}

.crew-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--main-blue-950);
    margin: 0 0 1rem 0;
}

.crew-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 2rem;
}

.crew-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.crew-item-image {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--main-gray-200);
}

.crew-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crew-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e0e0, #c0c0c0);
    color: #666;
    font-size: 16px;
    font-weight: 600;
}

.crew-item-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--main-gray-800);
    flex: 1;
}

.crew-item-job {
    font-size: 0.85rem;
    color: var(--main-gray-500);
}

.crew-item-link {
    text-decoration: none;
    color: inherit;
    display: contents;
}

.crew-item-link:hover .crew-item-name {
    color: var(--main-blue-700, #1e40af);
    text-decoration: underline;
}

.crew-item-link:hover .crew-item-image {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/*--------------------------------------------------------------
# Responsive Styles
--------------------------------------------------------------*/
@media (max-width: 768px) {
    .cast-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .cast-card-image {
        width: 80px !important;
        height: 80px !important;
    }

    .crew-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .avaliacoes-layout {
        grid-template-columns: 1fr;
    }

    .avaliacoes-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .header-info h1 {
        font-size: 1.35rem;
    }

    .header-meta {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Tabs - horizontal scroll on mobile */
    .tabs-section {
        padding: 1rem 0;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .tabs-section::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .tabs-container {
        flex-wrap: nowrap;
        gap: 0.5rem;
        min-width: max-content;
    }

    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .rating-distribution-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .rating-score-box {
        width: 100px;
        height: 100px;
    }

    .rating-score-number {
        font-size: 2.5rem;
    }

    .breadcrumbs {
        font-size: 0.8rem;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .breadcrumbs::-webkit-scrollbar {
        display: none;
    }
}