/* rifa_online/static/css/style.css */

/* ============================================
   VARIÁVEIS CSS - PALETA DA LOGO RIFOU
   ============================================ */
:root {
    /* Cores Principais da Logo */
    --rifou-blue-bg: #6495ED;
    --rifou-yellow-bg: #FFD700;
    --rifou-white-text: #FFFFFF;
    --rifou-green-clover: #4CAF50;
    --rifou-green-dark: #2E7D32;
    --rifou-gold-accent: #FFC107;

    /* Cores de Fundo do Aplicativo */
    --app-bg-start: #E3F2FD;
    --app-bg-end: #FFF9E6;
    --app-bg-gradient: linear-gradient(135deg, var(--app-bg-start) 0%, var(--app-bg-end) 100%);

    /* Cores de Texto */
    --text-dark: #212529;
    --text-light: #f8f9fa;
    --text-muted: #6c757d;

    /* Cores de Bordas e Sombras */
    --border-light: #dee2e6;
    --shadow-light: rgba(0,0,0,0.08);
    --shadow-medium: rgba(0,0,0,0.12);
    --shadow-heavy: rgba(0,0,0,0.15);
}

/* ============================================
   ESTILO GERAL DO CORPO DA PÁGINA
   ============================================ */
* {
    box-sizing: border-box;
}

body {
    background: var(--app-bg-gradient);
    min-height: 100vh;
    color: var(--text-dark);
    padding-top: 70px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
}

/* ============================================
   NAVBAR (BARRA DE NAVEGAÇÃO)
   ============================================ */
.navbar {
    background: linear-gradient(135deg, var(--rifou-green-dark) 0%, #1B5E20 100%) !important;
    box-shadow: 0 4px 12px var(--shadow-heavy);
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.navbar-brand {
    color: var(--rifou-white-text) !important;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 1px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
    color: var(--rifou-white-text) !important;
}

.navbar-brand img {
    height: 45px;
    margin-right: 12px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    border-radius: 4px;
}

.navbar-nav {
    margin-left: auto;
}

.navbar-nav .nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    margin: 0 0.6rem;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--rifou-gold-accent) !important;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 193, 7, 0.2);
    color: var(--rifou-gold-accent) !important;
}

/* ============================================
   SEÇÃO HERO (BANNER PRINCIPAL)
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, var(--rifou-blue-bg) 0%, var(--rifou-yellow-bg) 100%);
    padding: 4rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px var(--shadow-heavy);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--rifou-white-text);
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
}

.hero-icon {
    font-size: 4rem;
    display: inline-block;
    margin-right: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.brand-highlight {
    color: var(--rifou-white-text);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--rifou-white-text);
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ============================================
   AVISO MODERNO
   ============================================ */
.alert-modern {
    border-radius: 15px;
    border: none;
    box-shadow: 0 6px 20px var(--shadow-light);
    padding: 2rem;
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
}

.alert-icon {
    margin-bottom: 1.5rem;
}

.alert-icon i {
    color: #0c5460;
}

.alert-heading {
    font-weight: 700;
    color: #0c5460;
    margin-bottom: 1rem;
}

.alert-divider {
    border-top: 2px solid #0c5460;
    margin: 1.5rem 0;
}

/* ============================================
   SEÇÃO DE RIFAS
   ============================================ */
.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--rifou-green-dark);
    margin-bottom: 1rem;
}

.title-icon {
    font-size: 2.5rem;
    display: inline-block;
    margin-right: 0.5rem;
}

.title-underline {
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--rifou-gold-accent) 0%, var(--rifou-green-clover) 100%);
    margin: 1rem auto;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* ============================================
   BARRA DE FILTROS MODERNA
   ============================================ */
.filter-bar-modern {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 6px 20px var(--shadow-light);
    margin-bottom: 3rem;
}

.input-group-modern {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 10;
}

.filter-input {
    padding-left: 45px;
    font-size: 0.95rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.status-filter-modern {
    margin-top: 1.5rem;
}

.status-filter-modern .btn-group .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    margin: 0 0.25rem;
}

/* ============================================
   GRID DE RIFAS
   ============================================ */
.raffles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.raffle-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 20px var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
}

.raffle-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px var(--shadow-medium);
}

.raffle-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.raffle-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.raffle-card:hover .raffle-card-image img {
    transform: scale(1.1);
}

.raffle-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.raffle-card-badge .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.raffle-card-body {
    padding: 1.5rem;
}

.raffle-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rifou-green-dark);
    margin-bottom: 0.5rem;
    min-height: 60px;
}

.raffle-card-code {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.raffle-card-prize {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    min-height: 50px;
}

.raffle-card-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--rifou-green-dark);
}

.info-item i {
    color: var(--rifou-gold-accent);
}

