* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f4f7fb;
    color: #333;
}

/* HEADER */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    background: linear-gradient(90deg, #0b2a4a, #163f6b);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo h1 {
    font-size: 24px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

nav a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background: white;
    left: 0;
    bottom: -5px;
    transition: 0.3s;
}

nav a:hover::after {
    width: 100%;
}

/* MENU MOBILE */

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* HERO */

.hero {
    height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    color: white;
    padding: 20px;

    /* Imagen + overlay oscuro */
    background:
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url("../img/Jefatura_de_Policía_1.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero h2 {
    font-size: 48px;
    color: white;
}

.hero p {
    margin-top: 10px;
    font-size: 18px;
}

/* SECCIONES */

section {
    padding: 80px 60px;
}

h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 34px;
    color: #0b2a4a;
}

/* GRID RESPONSIVO */

.seccional-grid,
.servicios-grid,
.prevencion-grid,
.colaboracion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

/* TARJETAS */

.card {
    background: white;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: 0.4s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card h3 {
    margin-bottom: 10px;
    color: #1e4f86;
}

.card p {
    font-size: 14px;
    color: #555;
}

/* BOTONES */

button {
    margin-top: 15px;
    background: linear-gradient(45deg, #1e6acb, #0b2a4a);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    transform: scale(1.1);
}

/* EMERGENCIAS */

.emergencias {
    background: linear-gradient(120deg, #c62828, #e53935);
    color: white;
    text-align: center;
    border-radius: 20px;
    margin: 40px;
}

.emergencias-box {
    padding: 60px 20px;
}

.numero {
    font-size: 70px;
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.1)
    }

    100% {
        transform: scale(1)
    }
}

/* NOTICIAS */

.noticias {
    background: #eef3fa;
}

.noticia {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: 0.3s;
}

.noticia:hover {
    transform: translateY(-5px);
}

.noticia a {
    display: inline-block;
    margin-top: 10px;
    color: #1e6acb;
    font-weight: 600;
    text-decoration: none;
}

/* FOOTER */

footer {
    background: #0b2a4a;
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 40px;
}

/* RESPONSIVE TABLET */

@media(max-width:900px) {

    header {
        padding: 20px;
    }

    section {
        padding: 60px 30px;
    }

    .hero h2 {
        font-size: 36px;
    }

}

/* RESPONSIVE MOVIL */

@media(max-width:700px) {

    .menu-toggle {
        display: block;
    }

    nav {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #0b2a4a;
        display: none;
    }

    nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
    }

    nav.active {
        display: block;
    }

    .hero {
        height: 320px;
    }

    .hero h2 {
        font-size: 28px;
    }

    .numero {
        font-size: 50px;
    }

}