/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 400;
    background-color: #94C0CC;
}

/*
body *{
    border: 1px solid white;
}
*/

/* Main presentation layout */
.presentation-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Bottom navigation bar */
.letters-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background-color: rgba(148, 192, 204, 0.9);
    border-radius: 30px;
    padding: 15px 20px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-letters {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
}

.nav-arrow {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    user-select: none;
}

.nav-arrow:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.9);
    color: rgba(255, 255, 255, 0.9);
}

.nav-arrow:disabled {
    opacity: 0.1;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-letter {
    width: 65px;
    height: 65px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.4;
    position: relative;
}

.nav-letter.active {
    opacity: 1;
    transform: scale(1.1);
}

.nav-letter picture {
    width: 100%;
    height: 100%;
    display: block;
}

.nav-letter img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Main content area */
.main-content {
    flex: 1;
}

/* Header styling */
.presentation-header {
    text-align: center;
    padding: 25px 0 0;
    color: white;
    z-index: 4;
}

.presentation-header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: white;
}

.presentation-header p {
    font-size: 1.2rem;
    font-weight: 400;
    color: white;
}

/* Letters container */
.letters-container {
    display: flex;
    flex-direction: row;
    overflow-x: hidden;
    overflow-y: hidden;
    scroll-behavior: smooth;
    gap: 0px;
    padding: 0 calc(50vw - 32.5vh);
    height: 65vh;
    width: 100vw;
    align-items: center;
}

.letter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 35vh;
    width: 35vh;
    min-width: 35vh;
    flex-shrink: 0;
    position: relative;
    aspect-ratio: 1 / 1;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.letter-item.focused {
    height: 65vh;
    width: 65vh;
    min-width: 65vh;
    opacity: 1;
}

.letter-item.focused .image-container{
    top: -1rem;
}

.letter-item:last-child {
    margin-right: 50px;
}

.image-container {
    position: relative;
    top: 0;
    width: 100%;
    aspect-ratio: 1 / 1; /* Force square container */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    transition: top 0.3s ease;
}

/* Picture element styling for responsive images */
picture {
    display: block;
    width: 100%;
    height: 100%;
}

.letter-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Keep letter proportions within square */
}

.letter-headline {
    font-size: 2rem;
    font-weight: 300;
    color: white;
    text-align: center;
    width: 100%;
    align-self: flex-start;
    position: absolute;
    bottom: 0;
    text-shadow: 2px 2px #94C0CC;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-wrap-style: pretty;
}

.letter-item.focused .letter-headline {
    opacity: 1;
}

/* Letter navigation arrows */
.letter-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    color: #94C0CC;
    font-size: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    user-select: none;
    opacity: 0;
    pointer-events: none;
    z-index: 4;
}

.letter-arrow-left {
    left: calc(50vw - 32.5vh - 75px);
}

.letter-arrow-right {
    right: calc(50vw - 32.5vh - 75px);
}

.letter-arrow {
    opacity: 1;
    pointer-events: auto;
}

.letter-arrow:disabled {
    opacity: 0.1;
    cursor: not-allowed;
    pointer-events: none;
}

/* Desktop only hover effect */
@media (min-width: 769px) {
    .letter-arrow:hover:not(:disabled) {
        background: rgba(255, 255, 255, 1);
        transform: translateY(-50%) scale(1.1);
    }
}

