* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0f111a;
    color: #f1f1f1;
    line-height: 1.7;
    padding: 40px 20px;
    padding-top: 70px;
}

.container {
    max-width: 900px;
    margin: auto;
    background: #1b1e2e;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.15);
    transition: all 0.3s ease;
}

h1, h2 {
    color: #00ffff;
    border-bottom: 1px solid #00ffff33;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

p {
    margin-bottom: 20px;
    text-align: justify;
    color: #e0e0e0;
}

a {
    color: #00ffff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    display: block;
    margin: 25px auto;
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

button.toggle-btn {
    padding: 10px 20px;
    background-color: #00ffff;
    color: #0f111a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

button.toggle-btn:hover {
    background-color: #00cccc;
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #1b1e2e;
    border-bottom: 2px solid #00ffff44;
    padding: 10px 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.navbar .logo {
    color: #00ffff;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
}

.navbar ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.navbar li a {
    color: #00ffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s;
}

.navbar li a:hover {
    color: #00cccc;
}

.nav-toggle {
    display: none;
    font-size: 28px;
    color: #00ffff;
    background: none;
    border: none;
    cursor: pointer;
}

/* --- RESPONSIVE NAVBAR --- */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: #1b1e2e;
        display: none;
        padding: 20px 0;
        border-top: 1px solid #00ffff33;
    }

    .navbar ul.show {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }
}

/* --- OTROS ELEMENTOS --- */
.references {
    margin-top: 15px;
    background-color: #2b2f42;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #00ffffaa;
}

.references ul {
    list-style-type: none;
}

.references li {
    margin-bottom: 10px;
}

.references a {
    color: #80ffff;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }

    .container {
        padding: 20px;
        max-width: 100%;
        border-radius: 10px;
        box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    p {
        font-size: 1rem;
    }

    .navbar li a {
        font-size: 18px;
        padding: 8px 0;
        text-align: center;
    }
}

@media (max-width: 400px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    p {
        font-size: 0.9rem;
    }

    .navbar li a {
        font-size: 16px;
        padding: 6px 0;
    }
}

/* --- IMÁGENES CON TRANSICIÓN --- */
.image-container {
  position: relative;
  width: 100%;
  max-width: 600px; /* Igual que img general */
  height: auto;
  aspect-ratio: 3 / 2; /* Para mantener proporción 600x400 aprox */
  margin: 25px auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  transition: opacity 0.4s ease-in-out;
  display: block;
}

.image-container img.img-hover {
  opacity: 0;
}

.image-container:hover img.img-hover {
  opacity: 1;
}

.image-container:hover img.img-default {
  opacity: 0;
}
