/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

@font-face {
    font-family: VeraBd;
    src: url('assets/VeraBd.ttf');
}
@font-face {
    font-family: Vera;
    src: url('assets/Vera.ttf');
}

body {
    margin: 0;
    font-family: Vera, sans-serif;
    overflow-x: hidden;
    display: block;
}

footer p {
    margin-left:2%;
}

.nav-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background-color: rgba(255, 255, 255, 0.8); /* Fondo transparente */
    width: 80%;
    z-index: 10;
    font-size: small;
    height: 4rem;
}

/* Barra de navegación */
.nav {
    font-family: Vera, sans-serif;
    display: flex;
    background-color: #0052CC; /* Fondo transparente */
    width: 80%;
}

/* Elementos individuales del menú */
.nav-item {
    flex: 1;
    text-align: center;
    padding: 1.5rem; /* Ampliado el padding */
    cursor: pointer;
    font-weight: bold;
    color: #ffffff;
    border-bottom: 3px solid transparent;
    text-decoration: none; /* Quitar subrayado */
    transition: color 0.3s ease, border-color 0.3s ease;
}

/* Estilo para el elemento activo */
.nav-item.active {
    color: #eeeeee;
    border-bottom: 3px solid #cccccc;
}

/* Efecto hover */
.nav-item:hover {
    color: #007bff;
}

section {
    position: relative;
    width: 80%;
    height: 90%;
    margin-top:2%;
    margin-bottom:2%;
    margin-left:2%;
    margin-right:2%;
    display: flex;
    flex-direction: column;
    justify-content: left;
    align-items: left;
    padding: 20px;
    text-align: justify;
}

div {
    text-align: justify;
    text-justify: inter-word;
}

h1 {
    font-family: VeraBd;
    font-size: 4rem;
    margin-bottom: 1rem;
    margin-right: 2rem;
}

h2 {
    font-family: VeraBd;
    font-size: 2rem;
    margin-bottom: 2rem;
    margin-right: 20rem;
    color: #0e49a2;
}

b {
    font-family: VeraBd;
    color: #222222;
}


p {
    font-family: Vera;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-align: justify;
    align-items:left;
    justify-content:left;
    line-height: 1.6;
}

p.highlight {
    font-family: VeraBd;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

p.side {
    font-family: Vera;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

ul {
    list-style-type: disc;
    padding-left: 2rem;
    text-align: left;
}

li {
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Section One Styles */
.section-one {
    background: #0052CC;
    color: #ffffff;
}

.section-one .image-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80%;
    height: 11rem;
}

.section-one .image-container img {
    width: 80%;
    height: 80%;
    object-fit: cover;
    background: #ffffff;
}


.section-two {
    background:#ffffff;
    color: #333;
}

.section-two h1,
.section-two p.highlight,
.section-two ul li {
    color: #333;
}

.section-three {
    background:#eeeeee;
    color: #333;
}

.section-three .image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    height: 6rem;
}

.section-three .image-container img {
    width: 80%;
    height: 80%;
    object-fit: cover;
}

/* Container adjustments */
.container {
    max-width: 65%;
    margin: 0 auto;
}

.video-container {
    position: relative;
    width: 50%; 
    height: 60%;
    overflow: hidden;
    border-radius: 1rem; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background: #fff;
    justify-content: space-between;
}

iframe {
    width: 80%;
    height: 80%;
    border: none;
    display: none; /* El iframe está oculto inicialmente */
}

.video-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%) scale(1.45); /* Ajusta el video al centro */
    border: none; /* Elimina los bordes del iframe */
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    transition: transform 0.3s ease;
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.video-container.active iframe {
    display: block; /* Muestra el iframe al hacer clic */
}

.video-container.active .play-button {
    display: none; /* Oculta el botón de play */
}

.content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 90%;
    width: 90%;
    margin-top: 2rem;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    gap: 20px;
}

.text-content {
    flex: 1;
    font-size: 18px;
    color: #333;
    line-height: 1.6;
    align-items: start;
}
.code-container {
    position: relative;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
  }
  .code-scrollable {
    max-height: 80%; /* Ajusta la altura máxima aquí */
    overflow-y: auto;
  }
  pre {
    margin: 0;
    font-family: Vera;
  }
  pre.code-block {
    white-space: pre-wrap;  /* Permite el salto de línea automático */
    word-wrap: break-word;  /* Ajusta palabras largas */
    margin: 0;
    padding: 0;
    font-family: Vera, monospace; /* Fuente monoespaciada */
    font-size: 14px; /* Tamaño de la fuente */
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: auto; /* Permite desplazamiento si el código es muy largo */
  }  

  .copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #333333;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .copy-button:hover {
    background: #666666;
  }
  .copy-confirmation {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(20px);
  }
  .copy-confirmation.show {
    opacity: 1;
    transform: translateY(0);
  }

  textarea {
    width: 80%;
    height: 200px;
    font-family: Vera, monospace;
    font-size: 16px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 20px;
    resize: vertical;
  }
  
  .run-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
  }
  
  .run-button:hover {
    background: #218838;
  }
  
  .terminal {
    background: #000;
    color: #00ff00;
    padding: 15px;
    border-radius: 5px;
    font-family: Vera, monospace;
    font-size: 16px;
    height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    margin-top: 20px;
  }

  .code-block, .output-container {
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    font-family: Vera, monospace;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow: auto;
  }

  .output-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
  }

  .result-item {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    font-family: Vera, monospace;
    font-size: 14px;
    width: 70%;
    align-items: center;
  }


  .section {
    background: #fff;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 50rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
}

