/* reglas.css */
@media (min-width: 768px) {
    body::before {
        content: "Esta página solo está disponible en dispositivos móviles.";
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        color: #000;
        font-size: 1.2rem;
        text-align: center;
        padding-top: 20%;
        z-index: 9999;
    }
    .navbar, .content, .bottom-nav {
        display: none;
    }
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #2D2A4A 20%, #002D62 40%, #FFFFFF 60%, #A51931 80%, #CE1126 100%);
    background-size: 200% 200%;
    animation: gradientBG 12s ease infinite;
    min-height: 100vh;
    color: #000000;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.navbar {
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 5px 10px;
}

.navbar-brand {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.navbar-brand img {
    height: 30px;
}

.content {
    padding: 70px 10px 80px; /* Espacio para navbar y bottom-nav */
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
}

.rules-container {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    overflow: visible;
    position: relative;
}

.rule-header {
    background: #002D62;
    color: #fff;
    padding: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.rule-content {
    padding: 15px;
    font-size: 0.9rem;
    color: #333;
    white-space: pre-wrap;
    min-height: 100px;
    overflow-y: auto;
}

.rule-image {
    max-width: 30%;
    height: auto;
    display: block;
    margin: 10px auto;
}

.rule-footer {
    padding: 10px;
    text-align: center;
    background: #f9f9f9;
}

.download-btn {
    background: #CE1126;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #A51931;
}

.no-rules {
    color: #fff;
    font-size: 1rem;
    text-align: center;
    padding: 20px;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 2rem;
    color: rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 10;
    display: none; /* Visible solo en PDF */
}

/* Estilos para bottom-nav (adaptados de proximo_evento.php y reglas.php) */
.bottom-nav {
    background: #1e3c72;
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 5px 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    height: 60px;
}

.bottom-nav-item {
    background: none;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    padding: 5px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
    text-align: center;
    text-decoration: none;
    transition: color 0.3s;
}

.bottom-nav-item i {
    font-size: 1.8rem;
    margin-bottom: 3px;
}

.bottom-nav-item span {
    font-size: 0.7rem;
}

.bottom-nav-item.active {
    color: #CE1126;
}

.bottom-nav-item:hover {
    color: #A51931;
}