:root {
    --primary: #2A3B47;
    --accent: #fa0202;
    --text: #333;
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

.itinerario {
    border-radius: 12px;
    overflow: hidden;
}

details {
    background: #fff;
    margin-bottom: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.6s var(--transition);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s var(--transition) forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

summary {
    padding: 1.5rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    position: relative;
}

summary:hover {
    background: #fafafa;
}

.day-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
}

.day-number {
    background: var(--accent);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.day-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.3s ease;
}

.elevation {
    background: var(--primary);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-left: 1rem;
    flex-shrink: 0;
    position: absolute;
    right: 10%;

}

.content {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.2, 0.7, 0.4, 1);
    opacity: 0;
    transform: translateY(-15px);
    will-change: transform, opacity;
}

details[open] .content {
    opacity: 1;
    transform: translateY(0);
    padding-bottom: 1.5rem;
    max-height: 800px;
    transition: 
        max-height 0.8s cubic-bezier(0.2, 0.5, 0.3, 1),
        opacity 0.6s ease-out 0.1s,
        transform 0.6s cubic-bezier(0.2, 0.5, 0.3, 1) 0.1s,
        padding 0.4s ease;
}

details:not([open]) .content {
    transition: 
        max-height 0.6s cubic-bezier(0.5, 0.1, 0.4, 0.9),
        opacity 0.4s ease,
        transform 0.4s ease,
        padding 0.3s ease;
}

details[open] {
    margin: 1.2rem 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

summary::after {
    content: "+";
    font-size: 1.8rem;
    color: var(--primary);
    transition: all 0.4s var(--transition);
    line-height: 1;
    margin-left: 1rem;
}

details[open] summary::after {
    content: "−";
    transform: rotate(180deg);
}

.accommodation {
    background: #f8f8f8;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.accommodation strong {
    display: block;
    margin: 0.6rem 0px;
}

.elevation-hidden {
    background: var(--primary);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    flex-shrink: 0;
    display: none;
}

@media (max-width: 600px) {
    summary {
        padding: 1.2rem;
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .elevation {
        margin-left: 0;
        order: 3;
        width: 100%;
        text-align: center;
    }

    .day-title {
        font-size: 1.1rem;
    }

    summary::after {
        font-size: 1.4rem;
    }

    .elevation {
        display: none;
    }

    .elevation-hidden {
        display: block;
    }
}