/**
 * Rules Highlights Accordion - Lottery Campaign
 * Modern dark theme with golden accents matching Sanremo 2026 design
 */

/* ==================== Rules Section Container ==================== */
.rules-section {
    background: transparent;
    padding: 60px 0;
}

.rules-content {
    color: #ffffff;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 3rem;
    font-family: 'Playfair Display', serif;
}

/* ==================== Highlights Section ==================== */
.rules-highlights-section {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.03) 0%, rgba(28, 63, 108, 0.05) 100%);
    border: 2px solid rgba(255, 215, 0, 0.15);
    border-radius: 24px;
    padding: 50px 40px;
    margin-bottom: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 80px rgba(255, 215, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Subtle animated gradient background */
.rules-highlights-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.03) 0%, transparent 70%);
    animation: shimmer 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10%, 10%); }
}

.highlights-title {
    font-size: 2rem;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 0.75rem;
    font-family: 'Playfair Display', serif;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.highlights-title i {
    font-size: 1.8rem;
    animation: pulse-star 2s ease-in-out infinite;
}

@keyframes pulse-star {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* ==================== Accordion Container ==================== */
.rules-accordion {
    position: relative;
    z-index: 1;
}

/* ==================== Accordion Items ==================== */
.rules-accordion-item {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 15, 26, 0.95) 100%);
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 215, 0, 0.1);
    backdrop-filter: blur(10px);
}

.rules-accordion-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
}

.rules-accordion-item:last-child {
    margin-bottom: 0;
}

/* ==================== Accordion Button (Header) ==================== */
.rules-accordion-button {
    width: 100%;
    background: transparent;
    border: none;
    padding: 24px 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    text-align: left;
}

.rules-accordion-button:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(28, 63, 108, 0.08) 100%);
}

.rules-accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(28, 63, 108, 0.12) 100%);
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

/* Button Content (Icon + Text) */
.accordion-button-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.accordion-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(28, 63, 108, 0.15) 100%);
    border-radius: 12px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.accordion-icon i {
    font-size: 1.5rem;
    color: #FFD700;
}

.rules-accordion-button:hover .accordion-icon {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.rules-accordion-button:not(.collapsed) .accordion-icon {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(28, 63, 108, 0.25) 100%);
    border-color: rgba(255, 215, 0, 0.5);
}

.accordion-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
}

.rules-count {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 400;
}

/* Chevron Icon */
.accordion-chevron {
    font-size: 1.2rem;
    color: #FFD700;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.rules-accordion-button:not(.collapsed) .accordion-chevron {
    transform: rotate(180deg);
}

/* ==================== Accordion Body (Content) ==================== */
.accordion-collapse {
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.rules-accordion-body {
    padding: 28px;
    background: rgba(10, 15, 26, 0.5);
}

/* ==================== Rule Items ==================== */
.rule-item {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(10, 15, 26, 0.7) 100%);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    backdrop-filter: blur(5px);
}

.rule-item.highlighted {
    border: 2px solid rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(28, 63, 108, 0.08) 100%);
    position: relative;
}

.rule-content p {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 12px;
    font-size: 0.98rem;
}

.rule-content p:last-child {
    margin-bottom: 0;
}

.rule-content strong {
    color: #ffffff;
    font-weight: 600;
}

.rule-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 16px;
    font-family: 'Playfair Display', serif;
}

/* Highlight Badge (Star icon for special items) */
.rule-highlight-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
}

.rule-highlight-badge i {
    color: #0a0f1a;
    font-size: 1rem;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    }
}

/* ==================== PDF Document Section ==================== */
.rules-document-section {
    margin-top: 4rem;
}

.rules-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid #FFD700;
    color: #FFD700;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.1) 100%);
    border-color: #FFA500;
    color: #FFA500;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.btn-link {
    color: #94a3b8;
    text-decoration: none;
    padding: 14px 24px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-link:hover {
    color: #FFD700;
}

.btn-view-pdf {
    border: none;
    background: transparent;
    cursor: pointer;
}

/* ==================== PDF Viewer Container ==================== */
.pdf-viewer-container {
    margin-top: 30px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.pdf-viewer-header {
    background: linear-gradient(135deg, rgba(28, 63, 108, 0.8) 0%, rgba(10, 15, 26, 0.9) 100%);
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.btn-close-pdf {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-pdf:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
}

.pdf-viewer-iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .rules-highlights-section {
        padding: 30px 20px;
        border-radius: 16px;
    }

    .highlights-title {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 8px;
    }

    .section-title {
        font-size: 2rem;
    }

    .rules-accordion-button {
        padding: 20px 16px;
        font-size: 0.95rem;
    }

    .accordion-button-content {
        gap: 14px;
    }

    .accordion-icon {
        width: 42px;
        height: 42px;
    }

    .accordion-icon i {
        font-size: 1.3rem;
    }

    .category-name {
        font-size: 1rem;
    }

    .rules-accordion-body {
        padding: 20px 16px;
    }

    .rule-item {
        padding: 18px;
    }

    .rule-content p {
        font-size: 0.93rem;
    }

    .rules-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-outline-primary,
    .btn-link {
        justify-content: center;
        width: 100%;
    }

    .pdf-viewer-iframe {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .rules-highlights-section {
        padding: 24px 16px;
    }

    .highlights-title {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .rule-title {
        font-size: 1.1rem;
    }
}
