/* Colores de referencia para tu proyecto:
    Blanco: #FFFFFF
    Negro: #000000
    Color principal/acento: #890028
*/

html, body {
    width: 100%;
    min-height: 100%; /* Asegura que el body se expanda con el contenido */
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Evita scroll horizontal */
}

html {
    scroll-padding-top: 95px;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #FFFFFF;
    line-height: 1.6;
    background-color: #000000;
    padding-top: 85px; /* Ajuste clave para compensar la navbar fija */
}

/* --- Estilos de la cabecera (Header) --- */
.header {
    background-color: transparent;
    background-image: url('https://rifasonlycars.com/img/original.jpg'); /* ¡Asegúrate que esta URL sea la correcta para tu imagen de fondo! */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    
    width: 100%;
    height: calc(100vh - 85px); /* Ajusta la altura para que ocupe el resto de la pantalla visible después de la navbar */
    
    position: relative;
    overflow: hidden;
    
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    padding: 0;
    z-index: 1; /* Asegúrate de que el z-index sea menor que el de la navbar (1000) */
}

/* Contenedor principal del contenido del header */
.header-content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1;
}

/* La sección que contendrá el PNG y el botón */
.header-title-section {
    width: 100%;
    text-align: center;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    padding: 0;
    z-index: 2;
}

/* ESTILOS PARA LA IMAGEN PNG DEL LOGO 
.header-onlycars-logo-png {
    max-width: 60%;
    height: auto;
    margin-bottom: 30px;
    z-index: 2;
    
    animation: fadeInScale 1.5s ease-out forwards, subtlePulse 3s ease-in-out 1.5s infinite;
}

/* Estas reglas de texto ya no son necesarias y están ocultas (display: none) */
.header-main-text,
.header-year-text {
    display: none;
}

/* El botón "¡Participa!" */
.principal-link {
    margin-top: 0;
    font-size: 1.2em;
    padding: 15px 40px;
    z-index: 2;
}

/* El header > .container ahora actúa como un limitador de ancho para el contenido interno */
.header > .container {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100%;
}

/* Estilos para la imagen principal del header (AHORA OCULTA EN HTML) */
.header-main-image {
    display: none;
}


/* --- Estilos de la Navbar --- */
.navbar {
    border-top: 8px solid rgba(137, 0, 40, 0.4);
    border-bottom: none;
    background-color: #000000;
    padding: 15px 0; /* CORRECCIÓN: Padding válido para la navbar */
    transition: all 0.3s ease;
    z-index: 1000;
}

.navbar-container {
    padding: 0 15px;
}

.navbar-brand-logo img {
    width: 300px;
    height: auto;
    max-height: 100px;
}

.navbar-toggler {
    color: #890028;
    border-color: #890028;
}

.navbar-toggler i {
    font-size: 1.5em;
}

.navbar-collapse {
    /* Por defecto, Bootstrap maneja flex-direction en su JS para colapsar/expandir.
       Lo ajustamos en las media queries para el modo abierto responsive. */
    display: flex; /* Asegura que siempre sea flex */
    align-items: center;
    justify-content: space-around;
}

.navbar-nav .nav-item .nav-link {
    padding: 15px 15px;
    color: #FFFFFF;
    font-weight: 600;
    transition: color 0.3s ease;
    font-size: 1.1em;

    display: flex;
    align-items: center;
    height: 100%;
}

.navbar-nav .nav-item .nav-link:hover .nav-link-menu {
    color: #890028 !important;
}

.nav-link-menu {
    margin: 0;
    padding: 0;
}

.header-scrolled {
    -webkit-box-shadow: 0 5px 6px 0 #8900286b;
    box-shadow: 0 5px 6px 0 #8900286b;
}

/* --- Estilos generales de botones --- */
.learn-more-btn,
button {
    background-color: #890028;
    color: #FFFFFF;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 0 18px rgba(137, 0, 40, 0.4);
    font-size: 1.1em;
}

.learn-more-btn:hover,
button:hover {
    background-color: #000000;
    color: #FFFFFF;
    box-shadow: 0 0 25px rgba(137, 0, 40, 0.8);
}

.btn-invert {
    background-color: #890028 !important;
}

.btn-invert:hover {
    background-color: #000000 !important;
    color: #FFFFFF !important;
}

/* --- Títulos de secciones --- */
.clients-section,
.blog-section,
.contact-section {
    padding-top: 80px;
    padding-bottom: 60px;
    text-align: center;
    background-color: #000000;
}

.clients-title-section,
.blog-title-section,
.contact-title-section {
    margin-bottom: 40px;
}

.clients-subtitle {
    font-size: 1.3em;
    color: #890028;
    font-weight: 700;
}

.clients-title,
.blog-title,
.contact-title {
    font-size: 3em;
    font-weight: 800;
    color: #FFFFFF;
    margin-top: 15px;
}