.section-header:hover {
    background: #f0f0f0;
}

.section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.icon {
    font-size: 20px;
    font-weight: bold;
    color: #666;
}

.icon:hover {
    color: #000;
}

.section-content {
    padding: 15px;
    display: none;
    font-size: 16px;
    color: #333;
}

.section-content p {
    margin: 0 0 10px;
}

.section-content ul {
    margin: 10px 0 0;
    padding: 0 0 0 20px;
}

.section-content ul li {
    margin: 5px 0;
}

.tabs {
    font-family: Arial, sans-serif;
    display: flex;
    background-color: #f4f4f4;
    width: 80%;
}

.tabs-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background-color: #ffffff;
    border-bottom: 2px solid #ddd;
    width: 80%;
    max-width: 80%;
    z-index: 10;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 1rem;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    border-bottom: 3px solid transparent;
}

.tab.active {
    color: #007bff;
    border-bottom: 3px solid #007bff;
}

.content-container {
    margin-top: 5rem; /* Space for fixed tabs */
    padding: 1rem;
    background-color: #ffffff;
    width: 80%;
    height: 80%;
    max-width: 30rem;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.content {
    display: none;
    width: 80%;
    justify-content: left;
    animation: fadeIn 0.3s ease-in-out;
}

.content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.array-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px;
    gap: 10px;
  }

  .array-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background-color: #007BFF;
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
  }

  .array-item .index {
    position: absolute;
    top: -20px;
    font-size: 14px;
    color: #555;
  }

  .array-item .value {
    font-size: 24px;
    font-weight: bold;
  }

  .description {
    text-align: center;
    max-width: 600px;
    margin: 20px;
    font-size: 18px;
    color: #333;
  }

  #array-container {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.array-item.selected {
    background-color: coral;
}

button {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    background-color: #007BFF;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

.buttonLink {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    background-color: #007BFF;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.buttonLink:hover {
    background-color: #0056b3;
}


button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

input[type="text"] {
    width: 100px; /* Coincide con el ancho de los elementos del arreglo */
    height: 50px; /* Coincide con la altura del botón */
    padding: 10px;
    font-size: 16px; /* Tamaño del texto igual al de los botones */
    border: 1px solid #000;
    border-radius: 5px;
    box-sizing: border-box;
    text-align: center; /* Para centrar el texto dentro del input */
  }
  
  input[type="text"]:focus {
    outline: none;
    border-color: #007bff; /* Cambia el borde al enfocarse */
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
  }
  
  .info-box {
    display: flex;
    align-items: flex-start;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    max-width: 90%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .info-icon {
    font-size: 24px;
    color: #0079c1;
    margin-right: 12px;
    flex-shrink: 0;
  }
  
  .info-content {
    color: #333333;
    font-size: 16px;
    line-height: 1.5;
  }
  
  .info-content strong {
    font-weight: bold;
  }

  div .link{
    padding: 10px 20px; 
    background-color: #007BFF; 
    color: white; 
    text-decoration: none; 
    border-radius: 5px;
  }
.post-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

.post-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
    max-width: 15rem;
    text-align: left;
}

.post-card:hover {
    transform: scale(1.05);
}

.post-card h2 a {
    text-decoration: none;
    font-size: 1.4rem;
    color: #333;
}

.post-card p {
    font-size: 0.9em;
    color: #666;
}

.code-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.code-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

pre {
    position: relative;
    background: #282c34;
    color: #fff;
    padding: 12px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: "Courier New", monospace;
    width: 100%;
    box-sizing: border-box;
}

/* 🔥 Botón bien posicionado ENCIMA del código */
.copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10; /* Asegura que esté sobre el código */
    background: rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
}

/* 🔥 Efecto al pasar el mouse sobre el botón */
.copy-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

a {
  text-decoration: none;
}

/* 🔥 Estilos para código resaltado con Rouge */
pre, code {
    font-family: "Courier New", monospace;
    background-color: #282c34;
    color: #abb2bf;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    display: block;
}

/* 🔹 Resaltado de sintaxis */
.highlight .k, /* Palabras clave */
.highlight .kd, /* Modificadores */
.highlight .kn, /* Operadores */
.highlight .kt { color: #c678dd; } /* Morado */

.highlight .nc, /* Clases */
.highlight .nf { color: #61afef; } /* Azul */

.highlight .s,  /* Strings */
.highlight .sc { color: #98c379; } /* Verde */

.highlight .mi, /* Números */
.highlight .m { color: #d19a66; } /* Naranja */

.highlight .c,  /* Comentarios */
.highlight .cm { color: #5c6370; font-style: italic; } /* Gris */

.highlight .o, /* Operadores */
.highlight .p { color: #e06c75; } /* Rojo */

