/* Estilos generales */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.6;
}

/* Menú de navegación */
nav {
    background-color: #003087;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-menu li {
    margin: 0 20px;
    position: relative;
}

.nav-menu li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.nav-menu li a:hover {
    color: #ffd700;
}

/* Dropdown toggle */
.dropdown-toggle {
    width: 10px;
    height: 10px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fff"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat center;
    margin-left: 5px;
    cursor: pointer;
    transition: transform 0.3s;
}

.nav-menu li:hover .dropdown-toggle {
    transform: rotate(180deg);
}

/* Submenu */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #003087;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.nav-menu li:hover .submenu {
    display: block; /* Dropdown on hover for desktop */
}

.submenu.active {
    display: block; /* Show on click for mobile */
}

.submenu li {
    margin: 0;
}

.submenu li a {
    padding: 8px 20px;
    display: block;
    color: #fff;
    text-decoration: none;
    font-weight: normal;
}

.submenu li a:hover {
    background-color: #004d99;
    color: #ffd700;
}

/* Estilos del menú hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    background-color: #fff;
    height: 3px;
    width: 25px;
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Encabezado */
header {
    text-align: center;
    padding: 20px 0;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    color: #003087;
}

/* Secciones de loterías */
.lottery-section {
    margin: 30px 0;
}

.lottery-section h2 {
    color: #003087;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.lottery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.lottery-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.lottery-card h3 {
    margin: 0 0 10px;
    color: #003087;
}

.lottery-card p {
    margin: 0;
    font-size: 14px;
}

.lottery-card h3 a {
    color: #003087;
    text-decoration: none;
}
.lottery-card h3 a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #003087;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        position: absolute;
        right: 20px;
        top: 15px;
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .nav-menu.active {
        max-height: 600px; /* Increased to accommodate submenus */
    }

    .nav-menu li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    .nav-menu li a {
        padding: 10px;
        display: block;
    }

    .dropdown-toggle {
        display: inline-block;
        vertical-align: middle;
    }

    .submenu {
        position: static;
        width: 100%;
        box-shadow: none;
        background-color: #004d99;
        padding-left: 20px;
        display: none; /* Hidden by default on mobile */
    }

    .nav-menu li:hover .submenu {
        display: none; /* Disable hover on mobile */
    }

    .submenu.active {
        display: block; /* Show on click for mobile */
    }

    .submenu li a {
        padding: 8px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .lottery-section h2 {
        font-size: 1.5em;
    }

    .lottery-card {
        padding: 15px;
    }
}