/* ===================================================================
   FASE 7: Archivo custom.css (Refactorizado y Corregido)
   Este archivo contiene TODAS las personalizaciones del sitio.
=================================================================== */

/* --- 1. Estilos Globales y de Carga --- */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(to bottom right, #438B39, #235529);
    background-size: cover;
    min-height: 100vh;
    opacity: 1;
    transition: opacity 0.5s ease;
    margin: 0;
    padding: 0;
}

/* Fondo para móvil */
@media (max-width: 768px) {
    body {
        background-image: linear-gradient(to bottom right, #438B39, #235529);
    }
}

body.loaded {
    opacity: 1;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #252525;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-logo {
    width: 250px;
    height: auto;
    margin-bottom: 30px;
    animation: pulse 1.5s infinite ease-in-out;
}

.loading-text {
    color: #edc249;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 2px;
    margin-top: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(237, 194, 73, 0.3);
    border-radius: 50%;
    border-top-color: #edc249;
    animation: spin 1s ease-in-out infinite;
    margin-top: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

body.loaded .loading-screen {
    opacity: 0;
    pointer-events: none;
}

/* --- 2. Navbar (Barra de Navegación) --- */
.navbar-custom {
    background: linear-gradient(to bottom, #ffffff, #d4f6cd);
    padding: 1rem 0;
}

.logo-img {
    height: 114px;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-container {

    display: flex;
    width: 100%;
    align-items: center;
}

.nav-main-options {
    display: flex;
    justify-content: center;
    flex-grow: 1;
}

.nav-link-custom {
    color: #235529 !important;
    margin: 0 20px;
    font-size: 1rem;
    text-decoration: none !important;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    letter-spacing: -1px;
}

.nav-link-custom:hover {
    color: #438B39 !important;
    transform: translateY(-3px);
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: #438B39;
    transition: width 0.3s ease;
}

.nav-link-custom:hover::after {
    width: 100%;
}

/* --- 3. Menú Móvil (Offcanvas) --- */
.mobile-menu-btn {
    background: transparent;
    border: none;
    border-radius: 10px;
    padding-right: 10px;
    padding-left: 10px;
    color: #235529;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    color: #438B39 !important;
}

.offcanvas-custom {
    background:linear-gradient(to bottom, #ffffff, #d4f6cd);
    max-width: 300px;
}

.offcanvas-title-custom {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: #235529;
}

.mobile-nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: #438B39;
    padding: 1rem 0;
    display: block;
    text-decoration: none;
    border-bottom: 1px solid #444;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    color: #235529 !important;
    padding-left: 1rem;
}

/* --- 4. Títulos y Tarjetas de Rifas --- */
.page-title {
    font-family: 'Anton', sans-serif;
    font-size: 92px;
    margin: 0 auto 2rem auto;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(to right, #ffffff, #fff0c2, #ffdd93);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
    width: fit-content;
    padding: 0 20px;
    text-shadow: 3px 3px 3px rgba(0, 0, 0, 0.2), 0 0 7px rgba(255, 240, 194, 0.5);
    line-height: 1.2;
    font-weight: bolder;
    animation: pulse-glow 2.5s ease-in-out infinite;

}

@keyframes pulse-glow {
    0% {
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2), 0 0 7px rgba(255, 240, 194, 0.5);
    }
    50% {
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2), 0 0 25px rgba(252, 237, 103, 0.9);
    }
    100% {
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2), 0 0 7px rgba(255, 240, 194, 0.5);
    }
}

/* --- Estilos de Tarjetas Modernas (Refactorizado) --- */
.card-rifa {
    background: #ffffff;
    border: none;
    border-radius: 20px; /* Bordes más redondeados */
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08); /* Sombra suave inicial */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efecto rebote sutil */
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-rifa:hover {
    transform: translateY(-12px); /* Se eleva más */
    box-shadow: 0 20px 40px rgba(35, 85, 41, 0.25); /* Sombra verde al flotar */
}

/* Contenedor de imagen */
.card-img-container {
    height: 240px;
    overflow: hidden;
    position: relative;
    border-bottom: 4px solid #edc249; /* Línea dorada divisoria */
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}


/* Etiqueta de Precio Flotante */
.price-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #438B39, #235529);
    color: white;
    padding: 8px 15px;
    border-radius: 12px;
    font-family: 'Anton', sans-serif;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 2;
    text-align: center;
    line-height: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.price-badge small {
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 2px;
    font-weight: 400;
    letter-spacing: 1px;
}

/* Cuerpo de la tarjeta */
.card-body {
    padding: 1.5rem;
    background-color: #fff;
}

/* Fecha pequeña arriba del título */
.rifa-date {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f4f4f4;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    width: fit-content;
}

/* Título */
.card-title-rifa {
    font-family: 'Anton', sans-serif;
    font-size: 1.8rem; /* Reducido de 42px para mejor balance */
    line-height: 1.1;
    margin-bottom: 0.8rem;
    color: #252525;
    text-transform: uppercase;
    /* Evitar que títulos largos rompan el diseño (truncate) */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text {
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
}

.card-text strong {
    color: #438B39; /* Verde corporativo */
    font-weight: 800;
}

/* Botón Jugar Rediseñado */
.btn-jugar {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 1px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: linear-gradient(to right, #edc249, #c99b1b); /* Verde oscuro a claro */
    color: #235529 !important;
    text-transform: uppercase;
    width: 100%;
    text-align: center;
    display: block;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(35, 85, 41, 0.3);
    text-decoration: none;
}


/* Efecto de brillo en el botón */
.btn-jugar::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: 0.5s;
}

.btn-jugar:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(35, 85, 41, 0.5);
    background: linear-gradient(to right, #edc249, #c99b1b); /* Cambia a dorado al hacer hover */
    color: #438B39 !important;
}

.btn-jugar:hover::before {
    left: 100%; /* Animación de brillo */
}

/* --- 5. Footer (Diseño Exacto Imagen) --- */
footer.footer-custom {
    background-color: #ffffff; /* Fondo completamente blanco */
    color: #252525;
    padding-top: 3rem;
    margin-top: 4rem;
    font-family: 'Inter', sans-serif;
    position: relative;
    border-top: 1px solid #eee; /* Sutil línea superior */
}

/* Títulos (Avisos Legales, Cotiza...) */
.footer-title {
    font-weight: 800;
    color: #235529; /* Verde oscuro corporativo */
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    letter-spacing: -0.5px;
}

/* Logo Principal */
.footer-logo {
    max-width: 220px;
    height: auto;
}

/* Enlaces y Textos */
.footer-link, 
.contact-row span {
    color: #235529; /* Color texto verde oscuro */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #438B39;
    text-decoration: underline;
}

/* Iconos pequeños (teléfono, mapa, etc) */
.footer-icon {
    color: #438B39; /* Verde claro */
}

/* Líneas divisorias verdes */
.border-bottom-custom {
    border-bottom: 1px solid #438B39; /* Línea verde sólida */
    width: 100%;
}

/* Sección Legales (ajuste de ancho de línea) */
.legal-links-container {
    width: fit-content;
    margin: 0 auto;
}
.legal-links-container .border-bottom-custom {
    padding-bottom: 8px;
    margin-bottom: 5px;
    width: 100%;
}

/* Título Will AI */
.will-ai-title {
    color: #235529;
    font-weight: 800;
    font-size: 1.1rem;
}

/* Círculos Sociales */
.social-circle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    background-color: #235529;
    color: white;
    border-radius: 50%;
    margin: 0 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.social-circle:hover {
    background-color: #438B39;
    transform: translateY(-3px);
}

/* Sección Desarrollador */
.developer-section {
    margin-top: 10px;
    margin-bottom: 20px;
}

.developer-section span {
    font-size: 0.9rem;
    color: #666; /* Color gris para "Software desarrollado por" */
}

/* Barra Copyright */
.copyright-bar {
    background-color: #1a3d1e; /* Verde muy oscuro (casi negro) */
    padding: 12px 0;
    width: 100%;
}

/* Responsivo */
@media (max-width: 768px) {
    .text-md-end {
        text-align: center !important;
    }
    .contact-row {
        justify-content: center !important;
    }
    .footer-logo {
        margin-bottom: 20px;
    }
}

/* --- 6. Estilos de Contenedores Globales --- */
.main-container,
.container-admin,
.login-container {
    background-color: rgba(255, 255, 255, 0.85) !important;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    padding: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
}

/* --- 7. Componentes de Rifa (Tablero) --- */
.card-header-rifa {
    background-color: #0d6efd;
    color: white;
    border-radius: 15px 15px 0 0 !important;
    padding: 20px;
}

.numero-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.numero {
    font-family: "Inter", sans-serif;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.numero:hover {
    transform: scale(1.05);
}

.numero.seleccionado {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.numero.ocupado {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
    cursor: not-allowed;
}

/* --- 8. Estilos de Formulario de Pago (pago_online.php) --- */
.payment-method {
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.payment-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.copy-btn {
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    transform: scale(1.1);
}

.copy-btn:active {
    transform: scale(0.95);
}

.terms-checkbox {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.binance-bg {
    background-color: #f3ba2f;
    color: #000 !important;
}

.binance-bg:hover {
    background-color: #e0a91a;
}

/* ===================================================================
   FASE 8: Estilos Específicos para Contacto
=================================================================== */

.contact-info-wrapper {
    padding-right: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.contact-icon-box {
    min-width: 50px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #edc249, #c99b1b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #000;
    margin-right: 20px;
    box-shadow: 0 4px 15px rgba(237, 194, 73, 0.3);
    transition: transform 0.3s ease;
}

.contact-item:hover .contact-icon-box {
    transform: scale(1.1) rotate(10deg);
}

.contact-text h5 {
    font-family: 'Anton', sans-serif;
    margin: 0;
    font-size: 1.2rem;
    color: #252525;
}

.contact-text p, .contact-text a {
    font-family: 'Inter', sans-serif;
    margin: 0;
    color: #555;
    text-decoration: none;
    font-size: 1rem;
}

.contact-text a:hover {
    color: #c99b1b;
}

/* Inputs elegantes */
.form-floating-custom > .form-control {
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid #ced4da;
    border-radius: 10px;
    height: calc(3.5rem + 2px);
    line-height: 1.25;
    padding: 1rem 0.75rem;
    box-shadow: none;
    transition: all 0.3s ease;
}

.form-floating-custom > .form-control:focus {
    background-color: #fff;
    border-color: #edc249;
    box-shadow: 0 0 0 0.25rem rgba(237, 194, 73, 0.25);
}

.form-floating-custom > label {
    color: #666;
    padding: 1rem 0.75rem;
}

.form-floating-custom > .form-control:focus ~ label,
.form-floating-custom > .form-control:not(:placeholder-shown) ~ label {
    color: #c99b1b;
    transform: scale(.85) translateY(-0.7rem) translateX(0.15rem);
}

.form-floating-custom textarea.form-control {
    height: 150px;
}

/* Ajuste responsive para el formulario */
@media (max-width: 992px) {
    .contact-info-wrapper {
        padding-right: 0;
        margin-bottom: 2rem;
        border-bottom: 1px solid #eee;
        padding-bottom: 1rem;
    }
}

/* --- Botón del Header (Estilo "Ver Demo") --- */
.btn-header-cta {
    background: linear-gradient(to bottom, #438B39, #235529); /* Degradado verde */
    color: white !important;
    padding: 10px 25px;
    border-radius: 50px; /* Bordes completamente redondos (Pill shape) */
    text-decoration: none;
    font-weight: 700; /* Texto grueso */
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(35, 85, 41, 0.3); /* Sombra suave verde */
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.btn-header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(35, 85, 41, 0.4);
    background: linear-gradient(to bottom, #4ea042, #2a6631); /* Un poco más claro al pasar el mouse */
    color: white !important;
}

.btn-header-cta i {
    font-size: 0.8rem; /* Ajuste del tamaño del icono de Play */
}

/* Ajuste opcional para asegurar que el navbar centre bien los elementos */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 5.2rem;
}

.nav-main-options {
    flex-grow: 1;
    justify-content: center; /* Mantiene los enlaces centrados */
}


/* --- Top Bar (Barra Superior) --- */
.top-bar-custom {
    background: (to bottom right, #438B39, #235529); /* Verde similar a la imagen */
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 12px; /* Tamaño pequeño y elegante */
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1); /* Sutil línea divisoria */
    letter-spacing: -0.5px;
}

.top-bar-item {
    display: flex;
    align-items: center;
    margin-right: 20px; /* Espacio entre elementos */
}

.top-bar-item i {
    margin-right: 8px;
    font-size: 14px; /* Icono ligeramente más grande que el texto */
}

.top-bar-item a, 
.top-bar-item span {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.top-bar-item a:hover {
    opacity: 0.8; /* Efecto sutil al pasar el mouse sobre el correo */
    text-decoration: underline;
}

/* Ajustes para móviles (Responsive) */
@media (max-width: 992px) {
    .top-bar-custom {
        display: none; /* Opcional: Ocultar en móvil si ocupa mucho espacio */
    }
    
    /* Si prefieres mostrarlo en móvil, usa este código en su lugar: */
    /*
    .top-bar-custom .d-flex {
        flex-direction: column;
        gap: 5px;
        padding: 5px 0;
    }
    .top-bar-item {
        margin-right: 0;
        margin-bottom: 5px;
    }
    */
}

/* --- Ajuste Título en Móviles (Pantallas menores a 768px) --- */
@media (max-width: 768px) {
    .page-title {
        font-size: 58px; /* Reducido para que quepa en pantallas verticales */
        line-height: 1.1; /* Mejor interlineado en móvil */
        padding: 0 10px; /* Menos padding lateral */
        margin-bottom: 1.5rem;
    }
}