/* ==========================================================================
   1. ESTRUCTURA DE PAGINA Y LAYOUT
   ========================================================================== */
.page {
    display: none;
    flex-direction: column;
    min-height: 100vh;
    flex: 1;
    z-index: 1;
}

/* ==========================================================================
   2. SISTEMA DE NAVEGACION (HEADER)
   ========================================================================== */
.navigator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 40px;
    background-color: var(--bg-nav);
    box-shadow: 0px 4px 10px -2px var(--shadow-nav);
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--border-search);
    z-index: 1;
    flex-wrap: wrap;
    gap: 15px;
}

.space-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.space-input {
    display: flex;
    justify-content: center;
    flex: 2;
    transition: transform 1s ease ;
}

.space-input .container:hover {
    transform: scale(1.04);
}

.space-options {
    display: flex;
    justify-content: flex-end;
    flex: 1;
}

@media (max-width: 767px) {
    .navigator {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        grid-template-areas: 
            "title services"
            "search search";
        align-items: center;
        gap: 12px 16px;
        padding: 12px 16px;
    }

    .space-title {
        grid-area: title;
        flex: none;
        justify-self: start;
    }

    .space-options {
        grid-area: services;
        flex: none;
        justify-self: end;
    }

    .space-input {
        grid-area: search;
        width: 100%;
        justify-self: stretch;
    }

    .space-input > .container {
        max-width: 100%;
    }

    .services {
        text-align: right;
        padding: 4px 25px 4px 10px;
        background-position: right 8px center;
    }  .space-title > .title {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    .space-title .ubication {
        font-size: 0.55em;
    }
}

.space-title > .title {
    padding: 8px 18px;
    font-size: 0.9em;
    letter-spacing: 1px;
    font-weight: 900;
    color: var(--color-title);
    text-align: center;
    background-color: var(--bg-title);
    border-radius: 6px;
    text-transform: uppercase;
    user-select: none;
    cursor: pointer;
    box-shadow: 0px 4px 10px -5px var(--shadow-nav);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.space-title .title:hover {
    transform: scale(1.1);
}

.space-title .ubication {
    display: flex;
    flex-direction: column;
    font-size: 0.6em;
    letter-spacing: 0.5px;
    text-align: end;
    color: var(--color-ubication-nav);
}

.space-input > .container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 450px;
    padding: 0px 10px;
    background-color: var(--bg-search);
    border: 1px solid var(--border-search);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.space-input > .container:focus-within {
    background-color: var(--bg-search);
    box-shadow: 0px 4px 12px var(--shadow-nav);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 8px;
    font-size: 0.9em;
    color: var(--color-search);
}

.search-button {
    display: flex;
    cursor: pointer;
    outline: none;
    border: none;
    background-color: transparent;
}

.search-svg {
    width: 18px;
    height: 18px;
    stroke: var(--color-search);
    transition: transform 0.2s ease;
}
.search-svg:hover {
    transform: scale(1.2);
}

.services {
    outline: none;
    appearance: none;
    text-align: end;
    color: var(--select-service);
    -webkit-appearance: none;
    padding: 4px 35px 4px 15px;
    font-size: 0.85em;
    border: none;
    background-color: transparent;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}


/* ==========================================================================
   3. LOADERS
   ========================================================================== */
.loader-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-page);
}

.loader-page .title {
    padding: 3px 18px;
    font-size: 0.9em;
    font-weight: 900;
    text-transform: uppercase;
    background-color: var(--bg-title);
    color: var(--color-title);
    border-radius: 4px;
    transform: scale(1.9);
    animation: loader-title 0.5s ease-out;
}

.loader-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    animation: loader 0.5s forwards;
}

/* ==========================================================================
   4. CONTENEDORES DE WEB - RESPONSIVE
   ========================================================================== */
.container {
    display: none;
    flex: 1;
    background-color: var(--bg-page);
}

.loader-content {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-page);
    position: fixed;
    justify-content: center;
    align-items: center;
}

.toast {
    height: fit-content;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: 100;
    user-select: none;
    cursor: wait;
    color: var(--color-toast);
    background-color: var(--bg-title);
    animation: loader 1s;
}

.news {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    align-content: start;
    justify-content: center;
    box-sizing: border-box;
}

