/* Importar tipografía Halyard */
@font-face {
    font-family: "Halyard Display";
    src: url("https://db.onlinewebfonts.com/t/c4d8819fda4c3fd79e36cedcc8d422bb.eot");
    src: url("https://db.onlinewebfonts.com/t/c4d8819fda4c3fd79e36cedcc8d422bb.eot?#iefix") format("embedded-opentype"),
        url("https://db.onlinewebfonts.com/t/c4d8819fda4c3fd79e36cedcc8d422bb.woff2") format("woff2"),
        url("https://db.onlinewebfonts.com/t/c4d8819fda4c3fd79e36cedcc8d422bb.woff") format("woff"),
        url("https://db.onlinewebfonts.com/t/c4d8819fda4c3fd79e36cedcc8d422bb.ttf") format("truetype"),
        url("https://db.onlinewebfonts.com/t/c4d8819fda4c3fd79e36cedcc8d422bb.svg#Halyard Display") format("svg");
}
h2{
    color: white;
    text-align: center;
}
/* General Reset */
* {
    padding: 0;
    margin: 0;
    text-decoration: none;
    list-style: none;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: "Halyard Display";
    overflow-x: hidden;
    background-color: #363636;
}

/* Navbar */
nav {
    background: #363636 ;
    height: 80px;
    width: 100%;
    position: fixed;
    z-index: 999;
    opacity: 93%;
}

label.logo {
    color: white;
    font-size: 25px;
    line-height: 80px;
    padding: 0 100px;
    font-weight: bold;
}

nav ul {
    float: right;
    margin-right: 20px;
}

nav ul li {
    display: inline-block;
    line-height: 80px;
    margin: 0 5px;
}

nav ul li a {
    color: white;
    font-size: 17px;
    padding: 7px 13px;
    border-radius: 3px;
    text-transform: uppercase;
}

a.active,
a:hover {
    background: #1b9bff;
    transition: .5s;
}

.checkbtn {
    font-size: 22px;
    color: white;
    float: right;
    line-height: 80px;
    margin-right: 30px;
    cursor: pointer;
    display: none;
}

#check {
    display: none;
}

@media (max-width: 1050px) {
    
    label.logo {
        padding-left: 30px;
    }

    nav ul li a {
        font-size: 16px;
    }
}

/* Responsive media query code for small screen */
@media (max-width: 890px) {

    .checkbtn {
        display: block;
        z-index: 1000; /* Asegura que el botón de hamburguesa esté visible */
    }
    nav{
        height: 92px;
        opacity: 100% !important;
    }
    label.logo {
        font-size: 81px;
    }

    ul {
        position: fixed;
        width: 100%;
        height: 100vh;
        background: #2c3e50;
        top: 80px;
        left: -100%;
        text-align: center;
        transition: all .5s;
        z-index: 10000; /* Asegura que el menú esté por encima de otros elementos */
    }
    nav img{
       width: 16%;
    }
    nav ul li {
        display: block;
        margin: 50px 0;
        line-height: 30px;
    }

    nav ul li a {
        font-size: 20px;
        color: white; /* Ajuste para mejor visibilidad */
    }

    a:hover,
    a.active {
        background: none;
        color: #0082e6;
    }

    #check:checked~ul {
        left: 0;
        z-index: 999; /* Menú visible con la hamburguesa */
    }
    #check:checked~main{
        display: none;
    }
    #check:checked + .checkbtn + .logo + ul {
        display: block;
      }
      #check:not(:checked) ~ ul {
        left: -100%; /* Oculta el menú cuando el checkbox está desmarcado */
        transition: all 0.5s ease;
    }
    #check:checked ~ main {
        display: block;
    }
}


/* Landing Page */
.hero {
    text-align: center;
    padding: 80px;
    background-image: url(../assets/fondo.jpg);
    color: #fff;
    background-size: cover;
    /* Ajusta el tamaño */
    background-repeat: no-repeat;
    /* Evita que se repita */
    background-position: center;
    /* Centra la imagen */
}



.hero h1 {
    font-size: 64px;
    margin: 0;
}

.hero p {
    font-size: 24px;
    margin: 20px;
}


/* Sección Oficis */
.info-section.oficis {
    padding: 50px;
    text-align: center;
}

