/* ================================
   US STORYTELLING MENU - Diseño Masonry Asimétrico
   About Us grande arriba, Team y Join Us pequeños abajo
   ================================ */

.thinkia-us-storytelling-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
    pointer-events: none;
}

.thinkia-us-storytelling-menu[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.thinkia-us-storytelling-menu__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(3, 9, 29, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    backdrop-filter: blur(40px) saturate(180%);
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.thinkia-us-storytelling-menu[aria-hidden="false"] .thinkia-us-storytelling-menu__overlay {
    opacity: 1;
}

.thinkia-us-storytelling-menu__container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 4vw, 4rem);
    width: 100%;
    max-width: 90%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    transform: translateY(30px) scale(0.98);
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s;
    opacity: 0;
    height: 100vh;
    box-sizing: border-box;
}

.thinkia-us-storytelling-menu[aria-hidden="false"] .thinkia-us-storytelling-menu__container {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.thinkia-us-storytelling-menu__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: clamp(1rem, 2vw, 1.5rem);
    padding-bottom: clamp(1rem, 2vw, 1.5rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}

.thinkia-us-storytelling-menu__title {
    font-family: 'Thinkia Neo', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, opacity 0.8s 0.2s;
}

.thinkia-us-storytelling-menu[aria-hidden="false"] .thinkia-us-storytelling-menu__title {
    transform: translateY(0);
    opacity: 1;
}

.thinkia-us-storytelling-menu__close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transform: translateY(20px) rotate(-90deg);
    opacity: 0;
    border: none;
}

.thinkia-us-storytelling-menu[aria-hidden="false"] .thinkia-us-storytelling-menu__close {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
    transition-delay: 0.3s;
}

.thinkia-us-storytelling-menu__close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.thinkia-us-storytelling-menu__content {
    flex: 1;
    min-height: 0;
    padding-top: clamp(0.5rem, 1vw, 1rem);
    padding-bottom: clamp(0.5rem, 1vw, 1rem);
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
}

/* Masonry Grid Container */
.thinkia-us-storytelling-menu__masonry {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: 0.5fr 0.5fr;
    gap: clamp(0.75rem, 1.25vw, 1.25rem);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    align-content: stretch;
    box-sizing: border-box;
}

/* Cards Base */
.thinkia-us-storytelling-menu__card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 3rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: #ffffff;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}

.thinkia-us-storytelling-menu[aria-hidden="false"] .thinkia-us-storytelling-menu__card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Card grande: About Us - Ocupa toda la fila superior */
.thinkia-us-storytelling-menu__card--large {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 0;
    height: 100%;
    padding: clamp(1rem, 2vw, 2rem) clamp(1rem, 2vw, 2rem) clamp(0.25rem, 0.5vw, 0.5rem) clamp(1.5rem, 2.5vw, 2.5rem);
    flex-direction: row;
    align-items: center;
    gap: clamp(1rem, 1.75vw, 1.75rem);
    transition-delay: 0.1s;
    box-sizing: border-box;
    overflow: hidden;
}

