/* CSS para o novo layout da página index */

/* Background do body - apenas na página index */
body.index-page {
    background-color: rgb(22, 28, 36) !important;
}

/* Container principal do conteúdo (exclui menu) - apenas na página index */
body.index-page .container.margin_60,
body.index-page .container.margin_30 {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #212B36;
}

/* Sorteios em coluna (um abaixo do outro) */
body.index-page .box_container {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-bottom: 20px;
}

/* Card do sorteio - novo layout */
body.index-page .rifa_container_new {
    display: block;
    background: #212B36;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

body.index-page .rifa_container_new:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    text-decoration: none;
}

/* Container da imagem */
body.index-page .img_container_new {
    width: 100%;
    height: 408px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    position: relative;
}

body.index-page .img_container_new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.index-page .img_container_new .short_info {
    position: absolute;
    right: 12px;
    z-index: 2;
}

body.index-page .img_container_new .short_info .price {
    background: transparent;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #fff;
    font-weight: 700;
    font-size: 25px;
    line-height: 1;
}

body.index-page .img_container_new .short_info .price sup {
    font-size: 0.65em;
}

/* Ribbon diagonal sobre a imagem - rifas em andamento */
body.index-page .ribbon_3 {
    position: absolute;
    left: 10px;
    top: -5px;
    z-index: 1;
    overflow: hidden;
    width: 125px;
    height: 125px;
    text-align: right;
}

body.index-page .ribbon_3 span {
    font-size: 9px;
    font-weight: bold;
    color: #FFF;
    text-transform: uppercase;
    text-align: center;
    line-height: 20px;
    transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    width: 125px;
    display: block;
    background: #79A70A;
    background: linear-gradient(#9BC90D 0%, #79A70A 100%);
    box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25);
    position: absolute;
    top: 28px;
    left: -24px;
}

body.index-page .ribbon_3 span::before {
    content: "";
    position: absolute;
    left: 0px;
    top: 100%;
    z-index: -1;
    border-left: 3px solid #638908;
    border-right: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-top: 3px solid #638908;
}

body.index-page .ribbon_3 span::after {
    content: "";
    position: absolute;
    right: 0px;
    top: 100%;
    z-index: -1;
    border-left: 3px solid transparent;
    border-right: 3px solid #638908;
    border-bottom: 3px solid transparent;
    border-top: 3px solid #638908;
}

