/*
Theme Name: Ayla Portfolio
Author: Custom
Version: 1.0
*/

/* CSS Reset & Basic Styling */
* , *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4 L4 23 L9.5 18 L14 26 L17 24 L12 16.5 L20 16.5 Z' fill='%23ff3374'/%3E%3C/svg%3E") 4 4, auto;
}

html, body {
    background-color: #000000;
    color: #ffffff;
    font-family: sans-serif; /* Update later with correct Figma font */
    overflow-x: hidden;
}

a, button, [role="button"], .project-card, .square-icon, .back-btn, .lightbox-close, .project-images img {
    cursor: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4 L4 23 L9.5 18 L14 26 L17 24 L12 16.5 L20 16.5 Z' fill='%23ff3374'/%3E%3C/svg%3E") 4 4, pointer;
}

a {
    color: #ffffff;
    text-decoration: none;
}

a:hover {
    color: #ff3374; /* Adjust to match the pink active state */
}

/* --- Site Layout --- */
.site-layout {
    display: flex;
    min-height: 100vh;
    padding-left: 480px;
}

/* Left Sidebar */
.sidebar {
    width: 280px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    padding: 60px 0;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.brand-name {
    position: fixed;
    left: 20px;
    top: 0;
    height: 100vh;
    width: auto;
    font-family: 'Crushed', cursive;
    font-size: 13.8vh;
    font-weight: 400;
    color: #1E1E1E;
    white-space: nowrap;
    z-index: -1;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2vh 40px;
    align-items: center;
    letter-spacing: 0;
}

.brand-name span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 4.8vh;
    transform: rotate(90deg);
    margin: 0;
}

.brand-name span.space {
    height: 1vh;
}

.navigation-menu {
    margin-top: 100px;
    padding-left: 30px;
}

.filters {
    list-style: none;
    margin-bottom: 30px;
}

.filters li {
    margin-bottom: 0;
}

.filters li a,
.page-links li a {
    font-family: 'TW Cen MT', 'Tw Cen MT', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1;
    color: #DFDFDF;
    transition: color 0.3s, letter-spacing 0.3s;
    display: inline-block;
    transform-origin: left center;
}

.filters li.active a,
.page-links li.active a {
    color: #ff3374;
    font-family: 'Impact', Charcoal, sans-serif;
    letter-spacing: 1px;
}

.filters li a:hover,
.page-links li a:hover {
    color: #DFDFDF;
    font-family: 'Impact', Charcoal, sans-serif;
    letter-spacing: 1px;
}

.filters li.active a:hover,
.page-links li.active a:hover {
    color: #ff3374;
}

.page-links {
    list-style: none;
}

.page-links li {
    margin-bottom: 0;
}


/* Right Side: Grid */
.projects-container {
    flex: 1;
    max-width: 1400px;
    margin-left: auto;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: #000;
    padding: 0;
    gap: 8px;
    align-items: start;
    align-content: start;
    direction: rtl;
}

.project-card {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    filter: grayscale(100%);
    transition: filter 0.5s ease, opacity 0.4s ease, transform 0.4s ease;
    margin: 0;
    overflow: hidden;
    opacity: 1;
    transform: scale(1);
    will-change: transform, opacity;
    direction: ltr;
}

.project-card.is-hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.project-card:hover {
    filter: grayscale(0%);
}

.card-inner {
    position: absolute;
    bottom: 20px;
    right: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .card-inner {
    opacity: 1;
}

.card-inner h2 {
    font-family: 'Impact', Charcoal, sans-serif;
    font-size: 2rem;
    font-weight: 400;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* --- Single Project Layout --- */
.single-project-container {
    padding: 0;
    max-width: 100%;
    margin: 0;
}

.single-project-layout {
    display: flex;
    gap: 0;
    min-height: 100vh;
}

.project-images img {
    transition: transform 0.3s ease;
}

.project-images img:hover {
    transform: scale(1.05);
}

.project-images {
    flex: 3;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    justify-content: flex-start;
}

.main-project-image {
    overflow: hidden;
}

.main-project-image img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block;
}

.project-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
}

.project-gallery img,
.project-gallery video {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block;
}

/* Gutenberg Gallery adjustments */
.wp-block-gallery {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: start;
}