.oficis-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 20px;
    gap: 20px;
  }
  
  .ofici-card {
    background: #fff;
    padding: 20px;
    width: 250px; /* Tamaño por defecto */
    height: 300px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  
  .ofici-card img {
    max-width: 100px;
    height: auto;
    margin-bottom: 15px;
  }
  
  .ofici-card p {
    margin: 0;
    font-size: 16px;
    color: #333;
  }
  
  /* Ajuste para pantallas intermedias (713px - 768px) */
  @media (max-width: 768px) and (min-width: 713px) {
    .ofici-card {
      width: 48%; /* Reduce el tamaño a dos tarjetas por fila */
      height: auto;
    }
  }
  
  /* Ajuste general para pantallas medianas (menores de 768px) */
  @media (max-width: 712px) {
    .oficis-container {
      justify-content: center;
      gap: 15px; /* Espacio más pequeño entre las tarjetas */
    }
  
    .ofici-card {
      width: 45%; /* Dos tarjetas por fila */
      height: auto; /* Altura adaptable */
      padding: 15px;
    }
  }
  
  /* Ajuste para pantallas pequeñas (menos de 480px) */
  @media (max-width: 480px) {
    .ofici-card {
      width: 100%; /* Una tarjeta por fila */
      padding: 10px;
    }
  
    .ofici-card img {
      max-width: 80px; /* Imágenes más pequeñas */
    }
  
    .ofici-card p {
      font-size: 14px;
    }
  }
  

/* Hover effects */
.ofici-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px 5px rgba(255, 165, 0, 0.5);
}

/* Sección Característiques */
.info-section.caracteristiques {
    padding: 50px;
    text-align: center;
    z-index: 1;
}

/* Contenedor de las tarjetas */
.caracteristiques-content {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    z-index: 1;
}

/* Tarjetas individuales */
.info-card {
    background: #fff;
    padding: 30px;
    width: 250px;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-origin: center;
    font-weight: bold;
    text-align: center;
    color: #555;
    border: 1px solid #e0e0e0;
    animation: fadeInUp 0.8s ease-in-out;
    background: linear-gradient(135deg, #fff, #f9f9f9);
    overflow: hidden;
    position: relative;
}
.item {
    flex: 0 1 calc(33.333% - 20px); /* 3 elementos por fila, restando el espacio del gap */
    box-sizing: border-box; /* Para incluir el padding y border en el tamaño */
    background: #f0f0f0;
    padding: 10px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Footer */
.fleshy{
    display: flex;
}
footer {
    margin-top: auto;
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 15px 10px;
}

.footer-bottom p {
    font-size: 14px;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-bottom p {
        font-size: 12px;
    }
}
@media (min-width: 412px) {
    .item {
        flex: 0 1 calc(33.333% - 20px); /* 3 elementos por fila, restando el espacio del gap */
        box-sizing: border-box; /* Para incluir el padding y border en el tamaño */
        background: #f0f0f0;
        padding: 10px;
        text-align: center;
        border: 1px solid #ccc;
        border-radius: 5px;
    }
    .hero img{
        margin-top: 40px;
    }
}
@media (max-width: 320px) {
    footer {
        padding: 10px 5px;
    }

    .footer-bottom p {
        font-size: 12px;
        line-height: 1.2;
        word-wrap: break-word;
    }
    .hero img{
        margin-top: 40px;
    }
}

/* Additional Responsive Layout Fixes */

/* Fix for sections overlapping at small screen sizes */
@media (max-width: 768px) {
    section {
        padding-top: 100px;
        /* Ensures space above sections */
        padding-bottom: 100px;
        /* Prevents sections from touching each other */
    }

    /* Adjust the font size for the hero section */
    .hero h1 {
        font-size: 40px;
    }

    .hero p {
        font-size: 18px;
    }
    .hero img{
        margin-top: 40px;
        width: 100%;
    }
    .ofici-card,
    .info-card {
        width: 100%;
        /* Make cards take full width on mobile */
        height: auto;
        /* Adjust height for smaller screens */
    }

    /* Adjust the navbar items */
    nav ul li {
        font-size: 16px;
    }
    .imgOf{
        width: 80%;
    }
}

/* Prevent sections from overlapping */
@media (max-width: 480px) {
    .hero {
        padding: 50px;
    }
    .oficis-container,
    .caracteristiques-content {
        flex-direction: column;
    }
    .imgOf{
        width: 80%;
    }
}
/* buttons */
button {
    background-color: #4CAF50;
    /* Green */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #45a049;
    /* Darker Green */
    z-index: 2;
}

.whatsapp {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    z-index: 100;
}

.whatsapp-icon {
    margin-top: 13px;
}

 /* Estilos para el banner de cookies */
 #cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f9f9f9;
    border-top: 1px solid #ccc;
    padding: 15px;
    text-align: center;
    font-family: Arial, sans-serif;
    z-index: 1000;
}

#cookie-banner p {
    margin: 0;
    font-size: 14px;
}

#cookie-banner button {
    margin: 5px;
    padding: 8px 15px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    border-radius: 3px;
}

#cookie-banner .accept {
    background-color: #4caf50;
    color: white;
}

#cookie-banner .decline {
    background-color: #f44336;
    color: white;
}

#cookie-banner a {
    color: #007bff;
    text-decoration: none;
}

