* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

h1, h2, h3 {
    margin-top: 0;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Top Bar (Barra Superior) --- */
.top-bar {
    background: #67266c;
    padding: 0.5rem 5%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.top-bar a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.3s;
}
.top-bar a:hover {
    opacity: 0.8;
}

.social-icons {
    display: flex;
    gap: 0.8rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background 0.3s;
}
.social-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Header */
header {
    background: #510488;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position:fixed;
    padding-top: 3%;
    z-index: 999;
    width: 100%;
}
.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-container img {
    height: 80px;
    width: auto;
}
.logo-text {
     color: white;
}

.logo-text h1 {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
}
.logo-text .subtitle {
            font-size: 1.1rem;
            font-style: italic;
            font-weight: 300;
        }
        .logo-text .tagline {
            font-size: 0.75rem;
            margin-top: 0.2rem;
            opacity: 0.9;
        }
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}
nav {
            display: flex;
            gap: 2rem;
            position: relative;
        }

nav a {
            color: white;
            text-decoration: none;
            font-weight: 500;
            font-size: 1rem;
            padding: 0.5rem 0;
            transition: opacity 0.3s;
            position: relative;
        }

nav a:hover {
            opacity: 0.8;
        }
        nav a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background: #fbbf24;
            transition: width 0.3s;
        }
        
        nav a:hover::after {
            width: 100%;
        }
        .dropbtn {
            color: white;
            padding: 10px 15px;
            font-weight: 600;
            margin-left: 5px;
            transition: background-color 0.3s ease;
            text-decoration: none;
            background-color: transparent; /* Para el botón */
            border: none; /* Para el botón */
            cursor: pointer; /* Para el botón */
            font-family: inherit;
            font-size: inherit;
        }

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    padding: 10px 15px; 
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #8227d8;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 10;
    display: none; 
    border-radius: 0 0 5px 5px;
}

.dropdown-content a {
    color:ffffff; /* Color del texto */
    padding: 12px 16px;
    text-decoration: none;
    display: block; /* Ocupa todo el ancho */
    text-align: left;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* --- Sección HERO (Cabecera de Talleres) --- */
.hero-talleres {
    position: relative;
    height: 500px; /* Ajusta la altura según necesites */
    background: url('image_467adf.jpg') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.hero-overlay {
    background-color: rgba(0, 0, 0, 0.4); /* Oscurece la imagen ligeramente */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-talleres h1 {
    font-size: 4rem;
    margin: 0;
    letter-spacing: 5px;
}


/* --- Contenido de Talleres (Bloques) --- */
.content-block {
    display: flex;
    align-items: stretch; /* Asegura que ambos lados tengan la misma altura */
    min-height: 400px; /* Altura mínima para cada bloque */
}

.image-container, .text-container {
    width: 50%;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.image-container img {
    width: 100%;
    height: 100%;
    /* Estilo para que la imagen cubra el espacio sin estirarse */
    object-fit: cover; 
    display: block;
}

/* Invertir orden para la estructura Texto / Imagen */
.reverse-order {
    flex-direction: row-reverse;
}

/* Alineación de texto en los contenedores */
.align-right {
    text-align: right;
}

.align-left {
    text-align: left;
}

/* Títulos subrayados y colores */
.title-underline {
    position: relative;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

.title-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    height: 3px;
    width: 50px; /* Longitud de la línea */
}

/* Colores de Fondo de los Bloques */

/* Azul Oscuro (Música / Genios) */
.blue-bg {
    background-color: #0d47a1;
    color: white;
}
.blue-bg .title-underline::after {
    background-color: white;
    right: 0; /* Subrayado a la derecha para el texto alineado a la derecha */
}

/* Naranja (Deportivos / Robótica) */
.orange-bg {
    background-color: #f57f17;
    color: white;
}
.orange-bg .title-underline::after {
    background-color: white;
    left: 0; /* Subrayado a la izquierda para el texto alineado a la izquierda */
}

/* Verde (Informática) */
.green-bg {
    background-color: #00897b;
    color: white;
}
.green-bg .title-underline::after {
    background-color: white;
    right: 0;
}

/* Azul más oscuro (Genios) */
.darkblue-bg {
    background-color: #1976d2; /* Un azul intermedio si necesitas diferencia */
    color: white;
}
.darkblue-bg .title-underline::after {
    background-color: white;
    right: 0;
}

/* Morado (Apoyo Escolar) */
.purple-bg {
    background-color: #5e35b1;
    color: white;
}
.purple-bg .title-underline::after {
    background-color: white;
    left: 0;
}

/* --- Media Queries (Para hacerlo Responsivo en Móviles) --- */
@media (max-width: 768px) {
    
    body {
        padding-top: 150px; /* Más espacio para la barra superior y navegación */
    }

    /* Top bar responsive */
    .top-bar {
        padding: 0.4rem 3%;
        font-size: 0.75rem;
        gap: 0.8rem;
        top: 0;
    }
    
    .top-bar a {
        font-size: 0.75rem;
    }
    
    /* Header móvil */
    header {
        padding: 0.8rem 3%;
        flex-wrap: wrap;
        top: 38px;
    }
    
    /* Logo más pequeño en móvil */
    .logo-container {
        flex: 1;
        gap: 0.5rem;
    }
    
    .logo-container img {
        height: 50px;
    }
    
    .logo-text h1 {
        font-size: 1rem;
    }
    
    .logo-text .tagline {
        font-size: 0.65rem;
    }
    
    /* Mostrar botón hamburguesa en móvil */
    .menu-toggle {
        display: block;
        order: 3;
    }
    
    /* Menú de navegación en móvil */
    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: #510488;
        order: 4;
        padding: 1rem 0;
        margin-top: 0.5rem;
    }
    
    nav.active {
        display: flex;
    }
    
    nav a {
        padding: 0.8rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    /* Dropdowns en móvil */
    .dropdown {
        width: 100%;
    }
    
    .dropbtn {
        width: 100%;
        text-align: left;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        background-color: #6a1b9a;
        border-radius: 0;
    }
    
    .dropdown-content a {
        padding-left: 2rem;
    }
    
    /* Contenido de Talleres: Stack verticalmente */
    .content-block {
        flex-direction: column;
    }
    
    .content-block.reverse-order {
        flex-direction: column; /* También se apila verticalmente */
    }

    .image-container, .text-container {
        width: 100%;
        padding: 20px;
    }
    
    .hero-talleres {
        height: 300px; /* Reducir altura del hero en móvil */
    }

    .hero-talleres h1 {
        font-size: 2.5rem;
    }
    
    /* Ajustar subrayado en móvil (siempre centrado o alineado al texto) */
    .title-underline::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .align-right, .align-left {
        text-align: center;
    }
}