/* --- Tarjetas de rifa (blog-post-card) --- */
.blog-post-card-container {
    padding: 15px;
}

.blog-post-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(137, 0, 40, 0.3),
                0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    padding-bottom: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 35px rgba(137, 0, 40, 0.8),
                0 8px 30px rgba(0, 0, 0, 0.5);
}

.blog-post-icon.container-img-rifa {
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.blog-post-icon.container-img-rifa img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-post-title {
    font-size: 1.7em;
    color: #FFFFFF;
    margin-bottom: 10px;
    padding: 0 15px;
}

.blog-post-subtitle {
    font-size: 1.1em;
    color: #11ff00;
    margin-bottom: 20px;
}

.blog-post-card .learn-more-btn {
    margin-top: auto;
    display: inline-block;
    font-size: 1em;
    padding: 10px 25px;
}

/* --- Sección de Detalles de Rifa (Nueva) --- */
.raffle-details-section {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(137, 0, 40, 0.3),
                0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 30px;
    margin-top: 20px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 60px;
    transition: box-shadow 0.3s ease;
}

.raffle-details-section h3 {
    color: #FFFFFF;
    font-size: 1.8em;
    margin-bottom: 20px;
    margin-top: 30px;
}

.raffle-details-section h4 {
    color: #890028;
    font-size: 1.4em;
    margin-bottom: 15px;
}

.raffle-ticket-selector {
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}
.raffle-ticket-selector .ticket-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.raffle-ticket-selector .btn-ticket-minus,
.raffle-ticket-selector .btn-ticket-plus {
    background-color: #890028;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.raffle-ticket-selector .ticket-quantity {
    font-size: 2em;
    font-weight: bold;
    color: #FFFFFF;
}

.raffle-ticket-selector p {
    font-size: 1.2em;
    color: #CCCCCC;
    margin-top: 10px;
}

.btn-confirm-quantity,
.btn-confirm-purchase,
.btn-verify-ticket {
    background-color: #890028;
    color: #FFFFFF;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 0 18px rgba(137, 0, 40, 0.5);
    font-size: 1.1em;
    margin-top: 20px;
}

.btn-confirm-quantity:hover,
.btn-confirm-purchase:hover,
.btn-verify-ticket:hover {
    background-color: #000000;
    box-shadow: 0 0 25px rgba(137, 0, 40, 0.8);
}

.raffle-personal-data {
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}
.raffle-personal-data .form-group {
    margin-bottom: 15px;
}

.raffle-personal-data .form-control {
    border: 1px solid #555;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    background-color: #333;
    color: #FFFFFF;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.raffle-personal-data .form-control::placeholder {
    color: #AAAAAA;
    opacity: 1;
}

.raffle-personal-data .form-control:focus {
    border-color: #890028;
    outline: none;
    box-shadow: 0 0 0 3px rgba(137, 0, 40, 0.5);
    background-color: #222;
}
.raffle-personal-data .form-control:hover:not(:focus) {
    border-color: #a0204a;
    box-shadow: 0 0 0 2px rgba(137, 0, 40, 0.3);
}


.raffle-personal-data .country-code {
    flex: 0 0 auto;
    width: auto;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 5px 0 0 5px;
    background-color: #333;
    color: #FFFFFF;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.raffle-personal-data .country-code:focus {
    border-color: #890028;
    outline: none;
    box-shadow: 0 0 0 3px rgba(137, 0, 40, 0.5);
    background-color: #222;
}
.raffle-personal-data .country-code:hover:not(:focus) {
    border-color: #a0204a;
    box-shadow: 0 0 0 2px rgba(137, 0, 40, 0.3);
}

.raffle-personal-data .form-group.input-group input {
    border-left: none;
    border-radius: 0 5px 5px 0;
}


.raffle-payment-methods {
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}
.raffle-payment-methods .payment-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.raffle-payment-methods .payment-option {
    cursor: pointer;
    padding: 10px;
    border: 2px solid #555;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 100px;
    height: 60px;
    background-color: #333;

    box-shadow: 0 0 10px rgba(137, 0, 40, 0.2);
}

.raffle-payment-methods .payment-option img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    display: block;
}

.raffle-payment-methods .payment-option.active {
    border-color: #890028;
    box-shadow: 0 0 20px rgba(137, 0, 40, 0.7),
                0 0 10px rgba(137, 0, 40, 0.5);
    background-color: #222;
}

.raffle-payment-methods .payment-option:hover {
    border-color: #890028;
    box-shadow: 0 0 22px rgba(137, 0, 40, 0.5),
                0 0 10px rgba(137, 0, 40, 0.3);
    background-color: #222;
}

