.header{
    background: linear-gradient(to top, #3b709f97, #3b709f97), url("https://static.igem.wiki/teams/5311/header-videos/safety.webp") no-repeat center/cover;
    background-size: cover;
}

#image-container {
    width: 434px;
    height: 580px;
    overflow: hidden;
    position: relative;
    margin: auto;
    border-radius: 20px;
    margin-left: 20px; /* Add left margin */
    margin-bottom: 20px; /* Add bottom margin for mobile */
}

#image-container img {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 100%;
    transition: left 1s, opacity 1s;
    object-fit: cover;
    z-index: 1;
    border-radius: 10px;

}
#image-container img.active {
    left: 0;
    z-index: 2;
}
#image-container img.previous {
    left: -100%;
    z-index: 1;
}

h3{
    margin-top: 15px;
    
}

.notebook h3{
    margin-top: 0;
}

.footer { /* Propiedades de la transparencia */
    background-color: #5c8eb0;
    top: 50%; /* Centrar verticalmente */
    left: 50%; /* Centrar horizontalmente */
    transform: translate(-50%, -50%);
    opacity: 0; /* esta condicion mantiene el texto oculto */
    position: absolute;
    padding: 20px; /* espacio entre texto y bordes */
    transition: opacity .5s;
    text-align: justify; /* texto justificado */
    font-size: small; /* tamaño de letra */
    color:#ffffff; /* color de texto */
    width: 100%; /* ancho */
    height: auto; /* alto */
    /* centrar verticalmente el contenido */
    align-content: center;
    z-index: 4;
    font-style: italic;
    
  }
  @media (max-width: 900px) { 
    .footer {
        display: none; 
    }
}


#image-container:hover .footer { /* Efecto al pasar el mouse */
    opacity: 0.8;
    transition: opacity .5s;
  }

.image-info {
    position: absolute;
    bottom: 2px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.5);
    padding: 10px 15px;
    margin-bottom: 10px;
    color: #15222b;
    box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 40;
    text-align: center;
    font-style: italic;
    font-weight: bold;
    opacity: 1;
    transition: opacity .5s;
    border-radius: 10px;
  }

  #image-container:hover .image-info {
    opacity: 0;
    transition: opacity .5s;
  }

.tabs{
    display: flex;
    gap: 15px;
    padding-left: 0px;
    width: 100%
}

.tabs button{
    background-color: #efebdf;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border: none;
    font-weight: bold;
    padding: 15px;
    position: relative;
    z-index: 0;
}



.tabs button.active,
.tabs button:hover{
    background-color: #3b719f;
    color: #efebdf;
    z-index: 1;
}

.tabs button:after,.tabs button:before {
    bottom: 0;
    content: "";
    display: block;
    height: 10px;
    position: absolute;
    width: 10px
}

.tabs button:before {
    background: radial-gradient(circle at 0 0,transparent 10px, #efebdf 10px);
    left: -10px
}

.tabs button:after {
    background: radial-gradient(circle at 10px 0,transparent 10px, #efebdf 10px);
    right: -10px
}

.tabs button.active:before, 
.tabs button:hover:before{
    background: radial-gradient(circle at 0 0,transparent 10px, #3b719f 10px);
    left: -10px
}

.tabs button.active:after, 
.tabs button:hover:after{
    background: radial-gradient(circle at 10px 0,transparent 10px, #3b719f 10px);
    right: -10px
}

.tabs button:first-child:before,
.tabs button:first-child.active:before,
.tabs button:first-child:hover:before{
    background: none;
}

.tabs button:last-child:after,
.tabs button:last-child.active:after,
.tabs button:last-child:hover:after{
    background: none;
}

.notebook{
    margin-top: 20px;
}

.notebook-body{
    display: none;
    height: 600px;
    background-color: #3b719f;
    border-radius: 0 15px 15px 15px;
    padding: 20px 30px;
    width: 100%;
    color: #efebdf;
}

iframe{
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    overflow-clip-margin: content-box
}

ref{
    font-style: italic;
    font-size: small;

    vertical-align: super;
}

ref a{
    color: #3b719f;
    /* text-decoration: none; */
}

@media (max-width: 1024px) {
    #icon .tabs{
        justify-content: space-between;
    }
    
    #icon .notebook-body{
        border-top-right-radius: 0;
    }
    
    .notebook#icon .tabs button{
        font-size: 0.75em;
    }
    
}

@media (max-width: 720px) {
    /* Posar iconos */
}

@media (min-width: 768px) {
    #image-container {
        float: right;
        margin:0;
    }
}
@media (max-width: 768px) {
    #image-container {
        width: 250px; /* Adjust width for tablets */
        height: 340px; /* Adjust height for tablets */
    }
}

@media (max-width: 480px) {
    #image-container {
        width: 150px; /* Adjust width for mobile */
        height: 210px; /* Adjust height for mobile */
    }
}


.tabs button .icon {
    display: none;
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.tabs button .text {
    display: inline;
}

@media (max-width: 720px) {
    .tabs button .text {
        display: none;
    }
    
    .tabs button .icon {
        display: inline-block;
    }
    
    .tabs button {
        padding: 10px;
    }
    #icon .notebook-body {
        display: none;
        height: auto;
        background-color: #3b719f;
        border-radius: 0 0px 15px 15px;
        padding: 20px 30px;
        width: 100%;
        color: #efebdf;
    }
}

@media (min-width: 768px) {
    #image-container {
        float: right;
        margin: 0;
        margin-left: 20px; /* Keep left margin for larger screens */
    }
}

ref{
    font-style: italic;
    font-size: small;
  
    vertical-align: super;
  }
  
ref a{
    color: #3b719f;
    /* text-decoration: none; */
  }

/*Pop-up*/
.popup {
    position: relative;
    display: inline;
    cursor: pointer;
    padding-bottom: 2px;
    background-image: linear-gradient(to right, #eed894 50%, transparent 50%);
    background-size: 200% 8px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-position 0.3s ease-out;
}

.popup:hover {
    background-size: 200% 100%;
}

.popup .popup-content {
    visibility: hidden;
    width: 500px;
    min-width: none;
    background-color: #555;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 100%;
    margin-left: -250px;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: 
        "header header"
        "img text";
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index:10;
}

.popup:hover .popup-content {
    visibility: visible;
    opacity: 1;
}

.popup-content .popup-text {
    grid-area: text;
    padding-left: 10px;
}

.popup-content .popup-img {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-area: img;
}

.popup-content img {
    height: auto;
    width: 100px;
}

.popup-content .popup-header {
    font-size: 1.17em;
    font-weight: bold;
    display: block;
    grid-area: header;
    text-align: center;
}

.popup .popup-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

@media (max-width: 900px) { 
    .popup {
        background-image: none; 
    }
    .popup .popup-content {
        display: none;
    }
}

.notebook-body .special-bold {
    font-weight: 700; 
    color:#ffffff;
}