.new {
    display: flex;
    border: 1px solid var(--border-search);
    height: fit-content;
    flex: 1 1 auto;
    border-radius: 5px;
    width: fit-content;
    max-width: calc(50% - 15px);
    box-shadow: 0px 4px 10px -5px var(--shadow-nav);
    min-width: 200px;
    box-sizing: border-box;
    flex-direction: column;
    padding: 18px;
    background-color: var(--bg-new);
    overflow: hidden;
    transition: all 0.3s ease;
}

@media (max-width: 767px) {
    .new {
        max-width: 100%;
        min-width: auto;
    }
}

.new:hover {
    border-color: var(--border-new-hover);
}

.new-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-category {
    font-size: 0.7rem;
    font-weight: 700;
    user-select: none;
    text-transform: uppercase;
    color: var(--border-new-hover);
    background: var(--bg-new-tag);
    padding: 2px 8px;
    border-radius: 4px;
}

.location-badge {
    font-size: 0.75rem;
    color: var(--color-location-new);
    display: flex;
    align-items: center;
    gap: 4px;
}

.new .titled {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-title-new);
    margin-bottom: 8px;
    line-height: 1.2;
}

.text {
    font-size: 0.95rem;
    color: var(--color-text-new);
    line-height: 1.5;
    margin-bottom: 15px;
}

.new-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-footer-new);
    padding-top: 10px;
}

.date {
    font-size: 0.8rem;
    color: var(--color-date-new);
}

.juntas {
    flex: 1;
    overflow: hidden;
    flex-direction: column;
}

.juntas .titled {
    padding: 15px 0px;
    width: 100%;
    color: var(--bg-junta-card-title);
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    letter-spacing: 1px;
}

.juntas .content {
    display: flex;
    padding: 0px 20px;
    flex: 1;
    flex-direction: row;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 15px;
    flex-wrap: wrap;
    align-content: flex-start;
}

@media (max-width: 480px) {
    .juntas .content {
        padding: 0px 12px;
        gap: 12px;
    }
}

.junta-card {
    background: var(--bg-new);
    border-radius: 10px;
    height: fit-content;
    overflow: hidden;
    width: 100%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s;
}

.junta-header {
    background: var(--junta-color);
    color: var(--color-title-junta);
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.junta-header h2 {
    margin: 0;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 1px;
}

.junta-body {
    padding: 0px 10px;
    position: relative;
}

.talleres-container::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 40px;
    bottom: 0px;
    width: 2px;
    height: calc(100% - 50px);
    background: var(--taller-border);
    z-index: 0;
}

.location-box {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.dot {
    width: 12px;
    height: 12px;
    background: var(--junta-color);
    border-radius: 50%;
    border: 3px solid var(--bg-page);
}

.location-text {
    font-size: 0.9rem;
    color: var(--location-color);
    font-weight: 500;
}

.talleres-container {
    margin-left: 25px;
    padding-bottom: 10px;
}

.taller-item {
    background: var(--taller-bg);
    padding: 5px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 4px solid var(--bg-border-item);
    transition: all 0.2s;
}

.junta-card:hover {
    transform: scale(1.01);
}

.taller-item:hover {
    transform: translateX(5px);
}

.taller-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-title-new);
}

.horario-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--horario-color);
    margin-top: 4px;
}

/* Skiper (paginacion) */
.skiper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    user-select: none;
}

.skiper span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    border-radius: 50%;
    transition: all 0.2s ease;
    border: 1px solid var(--border-search);
    background-color: var(--bg-search);
    color: var(--color-ubication-nav);
}

.skiper .back,
.skiper .go {

    color: var(--bg-junta-card-title);
    font-size: 1.2rem;
}

.skiper .back:hover,
.skiper .go:hover {
    transform: scale(1.2);
}

.skiper .number {
    background-color: var(--bg-skip-number);
    color: var(--primary-text);
    cursor: default;
}

.skiper .number:hover {
    transform: scale(1.1);
}

.skiper span.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* ==========================================================================
   5. ANIMACIONES
   ========================================================================== */
@keyframes loader-title {
    from { opacity: 0; transform: scaleX(0) scale(1.9); }
    to   { opacity: 1; transform: scaleX(1) scale(1.9); }
}

@keyframes loader {
    from { background-color: transparent; }
    to   { background-color: var(--bg-page); }
}

@keyframes clear {
    from { background-color: var(--bg-page); }
    to   { background-color: transparent; }
}