/* ----- Estilos generales ----- */

:root {
    --color-white: #FFFFFF;
    --color-bg-superdark: #531879;    /* Deep Purple */
    --color-bg-dark: #50158d;        /* Dark Purple */
    --color-bg-mid: #cc5ce6;         /* Light Purple */
    --color-bg-light: #f1e973;       /* Pale Yellow */
    --color-primary: #f7d136;        /* Gold Yellow */
    --color-cream: #fbf4e7;          /* Creamy White */
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
  font-family: "Gilroy";
  src: url("/fonts/gilroy.ttf") format("truetype");
  font-weight: 600; 
  font-style: normal; 
}

.special-gothic-expanded-one-regular {
  font-family: "Gilroy", sans-serif;
  font-weight: 600;
  font-style: normal;
}

/* ----- Estilos del body ----- */

body {
  	font-family: "Gilroy";
    background-color: var(--color-bg-superdark);
    color: var(--color-white);
    line-height: 1.6;
}

/* ----- Header ----- */

.main-header {
    background-color: var(--color-bg-dark);
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 80px;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
}

/* ===== MENÚ EN MÓVILES: Siempre visible, debajo del logo, centrado ===== */

.mobile-menu-btn {
    display: none !important; /* Ocultamos el botón hamburguesa */
}

.nav-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
    padding: 0;
    list-style: none;
    width: auto;
    background: transparent;
    position: static;
    left: auto;
    height: auto;
    transition: none;
    flex-wrap: nowrap;
}

.nav-menu li {
    width: auto;
    max-width: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.nav-menu a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.5rem 0.8rem;
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    width: 100%;
}

.nav-menu a i {
    font-size: 0.8rem;
    display: block;
}

.nav-menu a span {
    display: block;
}

.nav-menu a:hover {
    color: var(--color-primary);
}

.main-nav a {
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-nav a:hover {
    color: var(--color-primary);
}

.main-content {
    min-height: calc(100vh - 120px);
    padding: 2rem 1rem;
}

/* Estilos para el menú responsivo */
.navbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0 10px;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .navbar-nav {
        display: none;
        width: 100%;
        flex-direction: column;
    }
    
    .navbar-nav.active {
        display: flex;
    }
    
    .nav-item {
        margin: 5px 0;
    }
}

/* Estilos del menú responsivo */
.main-nav {
    display: flex;
    align-items: center;
}

/* ----- Contenedor Principal ----- */

.container {

    width: 98%;
    margin: 0 auto;
    background-color: var(--color-cream); /* Usando Creamy White */
    border-radius: 10px;
}

/* ----- Estilos de las tarjetas ----- */

.card {
    background-color: var(--color-bg-dark);
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    padding: 2px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(247, 209, 54, 0.3); /* Sombra con tono dorado */
}

/* ----- Botones ----- */

.btn {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-bg-dark);
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--color-bg-mid);
    transform: translateY(-2px);
}

/* ----- Imagen de la rifa ----- */

.raffle-image-container1 {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.raffle-image1 {
    width: 100%;
    height: auto;
    display: block;
}

/* ----- Formularios ----- */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border-radius: 5px;
    border: 1px solid var(--color-bg-mid);
    background-color: var(--color-bg-dark);
    color: var(--color-white);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(247, 209, 54, 0.3); /* Dorado */
}

/* ----- Footer ----- */

footer {
    background-color: var(--color-bg-dark);
    padding: 20px;
    color: var(--color-white);
    text-align: center;
    font-size: 14px;
}

footer a {
    color: var(--color-primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ----- Pagina del sorteo ----- */

/* Estilo para los contenedores de selección de números */
#numbersGridContainer {
    max-height: 400px;
    overflow-y: auto;
    margin: 1rem 0;
    border: 1px solid var(--color-bg-mid);
    border-radius: 8px;
    padding: 10px;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
}

.number-btn {
    width: 100%;
    height: 30px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg-mid);
    color: var(--color-bg-dark);
    border: none;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.number-btn:hover {
    background-color: var(--color-primary);
}

.number-btn.selected {
    background-color: var(--color-primary);
    transform: scale(1.05);
    color: var(--color-bg-dark);
}

.number-btn.taken {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
    text-decoration: line-through;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: 0.5rem;
    background-color: var(--color-bg-mid);
    border-radius: 50px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.pagination-arrow {
    background: none;
    border: none;
    color: var(--color-bg-dark);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.pagination-arrow:hover {
    background-color: var(--color-primary);
}

.pagination-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-weight: 500;

    min-width: 120px;
    text-align: center;
    color: var(--color-bg-dark);
}

/* ----- Modal de Términos y condiciones ----- */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    overflow-y: auto;
}

.modal-dialog {
    max-width: 600px;
    margin: 2rem auto;
    background-color: var(--color-bg-dark);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-content {
    padding: 1.5rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-bg-mid);
}

.modal-title {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-white);
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--color-primary);
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--color-bg-mid);
}

/* ----- Otros estilos para la web ----- */

summary-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-bg-dark);
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border-top: 2px solid var(--color-primary);
}

.summary-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    height: 80px;
    margin: 0 auto;
    padding: 0 1rem;
}

.summary-info {
    font-size: 20px;
    color: var(--color-white);
}

.summary-amount {
    font-size: 40px;
    font-weight: bold;
    color: var(--color-primary);
}

/* Contenedor principal - Móvil (default) */
.raffle-image-container {
    height: 400px;
}

/* Slides internos - Móvil (default) */
.raffle-image-container .carousel-slides,
.raffle-image-container .carousel-slide {
    height:400px !important;
}

/* PC (pantallas ≥ 768px) */
@media (min-width: 768px) {
    .raffle-image-container {
        height: 600px;
    }
    .raffle-image-container .carousel-slides,
    .raffle-image-container .carousel-slide {
        height: 600px !important;
    }
}

/* Contenedor principal - Móvil (default) */
.carousel-container {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 10px;
}

/* Slides internos - Móvil (default) */
.carousel-container .carousel-slides,
.carousel-container .carousel-slide {
    height: 400px !important;
}

/* PC (pantallas ≥ 768px) */
@media (min-width: 768px) {
    .carousel-container {
        height: 600px;
    }
    .carousel-container .carousel-slides,
    .carousel-container .carousel-slide {
        height: 600px !important;
    }
}