.raffle-progress {
    height: 25px;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.raffle-progress .progress-bar {
    font-weight: 700;
    font-size: 0.9rem;
}

.raffle-card-date,
.raffle-card-draw,
.raffle-card-draw-type {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.raffle-card-actions {
    margin-top: 1.5rem;
}

/* ============================================
   MENSAGEM DE NENHUMA RIFA
   ============================================ */
.no-raffles-message {
    padding: 4rem 2rem;
}

.no-raffles-icon {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.no-raffles-message h3 {
    color: var(--rifou-green-dark);
    font-weight: 700;
    margin-bottom: 1rem;
}

.no-raffles-message p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* ============================================
   SEÇÃO DE RODAPÉ COM INFORMAÇÕES
   ============================================ */
.footer-info-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
    border-top: 3px solid var(--rifou-gold-accent);
}

.info-box {
    padding: 2rem;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 6px 20px var(--shadow-light);
    transition: all 0.3s ease;
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px var(--shadow-medium);
}

.info-box i {
    color: var(--rifou-green-clover);
}

.info-box h5 {
    font-weight: 700;
    color: var(--rifou-green-dark);
    margin-bottom: 1rem;
}

.info-box p {
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ============================================
   BOTÕES GERAIS
   ============================================ */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.btn-primary {
    background: linear-gradient(135deg, var(--rifou-gold-accent) 0%, #FFB300 100%);
    color: var(--text-dark);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FFB300 0%, #FF8F00 100%);
    color: var(--text-dark);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--rifou-green-clover) 0%, #388E3C 100%);
    color: var(--rifou-white-text);
}

.btn-success:hover {
    background: linear-gradient(135deg, #388E3C 0%, var(--rifou-green-dark) 100%);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--rifou-gold-accent) 0%, #FFA000 100%);
    color: var(--text-dark);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #FFA000 0%, #FF6F00 100%);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: var(--rifou-white-text);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: var(--rifou-white-text);
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: var(--rifou-white-text);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #545b62 100%);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.btn-outline-success {
    border: 2px solid var(--rifou-green-clover);
    color: var(--rifou-green-clover);
    background: transparent;
}

.btn-outline-success:hover {
    background: var(--rifou-green-clover);
    color: var(--rifou-white-text);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-light);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 20px var(--shadow-medium);
}

.card-header {
    background: linear-gradient(135deg, var(--rifou-green-dark) 0%, #1B5E20 100%);
    color: var(--rifou-white-text);
    font-weight: 700;
    border-radius: 12px 12px 0 0 !important;
    padding: 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

/* ============================================
   ALERTAS
   ============================================ */
.alert {
    border-radius: 10px;
    padding: 1.25rem;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* ============================================
   TABELAS
   ============================================ */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-light);
}

.table thead th {
    background: linear-gradient(135deg, var(--rifou-green-dark) 0%, #1B5E20 100%);
    color: var(--rifou-white-text);
    font-weight: 700;
    border: none;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-color: #e9ecef;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(76, 175, 80, 0.05);
}

/* ============================================
   PAGINAÇÃO
   ============================================ */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--rifou-green-dark);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin: 0 0.25rem;
    padding: 0.5rem 1rem;
}

.page-link:hover {
    background-color: var(--rifou-green-clover);
    color: var(--rifou-white-text);
    border-color: var(--rifou-green-clover);
}

.page-item.active .page-link {
    background-color: var(--rifou-green-dark);
    border-color: var(--rifou-green-dark);
    color: var(--rifou-white-text);
}

/* ============================================
   NÚMEROS DA RIFA (BADGES)
   ============================================ */
.number-selectable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.number-selectable:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.raffle-number-badge {
    font-size: 1.1rem;
    padding: 0.5em 0.8em;
    min-width: 45px;
    text-align: center;
    display: inline-block;
    border-radius: 8px;
}

.badge-primary {
    background-color: var(--rifou-gold-accent);
    color: var(--rifou-white-text);
}

.badge-success {
    background-color: var(--rifou-green-clover);
    color: var(--rifou-white-text);
}

.badge-danger {
    background-color: #dc3545;
    color: var(--rifou-white-text);
}

.badge-secondary {
    background-color: #6c757d;
    color: var(--rifou-white-text);
}

/* ============================================
   SEÇÃO DE COMPARTILHAMENTO
   ============================================ */
.share-section .share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-section .share-button i {
    margin-right: 8px;
}

.share-section .btn-facebook {
    background-color: #3b5998;
    border-color: #3b5998;
    color: white;
}

.share-section .btn-facebook:hover {
    background-color: #2d4373;
    border-color: #2d4373;
}

.share-section .btn-twitter {
    background-color: #1da1f2;
    border-color: #1da1f2;
    color: white;
}

.share-section .btn-twitter:hover {
    background-color: #0c85d0;
    border-color: #0c85d0;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .navbar-brand {
        font-size: 1.3rem;
    }

    .navbar-brand img {
        height: 35px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .raffles-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

    .filter-bar-modern {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* ============================================
   ANIMAÇÕES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.shadow-soft {
    box-shadow: 0 2px 8px var(--shadow-light);
}

.shadow-medium {
    box-shadow: 0 4px 16px var(--shadow-medium);
}

.shadow-heavy {
    box-shadow: 0 8px 24px var(--shadow-heavy);
}

.border-gold {
    border-color: var(--rifou-gold-accent) !important;
}

.border-green {
    border-color: var(--rifou-green-clover) !important;
}
