/* ==========================================
   GRADE DE CANAIS PAGE STYLES
   ========================================== */

/* Hero Section */
.grade-hero {
    position: relative;
    background: url('../images/grade_canais.jpg') center center / cover no-repeat;
    padding: 8rem 0 3rem;
    margin-top: 80px;
    text-align: center;
    color: white;
}

.grade-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 107, 241, 0.92) 0%, rgba(103, 58, 183, 0.60) 100%);
}

.grade-hero>.container {
    position: relative;
    z-index: 1;
}

.grade-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.grade-hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* Package Selector */
.package-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.package-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    color: white;
    cursor: pointer;
    transition: var(--transition-normal);
    min-width: 140px;
    font-family: inherit;
}

.package-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.package-btn.active {
    background: white;
    color: var(--primary-blue);
    border-color: white;
}

.package-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.package-channels {
    font-size: 0.85rem;
    opacity: 0.9;
}

.package-btn.active .package-channels {
    opacity: 0.7;
}

/* Region Selection Modal */
.region-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.region-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.region-modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.region-modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.region-modal-header i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.region-modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.region-modal-header p {
    font-size: 1rem;
    color: var(--text-light);
}

.region-modal-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.region-modal-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, #f5f5f5 100%);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.region-modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-purple) 100%);
    transition: left 0.3s ease;
    z-index: 0;
}

.region-modal-btn:hover::before {
    left: 0;
}

.region-modal-btn:hover {
    border-color: var(--primary-blue);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(30, 107, 241, 0.3);
}

.region-modal-btn i {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.region-modal-btn:hover i {
    transform: scale(1.1);
}

.region-modal-name {
    font-size: 1rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.modal-coming-badge {
    font-size: 0.65rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

/* Region Content */
.region-content.hidden {
    display: none;
}

/* Coming Soon Header Badge */
.header-badge.coming-soon {
    font-size: 0.7rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    margin-left: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Coming Soon Channel Item */
.channel-item.channel-coming-soon {
    opacity: 0.85;
}

.channel-item .channel-placeholder {
    width: 80px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.channel-item .channel-placeholder i {
    font-size: 1.75rem;
    color: #757575;
}

.badge-coming {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

/* Search Bar */
.grade-search {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.grade-search i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1rem;
}

.grade-search input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-family: inherit;
    box-shadow: var(--shadow-lg);
}

.grade-search input:focus {
    outline: none;
    box-shadow: var(--shadow-xl), 0 0 0 3px rgba(30, 107, 241, 0.3);
}

/* Package Info */
.package-info {
    text-align: center;
    margin-bottom: 2rem;
}

.package-info span {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-purple) 100%);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Grade Section */
.grade-section {
    padding: 3rem 0;
    background: var(--bg-light);
}

/* Category Accordion */
.grade-category {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.category-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: inherit;
}

.category-header:hover {
    background: var(--bg-light);
}

.category-header i {
    transition: transform 0.3s ease;
    color: var(--primary-blue);
}

.category-header.active i {
    transform: rotate(180deg);
}

/* Category Content */
.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.category-content.active {
    max-height: 1000px;
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Channel Item */
.channel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    position: relative;
}

.channel-item:hover {
    background: var(--bg-light);
    transform: translateY(-3px);
}

.channel-item img {
    width: 80px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.channel-item>span:last-child {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Channel Badge */
.channel-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.badge-basico {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-plus {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-full {
    background: #fce4ec;
    color: #c2185b;
}

/* Unavailable channels */
.channel-item.unavailable {
    opacity: 0.4;
    pointer-events: none;
}

.channel-item.unavailable::after {
    content: 'Não incluso';
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: #999;
    white-space: nowrap;
}

/* No Channels Message */
.no-channels {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 1rem;
}

/* Back Button */
.grade-back {
    text-align: center;
    margin-top: 2rem;
}

/* Hidden class for search */
.channel-item.hidden {
    display: none;
}

.grade-category.hidden {
    display: none;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .grade-hero {
        padding: 6rem 0 2rem;
    }

    .grade-hero-title {
        font-size: 1.75rem;
    }

    .package-selector {
        gap: 0.5rem;
    }

    .package-btn {
        padding: 0.75rem 1rem;
        min-width: 100px;
    }

    .package-name {
        font-size: 0.95rem;
    }

    .package-channels {
        font-size: 0.75rem;
    }

    .channels-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }

    .channel-item img {
        width: 60px;
        height: 45px;
    }

    .channel-item>span:last-child {
        font-size: 0.75rem;
    }

    .channel-badge {
        font-size: 0.5rem;
        padding: 0.15rem 0.35rem;
    }
}

@media (max-width: 480px) {
    .channels-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .channel-item {
        padding: 0.5rem;
    }

    .channel-item img {
        width: 50px;
        height: 40px;
    }

    .package-btn {
        flex: 1;
        min-width: auto;
    }

    .region-modal-content {
        padding: 1.5rem;
    }

    .region-modal-header h2 {
        font-size: 1.5rem;
    }

    .region-modal-header i {
        font-size: 2.5rem;
    }

    .region-modal-buttons {
        grid-template-columns: 1fr;
    }

    .region-modal-btn {
        padding: 1.25rem 1rem;
    }
}