/* General Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

a {
    color: #E2C15C;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(180deg, #121212 0%, #2A2A2A 100%);
    color: #FFFFFF;
    touch-action: manipulation; /* Disable double-tap to zoom */
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: flex;
    position: fixed; /* Cover the whole screen */
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Dark overlay */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000; /* Ensure it's on top */
    transition: left 0.3s ease-in-out;
}

.mobile-menu-overlay.open {
    left: 0;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 32px;
    font-size: 48px;
    color: #FFFFFF;
    text-decoration: none;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
}

.mobile-menu-links a {
    font-weight: 700;
    font-size: 24px;
    color: #FFFFFF;
    text-decoration: none;
}

.container {
    max-width: 1440px; /* Max width for content */
    margin: 0 auto; /* Center the container */
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #121212; /* Added background color */
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-mobile {
    display: block; /* Show on mobile */
}

.nav-desktop {
    display: none; /* Hide on mobile */
}

.nav-menu-icon {
    width: 32px;
    height: 32px;
}

.nav-menu-icon img {
    width: 100%;
    height: 100%;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switcher a {
    font-weight: 700;
    font-size: 18px;
    margin: 0;
    text-decoration: none;
    color: #FFFFFF;
}

.lang-switcher a.active {
    color: #81815B;
}

/* Media Queries for PC version */
@media (min-width: 768px) {
    .navigation {
        padding: 34.79px 55.66px; /* Adjusted padding for PC */
    }

    .nav-mobile {
        display: none; /* Hide on PC */
    }

    .nav-desktop {
        display: flex; /* Show on PC */
        gap: 55.66px; /* Adjusted gap based on Figma */
    }

    .nav-desktop a {
        font-weight: 400;
        font-size: 18px;
        color: #FFFFFF;
        text-decoration: none;
    }

    .lang-switcher p {
        font-size: 24px; /* Adjusted font size for PC */
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    height: 335px; /* Height from Figma */
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 287px; /* Height from Figma */
    z-index: -1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.photo-container {
    position: absolute;
    top: 154px; /* Position from Figma */
    width: 181px;
    height: 181px;
    border-radius: 24px;
    box-shadow: 0px 5px 4px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.hero-text-container {
    position: absolute;
    top: 0;
    width: 100%;
    height: 169px; /* Height from Figma */
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, #202020 0%, rgba(134, 134, 134, 0) 100%);
}

.hero-text {
    font-weight: 900;
    font-size: 22px;
    line-height: 1.22em;
    text-align: center;
    max-width: 366px; /* Use max-width instead of width */
    width: 100%; /* Ensure it takes full width */
    text-shadow: 0px 2px 0px rgba(0, 0, 0, 1);
    margin: 0;
}

@media (min-width: 768px) {
    .hero-section {
        height: 960.3px; /* Adjusted for PC */
    }

    .hero-image-container {
        height: 960.3px; /* Adjusted for PC */
        border-bottom-left-radius: 24px;
        border-bottom-right-radius: 24px;
        overflow: hidden;
    }

    .hero-image {
        border-bottom-left-radius: 24px;
        border-bottom-right-radius: 24px;
    }

    .photo-container {
        width: 365.4px;
        height: 365.4px;
        border-radius: 48.45px;
        top: 480px; /* Adjusted for PC */
    }

    .hero-photo {
        border-radius: 40.375px;
    }

    .hero-text-container {
        height: 565.95px; /* Adjusted for PC */
    }

    .hero-text {
        font-size: 73.67px;
        max-width: 1225.67px; /* Use max-width instead of width */
        text-shadow: 0px 6.7px 0px rgba(0, 0, 0, 1);
    }
}

/* Projects Section */
.projects-section {
    padding: 0 32px 32px;
}

.project-title-link {
    text-decoration: underline;
    color: #E2C15C;
}


/* Single Post Hero */
.single-hero {
    width: 100%;
    height: 200px; /* Mobile height */
    background-size: cover;
    background-position: center;
    position: relative;
}

.single-hero-overlay {
    background: linear-gradient(180deg, #202020 0%, rgba(134, 134, 134, 0) 100%);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 32px;
}

.single-hero-title {
    font-weight: 900;
    font-size: 32px;
    color: #FFFFFF;
    text-shadow: 0px 2px 0px rgba(0, 0, 0, 1);
    margin: 0;
}

.post-logline {
    font-weight: 900;
    font-size: 24px;
    text-align: center;
    margin: 32px 32px 0;
}

.executive-summary-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.post-content .executive-summary-title {
    font-weight: 900;
    font-size: 24px;
    color: #E2C15C;
    text-align: center;
    margin: 0;
}

.summary-separator {
    height: 1px;
    background: linear-gradient(to right, rgba(153, 153, 153, 0.1) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(153, 153, 153, 0.1) 100%);
    border: none;
}

/* Executive Summary Shortcode */
.executive-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0;
}

.summary-item {
    background-color: transparent;
    border: 1px solid;
    border-radius: 28px;
    padding: 24px 26px;
}

.summary-item-1 {
    border-color: rgba(226, 92, 92, 0.5);
}

.summary-item-2 {
    border-color: rgba(226, 193, 92, 0.5);
}

.summary-item-3 {
    border-color: rgba(92, 226, 132, 0.5);
}

.summary-item-4 {
    border-color: rgba(92, 130, 226, 0.5);
}

.summary-item h4 {
    font-weight: 900;
    font-size: 18px;
    color: #E2C15C;
    margin: 0 0 8px 0;
}

.summary-item p {
    font-weight: 400;
    font-size: 16px;
    margin: 0;
}

.post-content {
    padding: 0 32px;
    margin-bottom: 42px;
}

.post-content h2,
.post-content h3 {
    color: #E2C15C;
}

.post-content h2 {
    font-weight: 700;
    font-size: 28px;
    margin-top: 48px;
}

.post-content h3 {
    font-weight: 700;
    font-size: 24px;
    margin-top: 32px;
}

.post-content p {
    font-size: 18px;
    line-height: 1.6;
}

.post-content li {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 10px; /* Add some space between list items */
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

@media (min-width: 768px) {
    .single-hero {
        height: 400px; /* Desktop height */
    }

    .single-hero-title {
        font-size: 64px;
    }

    .single-hero-logline {
        font-size: 32px;
    }

    .executive-summary {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .post-content {
        max-width: 800px;
        margin: 0 auto 42px;
        padding: 0;
    }
}

.projects-section h2 {
    font-weight: 600;
    font-size: 24px;
    margin-bottom: 32px;
    text-align: center;
    margin-top: 40px; /* Adjusted based on Figma */
}

.post-cards-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.post-card {
    background-color: #1C1C1C;
    border-radius: 14px;
    box-shadow: inset 0px -2px 4px rgba(186, 186, 186, 0.25);
    padding-bottom: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.featured-image-container {
    position: relative;
    width: 100%;
    height: 200px; /* Adjust as needed */
}

.featured-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    pointer-events: none; /* Allow clicks to pass through */
}

.post-card .featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

.post-card h3 {
    font-weight: 700;
    font-size: 24px;
    line-height: 1.22em; /* Added line-height */
    margin: 0;
    padding: 0 12px;
}

.hook-container {
    background-color: #43432F;
    padding: 12px 5px;
    max-width: 366px; /* Use max-width instead of width */
    width: 100%; /* Ensure it takes full width */
    text-align: center;
}

.hook-text {
    font-weight: 500;
    padding: 0px 12px;
    font-size: 16px;
    line-height: 1.22em;
    margin: 0;
}

.case-resume {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 330px; /* Use max-width instead of width */
    width: 100%; /* Ensure it takes full width */
}

.case-resume p {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.22em;
    margin: 0;
}

.separator {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, rgba(153, 153, 153, 0.1) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(153, 153, 153, 0.1) 100%);
    border: none;
}

.button-container {
    max-width: 330px; /* Use max-width instead of width */
    width: 100%; /* Ensure it takes full width */
    display: flex;
    justify-content: center;
    margin-top: auto;
}

.case-study-button {
    background-color: #FFFFFF;
    color: #000000 !important;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-family: 'Montserrat', sans-serif; /* Added this line */
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    width: 142px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

@media (min-width: 768px) {
    .projects-section h2 {
        font-size: 48px; /* Adjusted for PC */
        margin: 32px 0; /* Adjusted margin for PC */
    }

    .post-cards-container {
        flex-direction: row; /* Arrange in a row for PC */
        justify-content: center; /* Center the cards */
        gap: 36.57px; /* Adjusted gap for PC */
        align-items: stretch; /* Make cards same height */
    }

    .post-card {
        border-radius: 16px; /* Adjusted border-radius for PC */
        gap: 20.57px; /* Adjusted gap for PC */
        padding-bottom: 20.57px; /* Adjusted padding for PC */
    }

    .post-card h3 {
        font-size: 27.43px; /* Adjusted font size for PC */
    }

    .hook-container {
        width: 418.29px; /* Adjusted width for PC */
        border-radius: 8px;
    }

    .hook-text {
        font-size: 20.57px; /* Adjusted font size for PC */
    }

    .case-resume p {
        font-size: 18.29px; /* Adjusted font size for PC */
    }

    .case-study-button {
        border-radius: 11.43px; /* Adjusted border-radius for PC */
        width: 162.29px; /* Adjusted width for PC */
        height: 51.43px; /* Adjusted height for PC */
    }
}

/* Footer */
footer {
    background-color: #1C1C1C;
    padding: 26px 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Adjusted to align items to the start */
    gap: 16px;
}

.contact-info p {
    margin: 4px 0;
    font-size: 18px;
    font-weight: 700;
}

.contact-info p:nth-child(2) {
    font-weight: 400;
    font-size: 14px;
}

.contact-info p:last-child {
    color: #81815B;
    font-weight: 400;
    font-size: 14px;
}

.copyright {
    font-weight: 300;
    font-size: 12px;
    text-align: left; /* Adjusted text alignment */
    width: 100%; /* Ensure it takes full width */
}

.back-to-top {
    font-weight: 300;
    font-size: 14px;
    cursor: pointer;
    align-self: flex-end; /* Position to the right */
}

@media (min-width: 768px) {
    footer {
        padding: 26px 55.66px; /* Adjusted padding for PC */
        flex-direction: row; /* Arrange in a row for PC */
        justify-content: space-between; /* Distribute items */
        align-items: center; /* Center items vertically */
    }

    .contact-info {
        order: 1; /* Order for PC layout */
    }

    .copyright {
        order: 2; /* Order for PC layout */
        text-align: center; /* Center copyright for PC */
    }

    .back-to-top {
        order: 3; /* Order for PC layout */
        align-self: center; /* Center vertically */
    }
}

/* Post Card Title Link */
.post-card-title-link {
    text-decoration: none;
    color: inherit;
}

/* Image Gallery Shortcode */
.image-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

.image-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Centered Image from Markdown Render Hook */
.centered-image {
    text-align: center;
}

.centered-image img {
    display: block;
    margin: 12px auto; /* auto margins for horizontal centering */
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}


@media (min-width: 768px) {
    /* ... existing media queries ... */

    /* Image Gallery for Desktop */
    .image-gallery {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
    }

    .image-gallery p {
        flex: 1 1 0;
        margin: 0; /* Remove default paragraph margin */
    }

    .image-gallery p img {
        width: 100%;
        height: auto;
        display: block;
    }
}
