@font-face {
    font-family: 'Parastoo';
    src: url('fonts/Parastoo-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'Parastoo';
    src: url('fonts/Parastoo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Parastoo';
    src: url('fonts/Parastoo-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Parastoo';
    src: url('fonts/Parastoo-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Parastoo';
    src: url('fonts/Parastoo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

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

body, html {
    font-family: 'Parastoo', serif;
    overflow-x: hidden;
}

body {
    background-color: #000;
}

.header-container {
    position: relative;
    width: 100vw;
    height: 143px;
}

.post-page .header-container {
    width: 100vw;
    height: auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-repeat {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 143px;
    background-image: url('assets/header-repeat-x.png');
    background-repeat: repeat-x;
    background-position: top center;
    background-size: auto 153px;
    z-index: 1;
}

.video-container {
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.video {
    max-width: 1024px;
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    object-fit: contain;
}

.text-overlay {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    max-width: 100%;
    height: 107px;
}

.text-overlay-block {
    max-width: 100%;
    height: 100px;
    margin: 1em auto;
    display: block;
}

.back-to-home-button.bth-fixed {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%) scale(-1, 1);
    display: inline-block;
    text-decoration: none;
    width: 80px;
    height: 80px;
    line-height: 0;
}

.back-to-home-button.bth-inline {
    transform: translateX(-16px) translateY(20px) scale(-1, 1);
    display: inline-block;
    text-decoration: none;
    width: 80px;
    height: 80px;
    line-height: 0;
}

.back-to-home-button * {
    cursor: pointer;
}

.back-to-home-button svg {
    display: block;
    width: 80px;
    height: 80px;
}

.back-to-home-button .button-circle {
    transition: fill 0.4s ease;
}

.back-to-home-button .button-shadow {
    opacity: 1;
}

.back-to-home-button .button-hover {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.back-to-home-button:hover .button-hover {
    opacity: 1;
}

.back-to-home-button .button-arrow {
    transform-origin: center;
    transition: transform 0.3s ease;
}

.back-to-home-button .button-arrow rect,
.back-to-home-button .button-arrow polygon {
    fill: white;
}

.back-to-home-button:hover .button-arrow {
    transform: translate(-3px, 0) scale(1.5);
}

.back-to-home-button:focus {
    outline: none;
}

.back-to-home-button:focus-visible {
    outline: 3px solid #88d448;
    outline-offset: 4px;
    border-radius: 50%;
}

.header-fade-left {
    position: absolute;
    top: 0;
    left: calc(50% - 540px);
    width: 107px;
    height: 143px;
    background-image: url('assets/header-fade-left.png');
    background-repeat: no-repeat;
    background-position: left top;
    background-size: 100% 100%;
    z-index: 4;
}

.header-fade-right {
    position: absolute;
    top: 0;
    left: calc(50% + 470px);
    width: 107px;
    height: 143px;
    background-image: url('assets/header-fade-right.png');
    background-repeat: no-repeat;
    background-position: right top;
    background-size: 100% 100%;
    z-index: 4;
}

/* Main content structure */
.main-content {
    background-color: #fff;
    position: relative;
    z-index: 1;
}

.content-section {
    _padding: 80px 0;
}

.carousel-section {
    padding: 0;
}

.carousel-container {
    position: relative;
    width: 100vw;
    display: flex;
    align-items: stretch;
    justify-content: center;
    height: 500px;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    align-items: stretch;
    justify-content: center;
    position: relative;
    width: 100%;
}

.carousel-item {
    flex-shrink: 0;
    transition: transform 0.5s ease;
    display: flex;
    align-items: stretch;
}

.carousel-item.center {
    z-index: 3;
    width: 700px;
    flex-shrink: 0;
}

.carousel-item.left {
    z-index: 1;
    flex: 1;
    justify-content: flex-end;
}

.carousel-item.right {
    z-index: 1;
    flex: 1;
    justify-content: flex-start;
}

/* Post detail page specific styling */
body.post-page .carousel-item.right {
    background-position: right top;
}

.central-content {
    width: 100%;
    padding: 60px 40px;
    background-color: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.carousel-image {
    height: 500px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
}

.carousel-item.left .carousel-image {
    width: 100%;
    min-width: 400px;
}

.carousel-item.right .carousel-image {
    width: 100%;
    min-width: 400px;
}

.carousel-image:hover {
    transform: scale(1.02);
}

.left-content {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    align-items: stretch;
    gap: 60px;
    min-height: 500px;
}

.left-content .text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 70%);
    color: #000;
}

.left-content .image-content {
    flex: 1;
    text-align: center;
    display: flex;
    align-items: stretch;
}

.right-content {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    align-items: stretch;
    gap: 60px;
    min-height: 500px;
    flex-direction: row-reverse;
}

.right-content .text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(225deg, #f8f8f8 0%, #ffffff 70%);
    color: #000;
}

.right-content .image-content {
    flex: 1;
    text-align: center;
    display: flex;
    align-items: stretch;
}

.divider-section {
    width: 100%;
    padding: 60px 0;
    background-color: #003b6f;
    text-align: center;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top: 2px solid #194e7d;
    border-bottom: 2px solid #00223f;
}

.footer-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 60px 40px;
    font-family: 'Parastoo', serif;
}

.footer-nav {
    margin-bottom: 40px;
}

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

.footer-nav li {
    position: relative;
}

.footer-nav li::before {
    content: "•";
    color: #fff;
    font-size: 1.2em;
    margin-right: 12px;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.4em;
    font-weight: 400;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #3498db;
}

.copyright {
    font-size: 0.9em;
    color: #bbb;
    margin: 0;
    font-weight: 300;
    text-align: center;
}

/* Page content styling */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    margin-bottom: 4rem;
}

.page-content .text-content {
    background: none;
    padding: 0;
}

.page-content h1 {
    font-size: 2.5em;
    margin-bottom: 1em;
    color: #2c3e50;
}

.page-content h2 {
    font-size: 1.8em;
    margin: 1.5em 0 0.8em 0;
    color: #34495e;
}

.page-content p + h2 {
    margin-top: 3rem;
}

.page-content p {
    font-size: 1.4rem;
    line-height: 1.4rem;
    margin-bottom: 1.2em;
    color: #2c3e50;
}

.page-content ul {
    margin: 1em 0 1.5em 2em;
}

.page-content li {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 0.5em;
    color: #2c3e50;
}

.page-content blockquote.other-voice {
    margin-top: 1em;
    font-style: italic;
    text-align: right;
    margin-bottom: 1em;
}

.page-content p.end-line {
    margin-top: 2em;
    text-indent: 0;
}

/* Contact Form Styles */
.contact-form {
    max-width: 600px;
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e6ed;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background-color: #2c3e50;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #34495e;
}

.submit-btn:active {
    transform: translateY(1px);
}

/* Typography */
h1, h2, h3 {
    font-family: 'Parastoo', serif;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5em;
    line-height: 1.2;
}

h2 {
    font-size: 2em;
    line-height: 1.3;
}

h3 {
    font-size: 1.5em;
    line-height: 1.4;
}

p {
    font-family: 'Parastoo', serif;
    font-size: 1.2em;
    line-height: 1.3;
    margin-bottom: 20px;
}

.placeholder-image {
    width: 100%;
    height: 300px;
    background-color: #ddd;
    border: 2px dashed #999;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.2em;
}

.banner--the-institute {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    pointer-events: none;
    position: relative;
}

.banner-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2em;
    line-height: 1.1em;
    font-weight: 600;
    text-align: center;
    z-index: 10;
    pointer-events: none;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    font-family: 'Parastoo', serif;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    filter: blur(8px);
    opacity: 0.6;
}

.image--ep1-chp1 {
    background: url(assets/teowad-ep1-chp-1-1-8b.png) no-repeat;
    background-position: left center;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    background-size: 600px auto;
}

.image--onaia-map {
    background: url(assets/onaia-map-parchment-66p.jpg) no-repeat;
    background-position: right center;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    background-size: 1000px auto;
}

/* Post typography styles */
.text-content h2 {
    font-family: 'Parastoo', serif;
    font-size: 2.4em;
    font-weight: 600;
    margin: 0 0 0.5em 0;
    line-height: 1.2;
    color: #2c3e50;
    padding-top: 1em;
}

.text-content h2 a {
    color: inherit;
    text-decoration: none;
}

.text-content h2 a:hover {
    color: #3498db;
}

.text-content h3 {
    font-family: 'Parastoo', serif;
    font-size: 1.4em;
    font-weight: 500;
    margin: 0 0 1em 0;
    color: #34495e;
    font-style: italic;
}

.post-meta {
    font-family: 'Parastoo', serif;
    font-size: 1.0em;
    color: #7f8c8d;
    margin: 0 0 1.5em 0;
    font-weight: 400;
}

.post-meta .publish-date,
.post-meta .author {
    margin-right: 1em;
}

.post-excerpt {
    font-family: 'Parastoo', serif;
    font-size: 1.4em;
    line-height: 1.4;
    color: #2c3e50;
    margin: 0 0 1.5em 0;
    font-weight: 400;
}

.read-more-button {
    display: inline-block;
    text-decoration: none;
    width: 80px;
    height: 80px;
    line-height: 0;
}

.read-more-button * {
    cursor: pointer;
}

.read-more-button svg {
    display: block;
    width: 80px;
    height: 80px;
}

.read-more-button .button-circle {
    transition: fill 0.4s ease;
}

.read-more-button .button-shadow {
    opacity: 1;
}

.read-more-button .button-hover {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.read-more-button:hover .button-hover {
    opacity: 1;
}

.read-more-button .button-arrow {
    transform-origin: center;
    transition: transform 0.3s ease;
}

.read-more-button .button-arrow rect,
.read-more-button .button-arrow polygon {
    fill: white;
}

.read-more-button:hover .button-arrow {
    transform: translate(-3px, 0) scale(1.5);
}

.read-more-button:focus {
    outline: none;
}

.read-more-button:focus-visible {
    outline: 3px solid #88d448;
    outline-offset: 4px;
    border-radius: 50%;
}

.text-content p {
    margin: 0;
    padding: 0;
}

.text-content p + p {
    text-indent: 1.5em;
}

/* Post content max-width */
.post-content {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.post-content p {
    font-size: 1.4em;
    line-height: 1.4;
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em auto;
}

/* Post tags styling */
.post-tags {
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px solid #e0e0e0;
}

.post-tags strong {
    font-family: 'Parastoo', serif;
    color: #666;
    margin-right: 0.5em;
    font-size: 0.95em;
}

.tag {
    display: inline-block;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
    color: #555;
    padding: 0.4em 1em;
    margin: 0.25em 0.5em 0.25em 0;
    border-radius: 20px;
    font-family: 'Parastoo', serif;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid #d0d0d0;
    transition: all 0.2s ease;
}

.tag:hover {
    background: linear-gradient(135deg, #e8e8e8 0%, #d8d8d8 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-content img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

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

.image--inspector-webb {
    background: url('assets/focus-inspector-webb.jpg') no-repeat;
    background-size: cover;
    height: 100%;
    width: 100%;
    flex: 1;
}

/* Post-specific header styles */
.post-header-container {
    position: relative;
    width: 100vw;
    height: 200px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.post-header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/header-fade-left.png') no-repeat center;
    background-size: cover;
    opacity: 0.3;
    z-index: 1;
}

.post-nav {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
}

.home-link {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.home-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.post-title-overlay {
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 80%;
}

.post-title-overlay h1 {
    font-size: 2.5em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.post-subtitle {
    font-size: 1.2em;
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-weight: normal;
}

/* Post divider bar */
.post-divider-bar {
    width: 100%;
    height: 20px;
    background-color: #013B70;
}

/* Other Posts Carousel */
.other-posts-carousel {
    background-color: #000;
    padding: 40px 0;
    overflow: hidden;
}

.carousel-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 20px 40px;
}

.carousel-header h2 {
    color: #fff;
    font-size: 2em;
    margin: 0;
}

.carousel-scroll {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 0 40px 20px 40px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.carousel-scroll::-webkit-scrollbar {
    height: 8px;
}

.carousel-scroll::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.carousel-scroll::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.carousel-scroll::-webkit-scrollbar-thumb:hover {
    background: #666;
}

.carousel-card {
    flex: 0 0 300px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.carousel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.carousel-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #0f3460;
}

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

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

.carousel-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.carousel-card-content h3 {
    color: #fff;
    font-size: 1.3em;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.carousel-card-subtitle {
    color: #bbb;
    font-size: 0.95em;
    margin: 0 0 10px 0;
    font-style: italic;
}

.carousel-card-date {
    color: #888;
    font-size: 0.85em;
    margin-top: auto;
}

/* Hide header repeat on screens smaller than 1024px */
@media (max-width: 1023px) {
    .header-repeat {
        display: none;
    }

    .post-header-container {
        height: 150px;
    }

    .post-title-overlay h1 {
        font-size: 2em;
    }

    .left-content, .right-content {
        flex-direction: column;
        text-align: left;
    }

    .right-content {
        flex-direction: column;
    }

    .carousel-scroll {
        padding: 0 20px 20px 20px;
    }

    .carousel-card {
        flex: 0 0 250px;
    }

    .right-content .text-content,
    .left-content .text-content {
        padding: 0;
        padding-top: 30px;
    }

    .read-more-button {
        width: 60px;
        height: 60px;
    }
    .read-more-button svg {
        width: 60px;
        height: 60px;
    }
}

/* Post Header Section Styling */
.post-header-section {
    background-color: #e8e8e8;
    padding: 40px 0;
    margin-bottom: 0;
}

.post-header-section .central-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    background-color: transparent;
    color: #000;
}

.post-header-section h1 {
    color: #000;
    font-size: 3.5em;
    margin: 0;
    line-height: 1.2;
}

.post-header-section .post-subtitle {
    color: #333;
    font-size: 1.5em;
    font-weight: normal;
    margin: 0 0 0 0;
    line-height: 1.4;
}

.post-header-section .post-meta {
    color: #ff6b35;
    font-size: 1.2em;
    margin-top: 1em;
}

.post-header-section .post-meta .publish-date,
.post-header-section .post-meta .author {
    color: #ff6b35;
}

.post-header-section .post-meta .author::before {
    content: " • ";
    margin: 0 0.5em;
}