/* Ribbon amarela - quase esgotado */
body.index-page .ribbon_3.almost span {
    background: linear-gradient(#C7CB54 0%, #CBC31E 100%);
}

body.index-page .ribbon_3.almost span::before {
    border-left: 3px solid #CBC31E;
    border-right: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-top: 3px solid #CBC31E;
}

body.index-page .ribbon_3.almost span::after {
    border-left: 3px solid transparent;
    border-right: 3px solid #CBC31E;
    border-bottom: 3px solid transparent;
    border-top: 3px solid #CBC31E;
}

/* Ribbon vermelha - faltam poucos */
body.index-page .ribbon_3.missing span {
    background: linear-gradient(#F14F3F 0%, #CB4335 100%);
}

body.index-page .ribbon_3.missing span::before {
    border-left: 3px solid #A3362A;
    border-right: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-top: 3px solid #A3362A;
}

body.index-page .ribbon_3.missing span::after {
    border-left: 3px solid transparent;
    border-right: 3px solid #A3362A;
    border-bottom: 3px solid transparent;
    border-top: 3px solid #A3362A;
}

/* Conteúdo abaixo da imagem */
body.index-page .rifa_content_new {
    padding: 12px;
    position: relative;
}

/* Título do sorteio */
body.index-page .rifa_title_new {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 2px 0;
    text-align: left;
    text-transform: uppercase;
    font-family: 'Montserrat', Arial, sans-serif;
}

body.index-page .rifa_title_new .rifa_price_highlight {
    color: #ffc107;
    font-weight: 700;
}

/* Subtítulo "Participe e concorra!" */
body.index-page .rifa_subtitle_new {
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 200;
    margin: 0 0 5px 0;
    text-align: left;
    text-transform: none;
    letter-spacing: 0.5px;
    font-family: 'Montserrat', Arial, sans-serif;
}

/* Tag "Adquira Já!" - adaptada do carousel-badge */
body.index-page .rifa_content_new .carousel-badge {
    position: relative;
    bottom: auto;
    left: auto;
    background-color: #fbbf24 !important;
    color: #000000 !important;
    padding: 0.12rem 0.5rem !important;
    border-radius: 0.5rem !important;
    font-size: 8px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    z-index: 15;
    animation: blinkSlow 4s ease-in-out infinite;
    display: inline-block !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Animação de piscar */
@keyframes blinkSlow {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}

/* Títulos das seções */
body.index-page .section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
}

body.index-page .section-header:not(:first-child) {
    margin-top: 2.5rem;
}

body.index-page .section-title-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

body.index-page .section-title-container svg {
    /* Cor removida - agora usa cor primária dinâmica definida inline */
    margin-right: 0;
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
}

body.index-page .section-title-container h2 {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin: 0;
    text-align: left;
}

/* Cor do span removida - agora usa cor primária dinâmica definida inline */

body.index-page .section-description {
    color: #9ca3af;
    font-size: 0.875rem;
    margin: 0;
    text-align: left;
}

/* Cards dos sorteios realizados - layout horizontal */
body.index-page .rifa_sorteada_container {
    display: flex;
    flex-direction: row;
    background: #212B36;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    height: 110px;
}

body.index-page .rifa_sorteada_container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    text-decoration: none;
}

/* Imagem lateral esquerda */
body.index-page .rifa_sorteada_img {
    width: 90px;
    height: 110px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

body.index-page .rifa_sorteada_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

/* Ribbon vermelho sobre a imagem */
body.index-page .ribbon_sorteado {
    position: absolute;
    top: 8px;
    left: -25px;
    background: #ef4444;
    color: #fff;
    padding: 2px 25px;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    transform: rotate(-45deg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 10;
    text-align: center;
}

body.index-page .ribbon_sorteado span {
    display: block;
    font-size: 7px;
}

body.index-page .ribbon_sorteado label {
    display: block;
    font-size: 6px;
    margin: 0;
    font-weight: 400;
}

/* Conteúdo ao lado da imagem */
body.index-page .rifa_sorteada_content {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Título do sorteio */
body.index-page .rifa_sorteada_title {
    color: #ffffff;
    font-size: .9rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    text-align: left;
    text-transform: uppercase;
    font-family: 'Montserrat', Arial, sans-serif;
    line-height: 1.2;
}

/* Ganhador */
body.index-page .rifa_sorteada_ganhador {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 400;
    margin: 0 0 6px 0;
    text-align: left;
    font-family: 'Montserrat', Arial, sans-serif;
}

body.index-page .rifa_sorteada_ganhador strong {
    color: #ffffff;
    font-weight: 600;
}

/* Badge "Concluído" */
body.index-page .badge_sorteado {
    display: inline-block;
    color: #fff;
    background: rgba(121, 167, 10, 0.85);
    border: 1.5px solid #79A70A;
    padding: 0.12rem 0.5rem;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: none;
    width: fit-content;
}

body.index-page.dark .badge_sorteado,
body.dark.index-page .badge_sorteado {
    background: rgba(121, 167, 10, 0.7);
    border: 1.5px solid #79A70A;
    color: #fff;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    body.index-page .container.margin_60,
    body.index-page .container.margin_30 {
        max-width: 100%;
        padding: 16px !important;
    }
    
    body.index-page .img_container_new {
        height: auto;
        max-height: 500px;
    }
    
    body.index-page .rifa_title_new {
        font-size: 1.25rem;
    }
    
    body.index-page .rifa_subtitle_new {
        font-size: 0.875rem;
    }
    
    body.index-page .rifa_sorteada_img {
        width: 80px;
    }
    
    body.index-page .rifa_sorteada_content {
        padding: 10px;
    }
    
    body.index-page .rifa_sorteada_title {
        font-size: 0.9rem;
    }
}

/* Responsividade para telas menores */
@media (max-width: 480px) {
    body.index-page .img_container_new {
        max-height: 400px;
    }
    
    body.index-page .rifa_content_new {
        padding: 15px;
    }
    
    body.index-page .rifa_title_new {
        font-size: 1.1rem;
    }
}

/* ===== TEMA LIGHT - INDEX PAGE ===== */

/* Background do body - tema light */
body.index-page.light {
    background-color: #f9f9f9 !important;
}

/* Container principal - tema light */
body.index-page.light .container.margin_60,
body.index-page.light .container.margin_30 {
    background: #ffffff !important;
}

/* Card do sorteio - tema light */
body.index-page.light .rifa_container_new {
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

body.index-page.light .img_container_new .short_info .price {
    background: transparent;
    color: #fff;
}

body.index-page.light .rifa_container_new:hover {
    box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.15);
}

/* Título do sorteio - tema light */
body.index-page.light .rifa_title_new {
    color: #1f2937;
}

body.index-page.light .rifa_title_new .rifa_price_highlight {
    color: #d97706;
}

/* Subtítulo - tema light */
body.index-page.light .rifa_subtitle_new {
    color: #6b7280;
}

/* Títulos das seções - tema light */
body.index-page.light .section-title-container h2 {
    color: #1f2937;
}

body.index-page.light .section-description {
    color: #6b7280;
}

/* Cards dos sorteios realizados - tema light */
body.index-page.light .rifa_sorteada_container {
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

body.index-page.light .rifa_sorteada_container:hover {
    box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.15);
}

/* Título do sorteio realizado - tema light */
body.index-page.light .rifa_sorteada_title {
    color: #1f2937;
}

/* Ganhador - tema light */
body.index-page.light .rifa_sorteada_ganhador {
    color: #6b7280;
}

body.index-page.light .rifa_sorteada_ganhador strong {
    color: #1f2937;
}

/* Tag moderna para rifas - Ribbon Modern */
.ribbon-modern {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    pointer-events: none;
}

.ribbon-modern .badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: rgba(121, 167, 10, 0.85);
    border: 1.5px solid #79A70A;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

body.dark .ribbon-modern .badge {
    color: #fff;
    background: rgba(121, 167, 10, 0.7);
    border: 1.5px solid #79A70A;
}

.ribbon-modern.almost .badge {
    background: rgba(255, 193, 7, 0.85);
    border: 1.5px solid #ffc107;
    color: #fff;
}

body.dark .ribbon-modern.almost .badge {
    background: rgba(255, 193, 7, 0.7);
    border: 1.5px solid #ffc107;
    color: #fff;
}

.ribbon-modern.missing .badge {
    background: rgba(244, 67, 54, 0.85);
    border: 1.5px solid #f44336;
    color: #fff;
}

body.dark .ribbon-modern.missing .badge {
    background: rgba(244, 67, 54, 0.7);
    border: 1.5px solid #f44336;
    color: #fff;
}

.ribbon-modern.half-blue .badge {
    background: rgba(13, 110, 253, 0.85);
    border: 1.5px solid #0d6efd;
    color: #fff;
}

body.dark .ribbon-modern.half-blue .badge {
    background: rgba(13, 110, 253, 0.7);
    border: 1.5px solid #0d6efd;
    color: #fff;
}

.ribbon-modern.half-purple .badge {
    background: rgba(111, 66, 193, 0.85);
    border: 1.5px solid #6f42c1;
    color: #fff;
}

body.dark .ribbon-modern.half-purple .badge {
    background: rgba(111, 66, 193, 0.7);
    border: 1.5px solid #6f42c1;
    color: #fff;
}

.ribbon-modern.half-orange .badge {
    background: rgba(253, 126, 20, 0.85);
    border: 1.5px solid #fd7e14;
    color: #fff;
}

body.dark .ribbon-modern.half-orange .badge {
    background: rgba(253, 126, 20, 0.7);
    border: 1.5px solid #fd7e14;
    color: #fff;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

.car-image {
    position: relative;
    overflow: visible !important;
}

.car-item {
    overflow: visible !important;
}

.box_container {
    overflow: visible !important;
}

body.index-page .img_container_new {
    position: relative;
}

@media (max-width: 768px) {
    .ribbon-modern {
        top: 8px;
        left: 8px;
    }
    
    .ribbon-modern .badge {
        padding: 4px 10px;
        font-size: 9px;
    }
}