.wp-block-image {
    width: 100% !important;
    margin: 0 !important;
    overflow: hidden;
}

.wp-block-image img,
.wp-block-video video {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block;
}

.project-info {
    flex: 0 0 400px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    max-height: 100vh;
    min-width: 0;
    padding: 15vh 60px 60px;
    background: #000;
    overflow-y: auto;
}

.project-info h1 {
    font-family: 'Impact', Charcoal, sans-serif;
    font-size: 56px;
    font-weight: 400;
    color: #DFDFDF;
    margin-bottom: 20px;
    line-height: 1;
    letter-spacing: 0;
}

.project-description {
    font-family: 'TW Cen MT', 'Tw Cen MT', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.2;
    color: #DFDFDF;
    margin-bottom: 40px;
    text-align: justify;
    letter-spacing: 0;
}

.back-btn {
    font-family: 'TW Cen MT', 'Tw Cen MT', sans-serif;
    font-size: 28px;
    margin-top: 0;
    align-self: center;
    font-weight: 400;
    line-height: 1.2;
    text-transform: none;
    transition: color 0.3s, letter-spacing 0.3s;
    text-align: center;
    display: inline-block;
    color: #DFDFDF;
}

.back-btn:hover {
    font-family: 'Impact', Charcoal, sans-serif;
    letter-spacing: 1px;
}

/* --- Info Page Styling --- */
.info-page-container {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding-left: 20px; /* Reduced to allow proper centering in viewport */
    padding-right: 20px; /* Symmetrical padding for horizontal centering */
    padding-top: 40vh;
    padding-bottom: 60px;
}

.info-text-wrapper {
    display: block;
    width: 440px; /* Reduced from 520px as it was "too wide" */
    max-width: 100%; /* Only scale when borders are about to touch */
    padding: 0;
    z-index: 5;
    margin: 0;
}

.info-text-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

.info-hello {
    margin-bottom: 20px;
}

.info-hello > * {
    font-family: 'Crushed', cursive;
    font-size: 2.5rem;
    line-height: 1;
    color: inherit;
    margin: 0;
}

.info-hello img {
    max-width: 400px;
    height: auto;
    display: block;
}

.info-description {
    font-family: 'TW Cen MT', 'Tw Cen MT', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    color: #DFDFDF;
    letter-spacing: 0;
}

/* Support for Custom HTML blocks with text wrapping */
.wrapped-text-container {
    font-family: 'TW Cen MT', 'Tw Cen MT', sans-serif !important;
    font-size: 15px !important;
    color: #a9a9a9;
    line-height: 1.4;
}

.wrapped-text-container p {
    font-family: 'TW Cen MT', 'Tw Cen MT', sans-serif !important;
    font-size: 15px !important;
    color: #a9a9a9 !important;
    text-align: justify;
    margin: 0;
}

.info-links-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
    clear: both;
    padding: 0 40px; /* Added padding to keep social labels within the text bounds */
}

.info-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.info-link-label {
    font-size: 0.9rem;
    font-family: 'Crushed', cursive;
    color: #888;
    white-space: nowrap;
}

.square-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
    transition: transform 0.3s;
}

.square-icon:hover {
    transform: scale(1.1);
}

.square-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Lightbox Styles --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ff3374;
}

/* --- Footer Styling --- */
.site-footer {
    position: relative;
    z-index: 100; /* Ensure it's on top of the background name and sidebar */
    width: 100%;
}

.footer-pink-bar {
    background-color: #ff3374;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 40px;
}

.footer-name {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-family: 'TW Cen MT', 'Tw Cen MT', sans-serif;
}

.footer-socials {
    position: absolute;
    right: 40px;
    display: flex;
    gap: 15px;
}

.social-link img {
    width: 32px;
    height: 32px;
    display: block;
    object-fit: cover;
    border-radius: 4px;
}

/* --- Mobile Menu Styles (Base) --- */
.site-header {
    display: none;
}

.mobile-menu-overlay {
    display: none;
}

