/* Import main styles variables */
@import 'styles.css';

/* Container and Overlay Styling */
.container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background-image: url('/fotos/fondo_pc.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Background image for small screens */
@media (max-width: 800px) {
    .container {
        background-image: url('/fotos/fondo_mobile.jpg');
    }
}

/* Custom overlay2 for espacios page */
.overlay2 {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6rem 2rem 4rem 2rem;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.75) 0%,
        rgba(255, 255, 255, 0.6) 100%
    );
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Header (Title Only) Styling */
.header {
    text-align: center;
    margin-bottom: 1rem;
    width: 100%;
}

.header a.title {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 300;
    font-size: 3.5rem;
    color: var(--text-primary);
    text-decoration: none;
    text-transform: lowercase;
    letter-spacing: 3px;
    transition: all 0.3s ease;
    display: block;
}

.header a.title:hover {
    color: var(--primary-blue);
}

/* Introduction Section */
.intro-section {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    padding: 0 1rem;
}

.intro-section h2 {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 300;
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.intro-section .divider {
    width: 60px;
    height: 1px;
    background-color: var(--text-secondary);
    margin: 0.75rem auto 1.5rem;
    opacity: 0.5;
}

.intro-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Back Button Styling */
.back-button {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 10;
}

.back-button a {
    display: inline-flex;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.back-button a:hover {
    color: var(--primary-blue);
    transform: translateX(-5px);
}

/* Tabs and Content Container */
.tabs-container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    height: 450px;
    margin: 0 auto;
    position: relative;
}

/* Side Tabs Styling */
.side-tabs {
    width: 270px;
    position: relative;
    z-index: 5;
}

.tabs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tab-item {
    padding: 1.2rem 0;
    margin-bottom: 0.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.4s ease;
}

.tab-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -20px;
    width: 0;
    height: 1px;
    background-color: var(--primary-blue);
    transition: width 0.4s ease;
}

.tab-item:hover::before,
.tab-item.active::before {
    width: 15px;
}

.tab-item:hover .tab-number,
.tab-item.active .tab-number {
    color: var(--primary-blue);
}

.tab-item:hover .tab-name,
.tab-item.active .tab-name {
    color: var(--text-primary);
    transform: translateX(10px);
}

.tab-number {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    transition: all 0.4s ease;
}

.tab-name {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
    transition: all 0.4s ease;
}

.tab-item.active .tab-name {
    font-weight: 400;
    transform: translateX(10px);
}

/* Main Content Styling */
.main-content {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

.spaces-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Space Section Styling */
.space-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.space-section.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    z-index: 2;
}

.space-content {
    display: flex;
    width: 100%;
    height: 100%;
}

.space-content.reverse {
    flex-direction: row-reverse;
}

.space-text {
    width: 50%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.space-name {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 300;
    font-size: 2.2rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    letter-spacing: 1px;
}

.space-text .divider {
    width: 60px;
    height: 1px;
    background-color: var(--text-secondary);
    margin: 0 0 1rem;
    opacity: 0.5;
}

.space-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 500px;
    margin-bottom: 1.5rem;
}

.space-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.space-features li {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 300;
}

.space-features li i {
    color: var(--primary-blue);
    margin-right: 0.5rem;
    font-size: 1rem;
}

.space-image {
    width: 50%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .tabs-container {
        height: 500px;
    }
    
    .space-text {
        padding: 2rem;
    }
    
    .space-name {
        font-size: 2rem;
    }
    
    .space-features {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 900px) {
    .tabs-container {
        flex-direction: column;
        height: auto;
        min-height: 600px;
    }
    
    .side-tabs {
        width: 100%;
        height: auto;
        margin-bottom: 2rem;
    }
    
    .tabs-list {
        flex-direction: row;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-item {
        padding: 0.5rem 1rem;
        margin-right: 1rem;
        margin-bottom: 0;
        align-items: center;
        flex-direction: row;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .tab-item::before {
        display: none;
    }
    
    .tab-number {
        margin-bottom: 0;
        margin-right: 0.5rem;
        font-size: 0.7rem;
    }
    
    .tab-name {
        font-size: 0.9rem;
    }
    
    .tab-item:hover .tab-name,
    .tab-item.active .tab-name {
        transform: none;
    }
    
    .main-content {
        height: 500px;
        min-height: 500px;
    }
    
    .space-section {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        min-height: 600px;
        display: flex;
        align-items: stretch;
        justify-content: stretch;
    }
    
    .space-section.active {
        position: relative;
        height: auto;
    }
    
    .space-content,
    .space-content.reverse {
        flex-direction: column;
        height: auto;
    }
    
    .space-text,
    .space-image {
        width: 100%;
    }
    
    .space-text {
        height: auto;
        padding: 2rem 1.5rem;
        order: 2;
        position: relative;
        z-index: 1;
    }
    
    .space-image {
        height: 250px;
        min-height: 250px;
        order: 1;
        position: relative;
        z-index: 0;
    }
    
    .space-name {
        font-size: 1.8rem;
    }
    
    .space-features {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .back-button {
        top: 1rem;
        left: 1rem;
    }
}

@media (max-width: 600px) {
    .header a.title {
        font-size: 2.5rem;
    }
    
    .overlay2 {
        padding: 2rem 1rem;
    }
    
    .tabs-container {
        height: auto;
        min-height: 500px;
    }
    
    .main-content {
        height: 400px;
        min-height: 400px;
    }
    
    .intro-section {
        margin-bottom: 2rem;
    }
    
    .intro-section h2 {
        font-size: 1.5rem;
    }
    
    .space-text {
        padding: 1.5rem 1rem;
    }
    
    .space-name {
        font-size: 1.5rem;
    }
    
    .space-features {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .space-features li {
        font-size: 0.8rem;
    }
}

/* Animation for space sections */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.space-section.active {
    animation: fadeIn 0.8s ease-out forwards;
}
