* {
    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: 400px;
    background: 
        url("../img/hero.jpg");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h2 {
    color: #e6c15a; /* dorado militar */
    font-size: 36px;
    max-width: 800px;
    font-weight: 600;
}

.hero h2 {
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* 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;
    }

}

.logo {
    display: flex;
    align-items: center;
    gap: 10px; /* espacio entre imagen y texto */
}

.logo img {
    width: 40px;  /* ajusta tamaño */
    height: 40px;
    object-fit: contain;
}


/* CONTENEDOR */
.contenedor-logros {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}


/* CARD */
.card-logro {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

/* IMAGEN */
.img-logro {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* TEXTO */
.card-logro h4 {
    margin: 10px 0;
}

.fecha {
    font-size: 0.9em;
    color: gray;
}

.descripcion {
    font-size: 0.95em;
}

#galeria {
    padding: 40px 20px;
    text-align: center;
}

.contenedor-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.item-galeria {
    overflow: hidden;
    border-radius: 8px;
}

.img-galeria {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* efecto hover */
.img-galeria:hover {
    transform: scale(1.05);
}

.titulo {
    margin-top: 5px;
    font-size: 0.9em;
}


/* Sección de Trámites Públicos */
.tramites-publicos {
    padding: 60px 20px;
    background-color: #f9f9f9;
    text-align: center;
}
.tramites-publicos h2 {
    margin-bottom: 40px;
    font-size: 2rem;
    color: #333;
}
.tramites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.card-tramite {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.card-tramite:hover {
    transform: translateY(-5px);
}
.icono-tramite {
    font-size: 3rem;
    margin-bottom: 15px;
}
.card-tramite h3 {
    margin-bottom: 15px;
    color: #111;
}
.card-tramite p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}
.btn-tramite {
    display: inline-block;
    padding: 12px 25px;
    background-color: #002855; /* Cambialo por el color azul/principal de tu web */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background 0.3s ease;
}
.btn-tramite:hover {
    background-color: #001f42;
}