/* --- Mobile Media Queries --- */
@media screen and (max-width: 768px) {
    /* Layout Adjustments */
    .site-layout {
        padding-left: 0;
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 100px 20px 20px;
        display: block;
        z-index: 5;
    }

    .sidebar .brand-name, 
    .sidebar .page-links {
        display: none !important;
    }

    .navigation-menu {
        margin-top: 0;
        padding-left: 0;
    }

    .filters {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        margin-bottom: 0;
    }

    .filters li a {
        font-size: 1.2rem;
    }

    /* Header & Burger Menu */
    .site-header {
        display: flex;
        justify-content: flex-end;
        padding: 40px 20px 0;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: transparent;
        z-index: 1000;
        pointer-events: none;
    }

    .admin-bar .site-header {
        top: 32px;
    }

    @media screen and (max-width: 782px) {
        .admin-bar .site-header {
            top: 46px;
        }
    }

    .burger-menu {
        width: 30px;
        height: 25px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        pointer-events: auto;
    }

    .burger-menu span {
        display: block;
        width: 100%;
        height: 5px;
        background-color: #DFDFDF;
        border-radius: 10px;
    }

    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ff3374;
        z-index: 2000;
        display: none;
    }

    .admin-bar .mobile-menu-overlay {
        top: 32px;
    }

    @media screen and (max-width: 782px) {
        .admin-bar .mobile-menu-overlay {
            top: 46px;
        }
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    .menu-close {
        position: absolute;
        top: 40px;
        right: 20px;
        font-size: 50px;
        color: #fff;
        cursor: pointer;
        line-height: 1;
        z-index: 2001;
    }

    .mobile-menu-container {
        display: flex;
        height: 100%;
        width: 100%;
    }

    .brand-name-mobile {
        width: 8.5vh;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 3vh 0;
        align-items: center;
        color: #ff5c90;
        font-family: 'Crushed', cursive;
        font-size: 12vh;
        letter-spacing: 0;
        white-space: nowrap;
        pointer-events: none;
    }

    .brand-name-mobile span {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 3.8vh;
        transform: rotate(90deg);
        margin: 0;
    }

    .brand-name-mobile span.space {
        height: 1vh;
    }

    .mobile-navigation {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-right: 20px;
    }

    .mobile-page-links {
        list-style: none;
        text-align: right;
        padding: 0;
    }

    .mobile-page-links li {
        margin-bottom: 30px;
    }

    .mobile-page-links li a {
        font-family: 'TW Cen MT', sans-serif;
        font-size: 2.2rem;
        color: #DFDFDF;
        font-weight: 400;
        line-height: 1;
    }

    /* Projects Container */
    .projects-container {
        grid-template-columns: 1fr;
        padding: 0 0 20px;
        gap: 8px;
        width: 100%;
        margin-left: 0;
        direction: ltr;
    }

    .project-card {
        aspect-ratio: 1 / 1;
        filter: grayscale(100%) !important;
    }

    .project-card .card-inner {
        opacity: 0 !important;
        bottom: 10px;
        right: 10px;
    }

    .project-card .card-inner h2 {
        font-size: 1.5rem;
    }

    /* Single Project Page */
    .single-project-layout {
        flex-direction: column-reverse;
    }

    .project-info {
        flex: none;
        width: 100%;
        position: relative;
        padding: 100px 30px 40px;
        max-height: none;
        overflow: visible;
        text-align: left;
    }

    .project-info h1 {
        font-size: 40px;
    }

    .back-btn {
        display: none !important;
    }

    .project-description {
        font-size: 16px;
        text-align: justify;
    }

    .project-images {
        flex: none;
        width: 100%;
        padding: 0;
    }

    .wp-block-gallery {
        grid-template-columns: 1fr !important;
    }
    
    .wp-block-image img,
    .wp-block-video video {
        width: 100% !important;
    }

    /* Info Page */
    .info-page-container {
        padding-top: 100px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .info-text-wrapper {
        width: 100%;
        margin: 0 auto;
    }

    .info-hello > * {
        font-size: 1.8rem;
    }
    
    .info-hello img {
        max-width: 100%;
    }

    .info-links-row {
        padding: 0;
        gap: 10px;
        margin-top: 30px;
    }

    .info-link-label {
        font-size: 0.75rem;
    }

    /* Footer */
    .footer-socials {
        display: none !important;
    }

    .footer-pink-bar {
        justify-content: center;
        padding: 0 20px;
    }
}