:root {
    --header-image: url('toivo.no.gif');
    --body-bg-image: url('../images/backgrounds/background8.gif');
    --main-bg-image: url('../images/backgrounds/background2.gif');
    --navbar-bg-image: url('../images/backgrounds/background2.gif');
    --content: #43256E;
}

@font-face {
    font-family: Nunito;
    src: url('https://sadhost.neocities.org/fonts/Nunito-Regular.ttf');
}

@font-face {
    font-family: Nunito;
    src: url('https://sadhost.neocities.org/fonts/Nunito-Bold.ttf');
    font-weight: bold;
}

@font-face {
    font-family: Nunito;
    src: url('https://sadhost.neocities.org/fonts/Nunito-Italic.ttf');
    font-style: italic;
}

@font-face {
    font-family: Nunito;
    src: url('https://sadhost.neocities.org/fonts/Nunito-BoldItalic.ttf');
    font-style: italic;
    font-weight: bold;
}

@font-face {
    font-family: 'Scatterbrained Restrained';
    src: url('../fonts/Scatterbrained-Restrained.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: Agate;
    src: url('../fonts/agate.ttf') format('truetype');
    font-display: swap;
}

body {
    font-family: Georgia, serif;
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    line-height: 1.5;
    margin: 0;
    background-color: #08031A;
    background-size: 65px;
    color: #fceaff;
    background-image: var(--body-bg-image);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;

}

* {
    box-sizing: border-box;
}

#container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 12px;
}

#container a {
    color: #ED64F5;
    font-weight: bold;
}

#header {
    width: 100%;
    background-color: transparent;
    height: clamp(95px, 14vw, 150px);
    background-image: var(--header-image);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}

#navbar {
    min-height: 44px;
    padding: 6px 0;
    background-color: transparent;
    background-image: none;
    border-radius: 12px;
    box-shadow: 0 0 34px rgba(8, 3, 26, 0.24);
    width: 100%;
}

#navbar ul {
    display: flex;
    padding: 0;
    margin: 0;
    list-style-type: none;
    justify-content: space-evenly;
    align-items: center;
}

#navbar li {
    padding-top: 0;
}

#navbar li a {
    color: #ED64F5;
    font-weight: 800;
    font-family: 'Scatterbrained Restrained', 'Nunito', sans-serif;
    font-size: clamp(0.8rem, 1.6vw, 0.9rem);
    letter-spacing: 0.02em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
    text-decoration: none;
}

#navbar li a:hover {
    color: #a49cba;
    text-decoration: underline;
}

#headerArea {
    margin-bottom: 0;
}

#flex {
    display: flex;
    gap: 20px;
}

aside {
    background-color: #241445;
    width: 200px;
    padding: 20px;
    font-size: smaller;
    border-radius: 14px;
    box-shadow: 0 0 38px rgba(8, 3, 26, 0.24);
}

main {
    background-color: #43256E;
    background-image: var(--main-bg-image);
    flex: 1;
    padding: 20px;
    order: 2;
    border-radius: 14px;
    box-shadow: 0 0 42px rgba(8, 3, 26, 0.24);
}

#leftSidebar {
    order: 1;
    background-image: var(--main-bg-image);
}

#rightSidebar {
    order: 3;
}

footer {
    background-color: transparent;
    width: 100%;
    min-height: 44px;
    padding: 12px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-instagram-icon {
    display: block;
    width: 110px;
    height: auto;
}

h1,
h2,
h3 {
    color: #ED64F5;
}

h1 {
    font-size: clamp(1.35rem, 2.8vw, 1.7rem);
}

.sidebar-heading-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.glow {
    color: #fff;
    text-align: center;
    animation: glow 1s ease-in-out infinite alternate;
}

@-webkit-keyframes glow {
    from {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #e60073, 0 0 40px #e60073, 0 0 50px #e60073, 0 0 60px #e60073, 0 0 70px #e60073;
    }

    to {
        text-shadow: 0 0 20px #fff, 0 0 30px #ff4da6, 0 0 40px #ff4da6, 0 0 50px #ff4da6, 0 0 60px #ff4da6, 0 0 70px #ff4da6, 0 0 80px #ff4da6;
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #e60073, 0 0 40px #e60073, 0 0 50px #e60073, 0 0 60px #e60073, 0 0 70px #e60073;
    }

    to {
        text-shadow: 0 0 20px #fff, 0 0 30px #ff4da6, 0 0 40px #ff4da6, 0 0 50px #ff4da6, 0 0 60px #ff4da6, 0 0 70px #ff4da6, 0 0 80px #ff4da6;
    }
}

strong {
    color: #ED64F5;
}

.box {
    background-color: #13092D;
    border: 1px solid #ED64F5;
    padding: 10px;
}

#topBar {
    width: 100%;
    min-height: 30px;
    padding: 10px;
    font-size: smaller;
    background-color: #13092D;
}