#cookie-banner a:hover {
    text-decoration: underline;
}
/* publications */
/* Estilos generales */
/* Sección Nueva */
.nueva-seccion {
    padding: 50px;
    text-align: center;
    background-color: #f1f1f1; /* Puedes cambiar el color */
}

.nueva-seccion h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 30px;
}

/* Contenedor para las tarjetas */
.contenido-nueva-seccion {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Estilo para cada tarjeta */
.card-nueva {
    background: #fff;
    padding: 20px;
    width: 250px; /* Tamaño por defecto */
    height: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-nueva img {
    max-width: 100px;
    height: auto;
    margin-bottom: 15px;
}

.card-nueva p {
    margin: 0;
    font-size: 16px;
    color: #333;
}

/* Ajustes para pantallas medianas y pequeñas */
@media (max-width: 768px) {
    .card-nueva {
        width: 48%; /* Ajusta el tamaño de las tarjetas */
    }
}

@media (max-width: 480px) {
    .card-nueva {
        width: 100%; /* Una tarjeta por fila en pantallas pequeñas */
    }
}
/* Estilos para la sección de publicaciones de Instagram */
.instagram-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Espacio entre las publicaciones */
    justify-content: center;
    margin: 20px 0;
  }
  
  .instagram-post {
    position: relative;
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .instagram-post:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  }
  
  .instagram-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
  }
  
  .info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo oscuro con opacidad */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .info-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #007bff; /* Color azul */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
    text-align: center;
  }
  
  /* Mostrar la superposición y el botón al pasar el cursor */
  .instagram-post:hover .info-overlay {
    opacity: 1;
    visibility: visible;
  }
  
  .instagram-post:hover .info-button {
    opacity: 1;
    visibility: visible;
  }
  
  /* Agrega un borde cuando el botón esté visible */
  .instagram-post:hover {
    border: 2px solid rgba(0, 0, 0, 0.2);
  }
  /* animacion titulo */
  /* Estilos iniciales */
.fade-in-text {
    opacity: 0;
    transform: translateY(20px); /* Desplazamiento inicial hacia abajo */
    animation: fadeIn 1.5s ease-out forwards; /* Duración y efecto de la animación */
  }
  
  /* Definición de la animación */
  @keyframes fadeIn {
    0% {
      opacity: 0;
      transform: translateY(20px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
 /* section caracteristiques */
 .course-details {
    background-color: #2c2f38;
    color: white;
    padding: 40px 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas en pantallas grandes */
    gap: 20px;
}

.card {
    background-color: #3c414b;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: hidden; /* Asegura que los bordes redondeados se apliquen en el interior */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3);
}

.card-icon {
    background-color: #0D519E;
    color: white;
    width: 3.5rem; /* Tamaño fijo en rem */
    height: 3.5rem; /* Mantener proporción cuadrada */
    border-radius: 50%; /* Forma circular */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    font-size: 1.5rem; /* Tamaño estándar del icono */
    flex-shrink: 0; /* Asegura que el icono no cambie de tamaño */
    overflow: hidden; /* Recorta cualquier cosa fuera del círculo */
}

.card-info p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: white;
}

/* Responsividad */
@media (max-width: 1024px) {
    .cards-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas para pantallas medianas */
    }

    .card-icon {
        width: 3rem; /* Ajustamos ligeramente el tamaño del círculo */
        height: 3rem; /* Mantenemos proporción */
        font-size: 1.3rem; /* Ajustamos el tamaño del icono */
    }
}

@media (max-width: 768px) {
    .cards-container {
        grid-template-columns: 1fr; /* 1 columna para pantallas pequeñas */
    }

    .card-icon {
        width: 2.8rem; /* Reducimos el tamaño del círculo */
        height: 2.8rem; /* Mantenemos proporción */
        font-size: 1.2rem; /* Ajustamos el tamaño del icono */
    }
}
/* section qui som */
.qui-som {
    position: relative;
    background:  linear-gradient(rgba(33, 33, 164, 0.471), rgba(33, 33, 164, 0.471)),
    url(../assets/Bombers.jpg);/* Ruta de la imatge que has penjat */
    background-size: cover;
    padding: 50px;
    color: white;
    text-align: center;
  }
  
  .qui-som::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Color negre amb opacitat al 50% */
    z-index: 1;
  }
  
  .qui-som .texto {
    position: relative;
    z-index: 2; /* Perquè el text estigui per sobre de l'opacitat */
    
  }

.qui-som .texto {
    margin: 20px;
}
h1{
    color: white;
}
.qui-som .texto h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 20px;
}

.qui-som .texto p {
    font-size: 1rem;
    line-height: 1.6;
    color: white;
}

.qui-som .imagen {
    margin: 20px;
    text-align: center;
}

.qui-som .imagen img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .qui-som {
        padding: 20px;
    }

    .qui-som .texto {
        text-align: center;
    }
}