/*
Theme Name: Monnattpat Theme
Author: Gemini CLI
Description: A high-fidelity clone of the Peter McKinnon aesthetic.
Version: 1.1
*/

:root {
    --bg-color: #000;
    --text-color: #fff;
    --accent-color: #555;
    --font-main: 'Sukhumvit Set', 'Sukhumvit Tadmai', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(0,0,0,0.9);
    padding: 8px 50px;
}

.logo a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* Hamburger Icon (Hidden on Desktop) */
.hamburger {
    display: none;
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Navigation (Desktop Default) */
#nav-overlay ul.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

#nav-overlay ul.main-menu li {
    margin-left: 30px;
}

#nav-overlay ul.main-menu li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#nav-overlay ul.main-menu li a:hover,
#nav-overlay ul.main-menu li a.active {
    opacity: 1;
}

#nav-overlay ul.main-menu li.menu-item-128 a {
    opacity: 1;
}

#nav-overlay ul.main-menu li.menu-item-127 a {
    color: #ff0000;
    opacity: 1;
}

/* Hide filters on VoiceOver page */
.page-id-125 .filter-link {
    display: none !important;
}

/* Nav Overlay (Mobile Only via Media Query) */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    #nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0,0,0,0.95);
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
        z-index: 1000;
    }

    #nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    #nav-overlay ul.main-menu {
        flex-direction: column;
    }

    #nav-overlay ul.main-menu li {
        margin: 20px 0;
        margin-left: 0;
    }

    #nav-overlay ul.main-menu li a {
        font-size: 1.5rem;
        font-weight: 800;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    header {
        padding: 15px 30px;
    }
}

body.menu-open {
    overflow: hidden;
}

/* Main Content Layout */
main {
    padding-top: 60px;
}

/* Portfolio Grid */
.portfolio-container {
    padding: 4px;
    background-color: var(--bg-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 4px;
}

@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    header {
        padding: 15px 30px;
    }
    #nav-overlay ul li a {
        font-size: 1.5rem;
    }
}

.portfolio-item,
.vo-item {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background-color: #111;
    display: block;
    text-decoration: none;
}

.portfolio-item img,
.vo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.portfolio-item:hover img,
.vo-item:hover img {
    transform: none;
}

.portfolio-item .info,
.vo-item .info {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    padding: 6px 15px;
    background: rgba(0,0,0,0.33);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.5s ease;
    white-space: nowrap;
}

.portfolio-item:hover .info,
.vo-item:hover .info {
    opacity: 1;
}

.portfolio-item .info h2,
.vo-item .info h2 {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0;
    color: #fff;
    text-align: center;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoom 0.3s ease-out;
}

@keyframes zoom {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close:hover {
    color: #bbb;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 60px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: 0.3s;
    opacity: 0.5;
}

.nav-btn:hover {
    opacity: 1;
    background-color: rgba(0,0,0,0.5);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.portfolio-item {
    cursor: pointer;
}

/* Responsive Iframes */
.entry-content iframe {
    max-width: 100%;
    display: block;
    margin: 20px auto;
}

.page-content {
    grid-column: 1 / -1;
    padding: 100px 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.page-content h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    letter-spacing: 0.1em;
}

/* Footer */
footer {
    padding: 100px 50px;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.social-links {
    margin-bottom: 40px;
}

.social-links a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    opacity: 1;
}

.copyright {
    font-size: 0.7rem;
    opacity: 0.4;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