/* Hotspots */
.hotspot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.letter-item.focused .hotspot {
    opacity: 1;
    pointer-events: auto;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        transform: translate(-50%, -50%) scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Modal base styles */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.modal-container.active {
    visibility: visible;
    opacity: 1;
}

/* Modal content - mobile first */
.modal-content {
    background-color: white;
    width: 95%;
    min-width: 300px;
    padding: 20px;
    border-radius: 5px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Background image with white overlay for mobile */
.modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.modal-content::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 0;
}

.modal-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.modal-image {
    display: none; /* Hidden on mobile */
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
}

.modal-text-content {
    flex: 1;
    width: 100%;
    padding: 50px 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #0099cc transparent;
}

/* Custom scrollbar for WebKit browsers */
.modal-text-content::-webkit-scrollbar {
    width: 2px;
}

.modal-text-content::-webkit-scrollbar-thumb {
    background-color: #0099cc;
}

.modal-text-content::-webkit-scrollbar-track {
    background: transparent;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #0099cc;
    border: 1px solid #0099cc;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
}

/* Modal text styling */
.modal-text {
    margin-top: 20px;
    color: #0099cc;
    font-weight: 400;
}

.modal-text h1 {
    color: #0099cc;
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 20px;
}

.modal-text h3 {
    color: #0099cc;
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 15px;
}

.modal-text a {
    color: #0099cc;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 1080px) {
    .presentation-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* Fixed header on mobile */
    .presentation-header {
        background-color: rgba(148, 192, 204, 0.95);
        backdrop-filter: blur(10px);
        padding: 20px;
    }
    
    /* Mobile: horizontal layout like desktop with swipe */
    .letters-container {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        gap: 0px;
        padding: 0;
        height: auto;
        width: 100vw;
        align-items: start;
    }
    
    .letter-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: auto;
        width: 100vw;
        min-width: 100vw;
        flex-shrink: 0;
        position: relative;
        aspect-ratio: 1 / 1;
        transition: all 0.3s ease;
        opacity: 0.5;
        scroll-snap-align: center;
    }
    
    .letter-item.focused {        
        opacity: 1;
        height: auto;
        width: 100vw;
        min-width: 100vw;
    }

    .letter-item.focused .image-container{
        top: 0;
    }
    
    .letter-headline {
        font-size: 1.8rem;
        font-weight: 300;
        color: white;
        text-align: center;
        width: 100%;
        margin-block: 20px;
        opacity: 1;
        position: static;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }
    
    /* Show bottom navigation on mobile but hide left/right arrows */
    .letters-nav {
        display: flex;
        width: 100%;
        justify-content: center;
    }

    .nav-letters{
        display: flex;
        flex-direction: row;
        width: 100%;
        align-items: center;
        justify-content: space-evenly;
    }
    
    .nav-arrow {
        display: none; /* Hide left/right arrows in bottom nav */
    }
    
    .nav-letter {
        width: auto;
        height: auto;
        aspect-ratio: 1 / 1;
        max-width: 45px;
        max-height: 45px;
    }

    .letter-arrow{
        display: none;
    }
    
    /* Mobile letter arrows - positioned at bottom edges */
    .letter-arrow-left {
        top: 50%;
        bottom: auto;
        left: -10px;
        transform: none;
        position: fixed;
        translate: 0 -50%;
    }
    
    .letter-arrow-right {
        top: 50%;
        bottom: auto;
        right: -10px;
        transform: none;
        position: fixed;
        translate: 0 -50%;
    }
    
    /* Mobile hover effects */
    .letter-arrow-left:hover:not(:disabled) {
        background: rgba(255, 255, 255, 1);
        transform: scale(1.1);
    }
    
    .letter-arrow-right:hover:not(:disabled) {
        background: rgba(255, 255, 255, 1);
        transform: scale(1.1);
    }
    
    .presentation-header h1 {
        font-size: 2rem;
        font-weight: 300;
        color: white;
    }
    
    .presentation-header p {
        font-size: 1rem;
        font-weight: 400;
        color: white;
    }
}

/* Tablets and larger - switch to desktop modal layout */
@media (min-width: 768px) {
    /* Desktop modal layout */
    .modal-content {
        max-width: 750px;
        min-width: 600px;
        aspect-ratio: 3 / 2;
        max-height: 80vh;
        max-height: min(80vh, 550px);
        padding: 15px;
        border-radius: 0;
    }
    
    .modal-content::before,
    .modal-content::after {
        display: none; /* Remove background image and overlay */
    }
    
    .modal-inner {
        --gap-width : 65px;
        flex-direction: row;
        gap: var(--gap-width);
    }
    
    .modal-image {
        display: block;
        flex: 0 0 30%;
        height: 100%;
    }
    
    .modal-text-content {
        flex: 0 0 calc(70% - var(--gap-width));
        padding: 50px 50px 30px 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .close-button {
        top: 15px;
        right: 15px;
    }
}

/* Large desktop - optimize modal size */
@media (min-width: 1024px) {
    .modal-content {
        width: 80%;
        max-width: 900px;
        padding: 20px;
    }
}