.payment-details {
    margin-top: 20px;
    padding: 20px;
    background-color: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
    text-align: left;
}
.payment-details .contact-text {
    color: #CCCCCC;
}
.payment-details .contact-text strong {
    color: #FFFFFF;
}

.contact-text.link {
    overflow-x: auto;
    white-space: normal;
}


.raffle-payment-proof {
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}
.raffle-payment-proof .form-control-file {
    margin-top: 10px;
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #FFFFFF;
    background-color: #333;
    background-clip: padding-box;
    border: 1px solid #555;
    border-radius: .25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.raffle-payment-proof .form-control-file:focus {
    border-color: #890028;
    outline: none;
    box-shadow: 0 0 0 3px rgba(137, 0, 40, 0.5);
    background-color: #222;
}
.raffle-payment-proof .form-control-file:hover:not(:focus) {
    border-color: #a0204a;
    box-shadow: 0 0 0 2px rgba(137, 0, 40, 0.3);
}

.raffle-payment-proof .form-check {
    margin-top: 15px;
    text-align: left;
}
.raffle-payment-proof .form-check-label {
    color: #CCCCCC;
    font-size: 0.9em;
}
.raffle-payment-proof .form-check-input {
    background-color: #333;
    border: 1px solid #555;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 1em;
    height: 1em;
    border-radius: .25em;
    margin-top: .25em;
    margin-left: 0;
    flex-shrink: 0;
}
.raffle-payment-proof .form-check-input:checked {
    background-color: #890028;
    border-color: #890028;
}
.raffle-payment-proof .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(137, 0, 40, 0.25);
    outline: 0;
}


.raffle-confirm-consent {
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}
.raffle-confirm-consent p {
    font-size: 0.9em;
    color: #CCCCCC;
    margin-top: 30px;
}
.raffle-confirm-consent a {
    color: #890028;
    text-decoration: underline;
}

.raffle-ticket-verifier {
    margin-top: 40px;
    padding-top: 20px;
}
.raffle-ticket-verifier .form-control {
    margin-bottom: 15px;
}


.pagination-container {
    margin-top: 40px;
    text-align: center;
}

.pagination .page-item .page-link {
    color: #890028;
    border: 1px solid #890028;
    margin: 0 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
    padding: 8px 15px;
    background-color: #1a1a1a;
}

.pagination .page-item.active .page-link,
.pagination .page-item .page-link:hover {
    background-color: #890028;
    color: #FFFFFF;
    border-color: #890028;
    box-shadow: 0 0 10px rgba(137, 0, 40, 0.4);
}

.contact-section {
    background-color: #000000;
    padding: 80px 0;
}

.contact-title {
    color: #FFFFFF;
    margin-bottom: 50px;
    font-size: 3em;
}

.contact-text {
    color: #CCCCCC;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.contact-text img {
    vertical-align: middle;
    margin-right: 10px;
    width: 60px;
    height: auto;
}

.contact-text.bank_name {
    font-weight: bold;
    color: #890028;
    font-size: 1.2em;
    margin-top: 15px;
}

.contact-text pre {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    color: #CCCCCC;
    white-space: pre-wrap;
}

.magic_button {
    background: none;
    border: none;
    color: #890028;
    margin-left: 10px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.magic_button:hover {
    color: #FFFFFF;
}

.magic_button.copied {
    color: green;
}

.payment-method-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.payment-method-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(137, 0, 40, 0.3),
                0 6px 15px rgba(0, 0, 0, 0.3);
    padding: 25px;
    text-align: center;
    width: 100%;
    max-width: 350px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.payment-method-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 35px rgba(137, 0, 40, 0.8),
                0 10px 25px rgba(0, 0, 0, 0.5);
}

.payment-method-card .payment-logo img {
    max-width: 80px;
    height: auto;
    margin-bottom: 15px;
}

.payment-method-card .contact-text {
    color: #CCCCCC;
    margin-bottom: 8px;
    font-size: 1em;
}

.payment-method-card .bank_name {
    font-size: 1.3em;
    font-weight: 700;
    color: #890028;
    margin-top: 0;
    margin-bottom: 15px;
}

.payment-method-card pre {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95em;
    line-height: 1.4;
    color: #CCCCCC;
    margin-bottom: 5px;
    white-space: pre-wrap;
}

.payment-method-card strong {
    display: block;
    margin-bottom: 5px;
    color: #FFFFFF;
}

.payment-method-card .magic_button {
    vertical-align: middle;
    margin-left: 5px;
    font-size: 1.1em;
}


/* --- Footer --- */
.footer-section {
    background-color: #000000;
    color: #FFFFFF;
    padding: 50px 0 20px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: left;
}

.footer-logo,
.footer-subsection {
    padding: 15px;
    flex: 1 1 23%;
    min-width: 250px;
}

.footer-logo-img {
    width: 180px;
    height: auto;
    margin-top: 10px;
}


