/* The Typist - 1961 Aesthetic */

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

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Special Elite', 'Courier New', monospace;
    color: #f5f0e6;
    line-height: 1.6;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Background Layer */
.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Quotes Banner */
.quotes-banner {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: -1rem;
    text-align: center;
    padding: 0.75rem 2rem 1rem;
    background: linear-gradient(to bottom, rgba(0, 60, 70, 0.85) 0%, rgba(0, 60, 70, 0.6) 80%, transparent 100%);
    position: relative;
    z-index: 10;
}

.quote-text {
    font-family: 'Special Elite', monospace;
    font-size: 1.1rem;
    font-style: italic;
    color: #f5f0e6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
    transition: opacity 0.5s ease;
}

.quote-text.quote-fade-out {
    opacity: 0;
}

.quote-source {
    font-family: 'Special Elite', monospace;
    font-size: 0.85rem;
    color: #d4cfc2;
    margin-top: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition: opacity 0.5s ease;
}

.quote-source.quote-fade-out {
    opacity: 0;
}

/* Main Content */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem 1rem 0;
    min-height: 100vh;
    position: relative;
}

/* Title Row - Title and Headshots side by side */
.title-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

/* Title Block - Always Visible, on top */
.title-block {
    max-width: 600px;
    text-align: center;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.title-image {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Headshots */
.headshots {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

.headshots-label {
    color: #f5f0e6;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.headshot-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.headshot {
    width: auto;
    height: 150px;
    object-fit: contain;
}

.headshot-name {
    color: #f5f0e6;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    margin-top: 0.25rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Figures Container - Full width, behind other content */
.figures-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(100vh - 200px);
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.figures-image {
    width: auto;
    height: 100%;
    object-fit: contain;
    object-position: bottom left;
}

/* Show Info Footer - fixed at bottom */
.show-info {
    width: 100%;
    text-align: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(to top, rgba(0, 60, 70, 0.9) 0%, rgba(0, 60, 70, 0.7) 50%, transparent 100%);
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 10;
}

.dates {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: #f5f0e6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.venue {
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #f5f0e6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.address {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #d4cfc2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.ticket-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: #f5f0e6;
    color: #1a4a5a;
    text-decoration: none;
    font-family: 'Special Elite', monospace;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.3);
}

.ticket-button:hover {
    background-color: #fff;
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.3);
}

/* Tab Control */
.tab-control {
    display: flex;
    justify-content: flex-end;
    gap: 0;
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    align-self: flex-end;
    margin-right: 2rem;
    margin-top: 1rem;
}

.tab {
    background-color: rgba(26, 74, 90, 0.85);
    border: 1px solid rgba(245, 240, 230, 0.4);
    border-bottom: none;
    color: #f5f0e6;
    padding: 0.6rem 1.2rem;
    font-family: 'Special Elite', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tab:first-child {
    border-radius: 4px 0 0 0;
}

.tab:last-child {
    border-radius: 0 4px 0 0;
}

.tab:hover {
    background-color: rgba(26, 74, 90, 0.95);
}

.tab.active {
    background-color: rgba(245, 240, 230, 0.9);
    color: #1a4a5a;
}

/* Tab Content */
.tab-content {
    display: block;
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    align-self: flex-end;
    margin-right: 2rem;
    margin-bottom: 180px;
    background-color: rgba(245, 240, 230, 0.9);
    border-radius: 4px 0 4px 4px;
    padding: 1.5rem;
    color: #1a4a5a;
    font-family: 'Special Elite', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    max-height: calc(100vh - 450px);
    overflow-y: scroll;
}

/* Always show scrollbar */
.tab-content::-webkit-scrollbar {
    width: 8px;
}

.tab-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.tab-content::-webkit-scrollbar-thumb {
    background: rgba(26, 74, 90, 0.5);
    border-radius: 4px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 74, 90, 0.7);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Video Thumbnail */
.video-thumbnail {
    position: relative;
    cursor: pointer;
    max-width: 320px;
    margin: 0 auto;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    aspect-ratio: 16 / 9;
}

.video-thumbnail video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
}

.play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.video-thumbnail:hover .play-button-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.play-icon {
    font-size: 3rem;
    color: #f5f0e6;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.video-thumbnail:hover .play-icon {
    transform: scale(1.1);
}

/* Video Modal */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.video-modal-overlay.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
}

.video-modal-content video {
    width: 100%;
    max-height: calc(90vh - 50px);
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.video-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #f5f0e6;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.video-close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Audio Toggle Button */
.audio-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(245, 240, 230, 0.9);
    border: none;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.audio-toggle:hover {
    background-color: #fff;
    transform: scale(1.1);
}

.audio-icon {
    font-size: 1.5rem;
    color: #1a4a5a;
    transition: opacity 0.3s ease;
}

.audio-icon.audio-off {
    opacity: 0.5;
}

.audio-icon.audio-on {
    opacity: 1;
}

/* Responsive Design */

/* Short viewport - hide secondary content when footer would overlap */
@media (max-height: 800px) {
    .hide-on-short {
        display: none !important;
    }

    .tab-content {
        max-height: 25vh !important;
        overflow-y: auto;
    }
}

@media (max-height: 600px) {
    .tab-control,
    .tab-content {
        display: none !important;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .content {
        padding: 1rem 1rem 0;
    }

    .title-block {
        max-width: 90%;
    }

    .dates {
        font-size: 1.3rem;
    }

    .venue {
        font-size: 1.1rem;
    }

    .address {
        font-size: 0.85rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .quotes-banner {
        padding: 0.75rem 1rem;
    }

    .quote-text {
        font-size: 0.9rem;
    }

    .quote-source {
        font-size: 0.75rem;
    }

    .content {
        padding: 0;
        justify-content: flex-start;
        gap: 0;
    }

    .title-row {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .title-block {
        max-width: 100%;
        margin: 0;
        padding: 0.5rem 0.5rem 0;
    }

    .title-image {
        /* Ensure title/credits always visible on mobile */
        min-width: 280px;
    }

    .headshots {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 0;
    }

    .headshots-label {
        width: 100%;
        text-align: center;
    }

    .headshot {
        height: 80px;
    }

    .headshot-name {
        font-size: 0.7rem;
    }

    .headshots-label {
        font-size: 0.7rem;
    }

    /* Hide tabs on mobile */
    .tab-control,
    .tab-content {
        display: none !important;
    }

    /* Figures move to foreground on mobile */
    .figures-container {
        position: relative;
        height: auto;
        z-index: 5;
        display: block;
        padding: 0;
        margin: 0;
    }

    .figures-image {
        width: 100%;
        height: auto;
        display: block;
        margin: 0;
        padding: 0;
    }

    .show-info {
        padding: 1rem 0.5rem;
        background: linear-gradient(to top, rgba(0, 60, 70, 0.95) 0%, rgba(0, 60, 70, 0.8) 70%, transparent 100%);
    }

    .dates {
        font-size: 1.1rem;
    }

    .venue {
        font-size: 1rem;
    }

    .address {
        font-size: 0.8rem;
    }

    .ticket-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Very small screens - title/credits remain visible */
@media (max-width: 320px) {
    .title-image {
        min-width: 260px;
    }
}