@media only screen and (max-width: 800px) {
    #header {
        height: clamp(80px, 20vw, 120px);
    }

    #flex {
        flex-wrap: wrap;
    }

    aside {
        width: 100%;
    }

    main {
        order: 1;
    }

    #leftSidebar {
        order: 2;
    }

    #rightSidebar {
        order: 3;
    }

    #navbar {
        height: auto;
        min-height: 44px;
        padding: 6px 0;
    }

    #navbar ul {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 6px;
    }

    #navbar li {
        padding-top: 0;
    }

    #navbar li a {
        font-size: 0.8rem;
        letter-spacing: 0.01em;
        padding: 0 10px;
    }

    aside,
    main {
        box-shadow: 0 0 22px rgba(8, 3, 26, 0.18);
    }
}

@media only screen and (max-width: 600px) {
    #container {
        padding: 0 10px;
    }

    #flex {
        gap: 12px;
    }

    aside,
    main {
        padding: 14px;
        border-radius: 10px;
    }

    #navbar ul {
        justify-content: center;
        row-gap: 4px;
    }

    #navbar li a {
        min-height: 42px;
        padding: 0 9px;
        font-size: 0.76rem;
    }
}

@media only screen and (max-width: 420px) {
    #container {
        padding: 0 8px;
    }

    #header {
        height: clamp(64px, 22vw, 90px);
    }

    #navbar {
        padding: 4px 0;
    }

    #navbar li a {
        min-height: 40px;
        padding: 0 8px;
        font-size: 0.72rem;
        letter-spacing: 0;
    }

    main,
    aside {
        padding: 12px;
    }

    body {
        background-attachment: scroll;
    }
}

.showreel-wrapper {
    margin-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resume-button {
    display: block;
    margin: 18px auto 0;
    padding: 10px 18px;
    color: #08031A;
    background: #ffcc66;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    transition: transform 0.2s ease, background 0.2s ease;
}
.resume-button:hover {
    background: #ffd97f;
    transform: translateY(-1px);
}

.showreel-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffcc66;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.showreel-arrow::before {
    content: '➤';
    color: #ff8c00;
    font-size: 1.4rem;
    animation: pulseArrow 1.2s infinite alternate;
}

.flame-border {
    display: inline-block;
    padding: 8px;
    width: min(100%, 776px);
    border-radius: 0;
    box-shadow: 0 0 20px rgba(255, 115, 0, 0.65);
}

.flame-border video {
    display: block;
    width: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0;
    background-color: #000;
}

.flame-border .showreel-embed {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 0;
    background-color: #000;
}

@keyframes flameGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulseArrow {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
    .glow {
        animation: none;
    }

    .showreel-arrow::before {
        animation: none;
    }

    .resume-button {
        transition: none;
    }
}

/* Scenekunst page styles */
.gallery {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.poster-link {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #fceaff;
    transition: transform 0.3s;
    flex: 0 1 auto;
    max-width: 200px;
}

.poster-link:hover {
    transform: scale(1.05);
}

.poster {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.poster-link p {
    margin: 10px 0 0;
    font-weight: bold;
}

/* Shrines page styles */
.shrine-nav {
    margin: 20px 0;
    text-align: center;
    padding: 15px 0;
    border-top: 2px solid #ED64F5;
    border-bottom: 2px solid #ED64F5;
}

.shrine-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.shrine-nav a {
    color: #ED64F5;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
    transition: background 0.3s, color 0.3s;
}

.shrine-nav a:hover {
    background: #ED64F5;
    color: #08031A;
}

.shrine-section {
    margin: 40px 0;
}

.accordion-toggle {
    width: 100%;
    background-color: #43256E;
    color: #ED64F5;
    border: 2px solid #ED64F5;
    padding: 15px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 8px;
    margin-bottom: 10px;
}

.accordion-toggle:hover {
    background-color: #ED64F5;
    color: #08031A;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    background-color: transparent;
    border-radius: 8px;
    padding: 0;
}

.accordion-content.open {
    max-height: 5000px;
    padding: 15px 0;
    overflow: visible;
}

.shrines-heading {
    display: block;
    max-width: 200px;
    height: auto;
    margin: 0 auto 20px;
    text-align: center;
}

.ommeg-heading {
    display: block;
    max-width: 200px;
    height: auto;
    margin: 0 auto 20px;
    text-align: center;
}

.filmogtv-heading {
    display: block;
    max-width: 200px;
    height: auto;
    margin: 0 auto 20px;
    text-align: center;
}

.scenekunst-heading {
    display: block;
    max-width: 200px;
    height: auto;
    margin: 0 auto 20px;
    text-align: center;
}

.velkommen-heading {
    max-width: 200px;
    height: auto;
}

.links-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.2s;
}

.links-dropdown-toggle:hover {
    transform: scale(1.05);
}

.links-button-image {
    display: block;
    max-width: 150px;
    height: auto;
}

.links-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: transparent;
    border-radius: 8px;
    margin-top: 10px;
    padding: 0 15px;
}

.links-dropdown-content.open {
    max-height: 300px;
    padding: 15px;
}

.links-dropdown-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.links-dropdown-content li {
    margin: 8px 0;
}

.links-dropdown-content a {
    color: #ED64F5;
    text-decoration: none;
    font-weight: bold;
}

.links-dropdown-content a:hover {
    text-decoration: underline;
}

.shrine-section h2 {
    color: #ED64F5;
    border-bottom: 2px solid #ED64F5;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.shrine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.shrine-card {
    background: rgba(36, 20, 69, 0.6);
    border: 1px solid #ED64F5;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.shrine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(237, 100, 245, 0.3);
}

.shrine-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #000;
}

