body {
    margin: 0;
    padding: 0;
    font-family: Montserrat;
}

main {
    display: flex;
    flex-wrap: wrap;
}

.header-top {
    position: fixed;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    color: white;
    padding: 8px 20px;
    font-size: 0.9em;
    width: 100%;
    box-sizing: border-box;
    z-index: 1001;
}

.header-top img {
    width: 18px;
    height: 18px;
    filter: invert();
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-info span {
    display: flex;
    align-items: center;
}

.contact-info a {
    color: white;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.social-media {
    display: flex;
    gap: 15px;
}

.social-media a img {
    width: 18px;
    height: 18px;
    filter: invert();
    transition: transform 0.2s;
}

.social-media a:hover img {
    transform: scale(1.2);
}

nav {
    position: fixed;
    top: 30px;
    left: 0;
    width: 100%;
    height: 90px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    position: relative;
    margin: 0 15px;
}

nav ul li div {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1;
    top: 100%;
    left: 0;
    padding: 10px 0;
    border-radius: 4px;
}

nav ul li:last-child div,
nav ul li div:nth-last-child(2) {
    right: 0;
    left: auto;
    transform: none;
}

nav ul li:hover div {
    display: block;
}

nav ul li div ul {
    display: block;
    padding: 0;
    margin: 0;
}

nav ul li div ul li {
    margin: 0;
    width: 100%;
}

nav ul li div ul li a {
    color: #333;
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

nav ul li div ul li a:hover {
    background-color: #f0f0f0;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #007bff;
}

.logo img {
    width: 160px;
    height: auto;
    object-fit: cover;
}

.hero-section {
    width: 100%;
}

.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    width: 100%;
}

.hero video {
    width: 100vw;
    height: 100%;
    object-fit: cover;

}

.hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
}

.hero-text img {
    width: auto;
    height: 90px;
    object-fit: cover;
}

.hero-text h1 {
    font-size: 7em;
    margin: 0;
    text-shadow: #000000b6 1px 1px 15px;
}

.hero-text p {
    font-size: 1.5em;
    text-shadow: #000000b6 1px 1px 15px;
}

.acceso-tematico-section {
    width: 100%;
}

.acceso-tematico {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    background-color: #f9f9f9;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    width: 100%;
    box-sizing: border-box;
}

.acceso-tematico::-webkit-scrollbar {
    display: none;
}

.acceso-tematico h2 {
    width: 200px;
    text-align: center;
    font-size: 1.5em;
    padding: 10px;
    position: relative;
    color: #333;
}

.acceso-tematico a {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    color: #333;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 5px;
    text-align: center;
    width: auto;
    height: 130px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    aspect-ratio: 1/1;
}

.acceso-tematico a:hover {
    transform: translateY(-3px);
    box-shadow: 4px 4px 8px rgba(19, 152, 214, 0.582);
}

.acceso-tematico img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-top: 10px;
    margin-bottom: 15px;
}

.acceso-tematico span {
    font-size: 0.9em;
    font-weight: 500;
}

.main-content {
    display: flex;
    width: 100vw;
    align-content: flex-start;
    margin-left: 15vw;
    margin-right: 15vw;
}

.sidebar {
    position: flex;
    width: 200px;
    padding: 20px;
    height: 100%;
    flex-shrink: 0;
    top: 20px;
}