.footer-subsection-title {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #890028;
}

.footer-susection-text {
    font-size: 0.9em;
    line-height: 1.8;
    color: #CCCCCC;
}

.footer-susection-text img {
    max-width: 100%;
    height: auto;
    margin-top: 10px;
}

.footer-subsection-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-subsection-list li {
    margin-bottom: 10px;
    font-size: 0.9em;
}

.footer-subsection-list a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-subsection-list a:hover {
    color: #890028;
}

.footer-social-media-icons-section {
    margin-top: 20px;
}

.footer-social-media-icon {
    color: #FFFFFF;
    font-size: 1.8em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.footer-social-media-icon .fa:hover {
    color: #890028;
}

.hidden {
    display: none !important;
}

.header-simple {
    background-color: #000000;
    padding: 20px 0;
    border-bottom: 2px solid #890028;
    text-align: center;
}
.header-simple .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.header-simple .logo-rifas {
    width: 120px;
    height: auto;
}
.header-simple .page-title {
    color: #FFFFFF;
    font-size: 2em;
    font-weight: 700;
    margin: 0;
}

.footer-simple {
    background-color: #000000;
    color: #FFFFFF;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9em;
    margin-top: 50px;
}


/* Media Queries */
@media (max-width: 991px) {
    body {
        padding-top: 75px; /* Ajuste del padding para tablets */
    }

    .header {
        height: calc(80vh - 75px);
    }

    .header-main-text,
    .header-year-text {
        display: none;
    }

    .header-onlycars-logo-png {
        max-width: 80%;
    }

    .clients-slider .owl-carousel-clients .blog-post-card-container {
        max-width: 80%;
        margin: 0 auto;
    }
    
    .navbar-collapse {
        /* REGLAS PARA HORIZONTALIDAD EN RESPONSIVE (MENÚ ABIERTO) */
        flex-direction: row; /* Para que los elementos se alineen horizontalmente */
        flex-wrap: wrap;     /* Permite que los elementos se envuelvan a la siguiente línea si no caben */
        justify-content: center; /* Centra los elementos horizontalmente */
        align-items: center; /* Centra verticalmente */
        padding: 10px 0; /* Agrega un poco de espacio */
    }

    .navbar-nav {
        flex-direction: row; /* Mantén esto para que los nav-items estén en fila */
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        margin-bottom: 10px;
    }

    .navbar-nav .nav-item {
        margin: 5px 10px;
    }

    .navbar-nav .nav-item .nav-link {
        padding: 8px 15px;
        font-size: 0.95em;
        white-space: nowrap;
    }

    .navbar-nav .learn-more-btn {
        padding: 10px 20px;
        font-size: 1em;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
    }
    .footer-logo,
    .footer-subsection {
        text-align: center;
        width: 100%;
        max-width: 400px;
    }
    .footer-subsection-list {
        display: inline-block;
        text-align: left;
    }

    .payment-method-card {
        max-width: 300px;
        margin: 0 auto 20px auto;
    }
    .payment-method-cards-container {
        gap: 20px;
    }
}

@media (max-width: 767px) {
    body {
        padding-top: 65px; /* Ajuste del padding para móviles */
    }

    .header {
        height: calc(70vh - 65px);
    }
    .header-main-text,
    .header-year-text {
        display: none;
    }
    .header-onlycars-logo-png {
        max-width: 90%;
    }
    .clients-title,
    .blog-title,
    .contact-title {
        font-size: 2em;
    }
    .blog-post-title {
        font-size: 1.3em;
    }
    .header-subtitle {
        font-size: 1.2em;
    }
    .header-description {
        font-size: 1em;
    }

    .navbar-collapse {
        /* REGLAS PARA HORIZONTALIDAD EN RESPONSIVE (MENÚ ABIERTO) */
        flex-direction: row; /* Mantenemos horizontal en móviles pequeños */
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 5px; /* Menos espacio entre los elementos */
        padding: 5px 0;
    }

    .navbar-nav .nav-item {
        margin: 3px 5px;
    }
    .navbar-nav .nav-item .nav-link {
        padding: 6px 12px;
        font-size: 0.9em;
    }
}
/* Animación para el logo en la carga de la página */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animación de pulso sutil para el logo */
@keyframes subtlePulse {
    0% {
        filter: brightness(100%);
        transform: scale(1);
    }
    50% {
        filter: brightness(110%);
        transform: scale(1.02);
    }
    100% {
        filter: brightness(100%);
        transform: scale(1);
    }
}

.header-onlycars-logo-png {
    max-width: 60%;
    height: auto;
    margin-bottom: 30px;
    z-index: 2;

    animation: fadeInScale 1.5s ease-out forwards, subtlePulse 3s ease-in-out 1.5s infinite;
}