/* Cards pequeños: Team y Join Us - Comparten la fila inferior */
.thinkia-us-storytelling-menu__card--small {
    grid-column: span 6;
    grid-row: 2;
    min-height: 0;
    height: 100%;
    padding: clamp(1rem, 1.75vw, 1.75rem) clamp(1rem, 1.75vw, 1.75rem) clamp(1rem, 1.75vw, 1.75rem) clamp(1.25rem, 2vw, 2rem);
    transition-delay: 0.2s;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.thinkia-us-storytelling-menu__card--small:nth-of-type(2) {
    transition-delay: 0.25s;
}

.thinkia-us-storytelling-menu__card--small:nth-of-type(3) {
    transition-delay: 0.3s;
}

/* Card Number */
.thinkia-us-storytelling-menu__card-number {
    font-family: 'Thinkia Neo', sans-serif;
    font-size: clamp(3rem, 4.5vw, 4.5rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.08);
    line-height: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.thinkia-us-storytelling-menu__card--large .thinkia-us-storytelling-menu__card-number {
    font-size: clamp(3rem, 4.5vw, 4.5rem);
    min-width: clamp(60px, 8vw, 85px);
    text-align: center;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thinkia-us-storytelling-menu__card--small .thinkia-us-storytelling-menu__card-number {
    font-size: clamp(2rem, 3.5vw, 3rem);
    margin-bottom: 0.5rem;
    transform-origin: left center;
}

.thinkia-us-storytelling-menu__card:hover .thinkia-us-storytelling-menu__card-number {
    color: var(--e-global-color-accent);
    transform: scale(1.1);
}

.thinkia-us-storytelling-menu__card--small:hover .thinkia-us-storytelling-menu__card-number {
    transform: scale(1.1);
    transform-origin: left center;
    /* Escala desde la izquierda sin moverse */
}

/* Card Content */
.thinkia-us-storytelling-menu__card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    justify-content: center;
}

.thinkia-us-storytelling-menu__card--large .thinkia-us-storytelling-menu__card-content {
    justify-content: center;
    align-items: flex-start;
    padding-top: 0.1em;
}

.thinkia-us-storytelling-menu__card-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

.thinkia-us-storytelling-menu__card:hover .thinkia-us-storytelling-menu__card-label {
    color: var(--e-global-color-accent);
}

.thinkia-us-storytelling-menu__card-title {
    font-family: 'Thinkia Neo', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
    transition: transform 0.4s ease;
}

.thinkia-us-storytelling-menu__card--small .thinkia-us-storytelling-menu__card-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.thinkia-us-storytelling-menu__card:hover .thinkia-us-storytelling-menu__card-title {
    transform: translateX(5px);
}

.thinkia-us-storytelling-menu__card-description {
    font-size: clamp(0.75rem, 1.1vw, 0.9rem);
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    margin-top: 0.25rem;
    transition: color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.thinkia-us-storytelling-menu__card--small .thinkia-us-storytelling-menu__card-description {
    font-size: clamp(0.7rem, 0.95vw, 0.8rem);
    -webkit-line-clamp: 2;
    margin-top: 0.25rem;
}

.thinkia-us-storytelling-menu__card:hover .thinkia-us-storytelling-menu__card-description {
    color: rgba(255, 255, 255, 0.8);
}

/* Card Arrow */
.thinkia-us-storytelling-menu__card-arrow {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    align-self: flex-end;
    margin-top: auto;
}

.thinkia-us-storytelling-menu__card--large .thinkia-us-storytelling-menu__card-arrow {
    width: 56px;
    height: 56px;
    align-self: flex-end;
}

.thinkia-us-storytelling-menu__card--small .thinkia-us-storytelling-menu__card-arrow {
    position: absolute;
    bottom: clamp(1rem, 1.75vw, 1.75rem);
    right: clamp(1rem, 1.75vw, 1.75rem);
    margin: 0;
    align-items: flex-end;
    align-self: auto;
    margin-top: 0;
}

.thinkia-us-storytelling-menu__card--small .thinkia-us-storytelling-menu__card-description {
    padding-right: 3rem;
}

.thinkia-us-storytelling-menu__card:hover .thinkia-us-storytelling-menu__card-arrow {
    color: var(--e-global-color-accent);
    transform: translateX(8px) scale(1.1);
}

/* Hover Effects */
.thinkia-us-storytelling-menu__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(155, 81, 224, 0.1) 0%, rgba(0, 64, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 24px;
    pointer-events: none;
}

.thinkia-us-storytelling-menu__card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.thinkia-us-storytelling-menu__card:hover::before {
    opacity: 1;
}

/* Light Mode */
body.modo-light .thinkia-us-storytelling-menu__overlay {
    background: linear-gradient(135deg, rgba(245, 245, 245, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

body.modo-light .thinkia-us-storytelling-menu__title {
    background: linear-gradient(135deg, #03091d 0%, rgba(3, 9, 29, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.modo-light .thinkia-us-storytelling-menu__close {
    background: rgba(3, 9, 29, 0.05);
    border-color: rgba(3, 9, 29, 0.1);
    color: #03091d;
}

body.modo-light .thinkia-us-storytelling-menu__card {
    background: rgba(3, 9, 29, 0.02);
    border-color: rgba(3, 9, 29, 0.1);
    color: #03091d;
}

body.modo-light .thinkia-us-storytelling-menu__card-title {
    color: #03091d;
}

body.modo-light .thinkia-us-storytelling-menu__card-description {
    color: rgba(3, 9, 29, 0.6);
}

body.modo-light .thinkia-us-storytelling-menu__card-number {
    color: rgba(3, 9, 29, 0.1);
}

body.modo-light .thinkia-us-storytelling-menu__card:hover .thinkia-us-storytelling-menu__card-number {
    color: var(--e-global-color-accent);
}

/* Responsive */
@media (max-width: 1024px) {
    .thinkia-us-storytelling-menu__masonry {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .thinkia-us-storytelling-menu__card--large {
        grid-column: 1 / -1;
    }
    
    .thinkia-us-storytelling-menu__card--small {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    /* Exact copy of .thinkia-header__mobile-nav-submenu styles */
    .thinkia-us-storytelling-menu__masonry {
        list-style: none;
        margin: 0;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
        padding: 0;
        padding-left: 0.75rem;
        padding-bottom: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    /* Exact copy of .thinkia-header__mobile-nav-subitem styles */
    .thinkia-us-storytelling-menu__card--large,
    .thinkia-us-storytelling-menu__card--small {
        margin: 0;
        display: block;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
    }
    
    /* Remove any ::before or ::after */
    .thinkia-us-storytelling-menu__card--large::before,
    .thinkia-us-storytelling-menu__card--large::after,
    .thinkia-us-storytelling-menu__card--small::before,
    .thinkia-us-storytelling-menu__card--small::after {
        content: "" !important;
        display: none !important;
    }
    
    /* Hide all card elements except title */
    .thinkia-us-storytelling-menu__card-number,
    .thinkia-us-storytelling-menu__card-content,
    .thinkia-us-storytelling-menu__card-label,
    .thinkia-us-storytelling-menu__card-description,
    .thinkia-us-storytelling-menu__card-arrow {
        display: none;
    }
    
    /* Exact copy of .thinkia-header__mobile-nav-subitem .thinkia-header__mobile-nav-link */
    .thinkia-us-storytelling-menu__card-title {
        font-size: 1rem;
        font-weight: 400;
        padding: 0.25rem 0;
    }
    
    /* Exact copy of .thinkia-header__mobile-nav-subitem:last-child .thinkia-header__mobile-nav-link */
    .thinkia-us-storytelling-menu__card:last-child .thinkia-us-storytelling-menu__card-title {
        padding-bottom: 0.125rem;
    }
    
    /* Remove all hover effects */
    .thinkia-us-storytelling-menu__card:hover {
        background: transparent;
        border: none;
        transform: none;
        box-shadow: none;
    }
    
    .thinkia-us-storytelling-menu__card:hover .thinkia-us-storytelling-menu__card-title {
        transform: none;
    }
    
    .thinkia-us-storytelling-menu__card::before {
        display: none;
    }
}