.shrine-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.shrine-card:hover .shrine-image img {
    transform: scale(1.05);
}

.shrine-content {
    padding: 15px;
    text-align: center;
}

.shrine-content h3 {
    margin: 0 0 8px 0;
    color: #ED64F5;
    font-size: 1.1em;
}

.shrine-content h3 a {
    text-decoration: none;
    color: #ED64F5;
}

.shrine-content h3 a:hover {
    text-decoration: underline;
}

.shrine-from {
    color: #ffcc66;
    font-size: 0.9em;
    margin: 3px 0 8px 0;
    font-style: italic;
}

.shrine-description {
    color: #fceaff;
    font-size: 0.9em;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.shrine-link {
    display: inline-block;
    color: #ED64F5;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 8px;
    transition: background 0.3s;
}

.shrine-link:hover {
    background: #ED64F5;
    color: #08031A;
}

/* Production detail pages */
.back-link {
    display: inline-block;
    color: #ffcc66;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 20px;
    transition: color 0.3s;
}

.back-link:hover {
    color: #ffd97f;
}

.production-info {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin: 30px 0;
    align-items: start;
}

.production-poster {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.production-poster img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.production-poster iframe {
    width: 100%;
    height: 600px;
    display: block;
}

.production-details h2 {
    color: #ED64F5;
    margin-top: 0;
}

.production-details h3 {
    color: #ffcc66;
    margin-top: 15px;
    margin-bottom: 10px;
}

.production-details ul {
    list-style: none;
    padding: 0;
}

.production-details li {
    color: #fceaff;
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid rgba(237, 100, 245, 0.2);
    overflow-wrap: anywhere;
}

.production-details strong {
    color: #ffcc66;
}

.production-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.production-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}

.production-gallery img:hover {
    transform: scale(1.02);
}

@media only screen and (max-width: 800px) {
    .production-info {
        grid-template-columns: 1fr;
    }
    
    .production-poster {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media only screen and (max-width: 600px) {
    .production-info {
        gap: 16px;
        margin: 18px 0;
    }

    .production-poster {
        max-width: 240px;
        padding: 8px;
    }

    .production-details h3 {
        margin-top: 12px;
        margin-bottom: 8px;
    }

    .production-details li {
        margin: 6px 0;
        padding: 4px 0;
        font-size: 0.95rem;
    }

    .production-gallery {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media only screen and (max-width: 420px) {
    .back-link {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }

    .production-poster {
        max-width: 210px;
    }

    .production-details li {
        font-size: 0.9rem;
    }

    .production-gallery {
        margin: 14px 0;
    }
}

@media only screen and (max-width: 600px) {
    .gallery {
        justify-content: center;
        gap: 14px;
    }

    .poster-link {
        max-width: min(100%, 170px);
    }

    .poster-link p {
        font-size: 0.92rem;
    }

    .shrine-nav ul {
        gap: 10px;
    }

    .shrine-nav a {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        padding: 6px 10px;
    }

    .shrine-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media only screen and (max-width: 420px) {
    .poster-link {
        max-width: min(100%, 150px);
    }

    .poster-link p {
        font-size: 0.86rem;
    }

    .shrine-section {
        margin: 24px 0;
    }

    .shrine-image {
        height: 170px;
    }
}
