* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #F5C842;        /* Amarillo del pato */
    --color-secondary: #8B5A8E;      /* Morado del microscopio */
    --color-tertiary: #C16B9A;       /* Rosa del microscopio */
    --color-dark: #3D2645;           /* Morado oscuro */
    --color-light: #F5EFE7;          /* Beige del fondo */
    --gradient-primary: linear-gradient(135deg, #F5C842 0%, #FFD666 100%);
    --gradient-secondary: linear-gradient(135deg, #8B5A8E 0%, #C16B9A 100%);
}

/* Evitar scroll horizontal en móvil */
html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', sans-serif;
    line-height: 1.6;
    color: var(--color-dark);
    background: var(--color-light);
    min-height: 100vh;
    position: relative;
}

header {
    background: var(--gradient-secondary);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(61, 38, 69, 0.3);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-uach {
    height: 65px;  
    width: auto;
}

.logo-dd {
    height: 45px; 
    width: auto;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.admin-link {
    color: var(--color-light);
    opacity: 0.4;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1;
    transition: opacity 0.3s;
}

.admin-link:hover {
    opacity: 1;
}

/* ===== Pills de navegación (Catálogo / Prácticos) ===== */
.nav-pill-wrap {
    position: relative;
}

.nav-pill {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 2.2rem;
    background: var(--gradient-primary);
    color: var(--color-dark);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1;
    text-decoration: none;
    padding: 0 1.1rem;
    margin: 0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(245, 200, 66, 0.3);
    transition: all 0.25s ease;
}

.nav-pill-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.nav-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(245, 200, 66, 0.4);
}

.nav-pill.active {
    background: var(--color-primary);
}

.pill-caret {
    font-size: 0.65rem;
    transition: transform 0.25s ease;
}

.nav-pill.active .pill-caret {
    transform: rotate(180deg);
}

.practicos-pill-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 35px rgba(61, 38, 69, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    z-index: 999;
    overflow: hidden;
    min-width: 260px;
}

.practicos-pill-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.practicos-pill-dropdown-content {
    padding: 0.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.practico-pill-item-all {
    display: block;
    background: var(--gradient-primary);
    color: var(--color-dark);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.4rem;
}

.practico-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1rem;
    text-decoration: none;
    color: var(--color-dark);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.practico-item:hover {
    background: var(--gradient-primary);
}

.practico-num {
    background: var(--gradient-secondary);
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    min-width: 32px;
    text-align: center;
}

.practico-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-links a {
    color: var(--color-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    font-size: 0.85rem;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2.5px;
    background: var(--color-primary);
    transition: all 0.3s ease;
    border-radius: 3px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: var(--color-dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 200, 66, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 200, 66, 0.4);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 90, 142, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(139, 90, 142, 0.4);
}

footer {
    background: var(--gradient-secondary);
    color: white;
    padding: 2rem 1rem;
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

footer .footer-text {
    text-align: center;
    flex: 1;
}

footer p {
    margin: 0.2rem 0;
}

/* Responsive - Base */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 70%;
        max-width: 300px;
        background: var(--gradient-secondary);
        flex-direction: column;
        padding: 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        height: calc(100vh - 70px);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-right {
        gap: 0.5rem;
    }

    .nav-pill {
        padding: 0.4rem 0.7rem;
        font-size: 0.72rem;
    }

    .practicos-pill-dropdown {
        right: -1rem;
        min-width: 240px;
    }
}

@media (max-width: 480px) {
    .nav-pill span.pill-label {
        display: none;
    }
}
