/* Ajuste del logo en la barra de navegación */
.logo {
    margin-right: auto;
}

.logo img {
    height: 120px;
    width: auto;
    display: block;
}

/* Estilo inicial de la barra de navegación con la imagen de fondo */
.navbar {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../img/hex.jpg') no-repeat center center;
    background-size: cover;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 80px;
    height: 140px;
    transition: all 0.3s ease;
}

/* Clase que se aplicará al hacer scroll */
.navbar.scrolled {
    background-color: white !important;
    height: 120px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background-image: none !important;
}

.navbar.scrolled ul li a {
    color: #333;
}

.navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 50px;
}

.navbar ul li {
    display: inline;
}

.navbar ul li a {
    color: #000;
    text-decoration: none;
    font-size: 1.5rem;
    padding: 15px 20px;
    position: relative;
    transition: color 0.3s ease;
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background-color: #b30303;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.navbar ul li a:hover::after {
    transform: scaleX(1);
}

.navbar ul li a:hover {
    color: #b30303;
}

.navbar img {
    height: 120px;
    transition: all 0.3s ease;
}

.navbar.scrolled img {
    height: 120px;
}

.navbar .icon:hover {
    color: #b30303;
}

.navbar .menu-icons img {
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

/* Menú de íconos */
.menu-icons {
    align-items: center;
    gap: 15px;
}

.navbar.scrolled .menu-icons img {
    width: 40px;
    height: 40px;
}

/* Botón de hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    margin-left: auto;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #000;
}

/* Mobile and Tablet Styles */
@media (max-width: 1024px) {
  .navbar {
    background: none !important;
    box-shadow: none !important;
    padding: 15px 20px;
    position: absolute;
    height: auto;
  }

  .logo {
    position: fixed; /* Changed from absolute to fixed */
    left: 70%;
    transform: translateX(-50%);
    margin: 0;
    top: 15px; /* Added fixed distance from top */
    z-index: 1200; /* Ensure logo stays above menu */
  }

  .navbar ul {
    display: none;
    flex-direction: column;
    position: fixed;
    gap: 13px;
    top: 0;
    right: 0;
    height: 100%;
    width: 60%;
    background-color: rgba(235, 235, 235, 0.9);
    padding-top: 140px;
    padding-left: 20px;
    padding-right: 20px;
    overflow: hidden;
    transition: transform 0.4s ease-in-out;
  }

  .navbar ul.active {
    display: flex;
  }

  .navbar ul li {
    text-align: center;
    padding: 20px 0;
  }

  .navbar ul li:last-child {
    border-bottom: none;
  }

  .navbar ul li a {
    color: #000000 !important;
    text-decoration: none;
    font-size: 2.2rem;
    transition: color 0.3s ease;
    display: block;
  }

  .navbar ul a:hover {
    color: #b30303 !important;
  }

  .hamburger {
    display: flex;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1100;
  }

  .menu-icons {
    display: flex;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
  }

  .navbar .menu-icons img {
    width: 35px;
    height: 35px;
    transition: all 0.3s ease;
  }

  .navbar.scrolled .menu-icons img {
    width: 35px;
    height: 35px;
  }
    
  .navbar img {
    height: 120px;
    transition: all 0.3s ease;
  }

  .navbar.scrolled img {
    height: 120px;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .navbar {
        background: none !important;
        box-shadow: none;
        padding: 15px 20px;
        position: absolute;
        height: auto;
    }
    
    
    .logo {
        position: fixed;
        left: 70%; /* Centrado horizontal */
        transform: translateX(-50%);
        margin: 0;
        top: 15px;
        z-index: 1200;
    }

    .navbar ul {
        display: none;
        flex-direction: column;
        position: fixed;
        gap: 2.5px;
        top: 0;
        right: 0;
        height: 100%;
        width: 60%; /* Menú a pantalla completa en móvil */
        background-color: rgba(235, 235, 235, 0.9);
        padding-top: 100px; /* Aumentado para dar espacio al logo */
        padding-left: 20px;
        padding-right: 20px;
        overflow: hidden;
        transition: transform 0.4s ease-in-out;
    }

    .navbar ul.active {
        display: flex;
    }

    .navbar ul li {
        text-align: center;
        padding: 15px 0;
    }

    .navbar ul li:last-child {
        border-bottom: none;
    }

    .navbar ul li a {
        color: #000000 !important;
        text-decoration: none;
        font-size: 1.8rem;
        transition: color 0.3s ease;
    }

    .navbar ul a:hover {
        color: #b30303 !important;
    }

    .hamburger {
        display: flex;
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 1100;
    }

    .menu-icons {
        display: flex;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1100;
    }

    .navbar .menu-icons img {
        width: 35px;
        height: 35px;
        transition: all 0.3s ease;
    }

    .navbar.scrolled .menu-icons img {
        width: 35px;
        height: 35px;
    }
        
    .navbar img {
        height: 120px;
        transition: all 0.3s ease;
    }

    .navbar.scrolled img {
        height: 120px;
    }
}

/* Desktop Styles */
@media (min-width: 1025px) {
    .navbar {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 40px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../img/hex.jpg') no-repeat center center;
        background-size: cover;
    }

    .logo {
        position: absolute;
        left: 40px;
    }

    .navbar ul {
        display: flex;
        gap: 20px;
        justify-content: center;
        margin: 0 auto;
    }

    .menu-icons {
        display: flex;
        align-items: center;
        gap: 15px;
        position: absolute;
        right: 40px;
        top: 50%;
        transform: translateY(-50%);
    }

    .menu-icons img {
        width: 20px;
        height: 20px;
    }
    
    .hamburger {
        display: none;
    }
}
/* Ocultar Facebook solo en móviles */
@media (max-width: 768px) {
    .menu-icons a[href="#"] {
        display: none !important;
    }
}