.sidebar h2 {
    padding: 10px;
    font-size: 1.4em;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.sidebar a {
    display: block;
    color: #333;
    text-decoration: none;
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

.sidebar img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    filter: brightness(0.6);
    border-radius: 5px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.sidebar a:hover img {
    transform: scale(1.2);
    filter: brightness(0.4);
}

.sidebar a span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgb(223, 218, 218);
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
    width: 90%;
    transition: transform 0.3s ease;
}

.sidebar a:hover span {
    transform: translate(-50%, -50%) scale(1.1);
}

.noticias {
    flex-grow: 1;
    display: flex;
    margin-top: 30px;
    flex-direction: column;
}

.comunicados {
    padding: 20px;
}

.comunicados a,
.alertas-sede a {
    display: flex;
    flex-direction: row;
    text-decoration: none;
    align-items: center;
    color: #333;
    background-color: #f0f0f0;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s, transform 0.2s;
}

.comunicados a:hover,
.alertas-sede a:hover {
    background-color: #cacaca;
}

.comunicados img {
    width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.comunicados h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 20px;
}

.comunicados span {
    display: block;
    font-size: 1.5em;
    color: #555;
    margin-bottom: 5px;
    margin-left: 15px;
}

.comunicados span:first-of-type {
    font-weight: bold;
    color: #000;
}

.comunicados span:last-of-type {
    font-size: 1.3em;
}

@media screen and (max-width: 1200px) {
    .comunicados a {
        flex-direction: column;
    }

    .comunicados img {
        width: 100%;
        height: auto;
        margin-bottom: 15px;
    }

    .comunicados .contenido {
        width: 100%;
    }

    .comunicados span {
        margin-left: 0;
    }

}

.alertas-sede {
    padding: 20px;
}

.alertas-sede h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 20px;
}

.alertas-sede table {
    width: 100%;
    border-collapse: collapse;
}

.alertas-sede th {
    font-weight: bold;
    padding: 10px;
    font-size: 1.2em;
    border-bottom: 1px solid #ddd;
}

.alertas-sede td a {
    font-weight: bold;
}

.alertas-sede td {
    padding: 10px;
    text-align: left;
    font-size: 1.2em;
    border-bottom: 1px solid #ddd;
    width: 75%;
}

.alertas-sede td:last-of-type {
    text-align: center;
    font-size: large;
}

.alertas-sede p {
    color: #333;
    margin-bottom: 10px;
}

.boe-cantabria {
    padding: 20px;
}

.boe-cantabria a {
    color: #007bff;
    text-decoration: none;
}

.boe-cantabria ul {
    list-style: none;
    padding: 0;
}

.boe-cantabria span {
    display: block;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 20px;
    text-align: center;
    color: #000;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #f9f9f9;
}

.boe-cantabria table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: fixed;
}

.boe-cantabria table th,
.boe-cantabria table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.boe-cantabria table th {
    background-color: #f0f0f0;
    font-weight: bold;
}

.boe-cantabria table th:nth-child(1) {
    width: 15%;
}

.boe-cantabria table th:nth-child(2) {
    width: 65%;
}

.boe-cantabria table th:nth-child(3) {
    width: 20%;
}

.boe-cantabria table td {
    font-size: 1.2em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.boe-cantabria table td:nth-child(1) {
    text-align: center;
}

.boe-cantabria table td a {
    color: #007bff;
    text-decoration: none;
}

footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0 0 0;
    width: 100%;
    overflow-x: hidden;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links,
.footer-contact,
.footer-social {
    flex: 1;
    margin-bottom: 30px;
    min-width: 250px;
    padding: 0 15px;
}

.footer-links h3,
.footer-contact h3,
.footer-social h3 {
    font-size: 1.2em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #555;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-contact a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-contact p {
    margin-bottom: 10px;
    font-size: 0.9em;
}

.footer-social a {
    display: inline-block;
    margin-right: 15px;
}

.footer-social img {
    width: 24px;
    height: 24px;
    filter: invert(1);
    transition: transform 0.2s;
}

.footer-social a:hover img {
    transform: scale(1.2);
}

.footer-bottom {
    background-color: #222;
    padding: 15px 0;
    text-align: center;
    font-size: 0.8em;
}

.footer-bottom p {
    margin: 5px 0;
}

.footer-bottom a {
    color: #ddd;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.footer-map {
    width: 100%;
    margin-top: 20px;
    padding: 0;
    overflow: hidden;
    border-top: 1px solid #444;
}

.footer-map iframe {
    display: block;
    border: 0;
    width: 100%;
    height: 300px;
}