/*
Theme Name: ModelLink Child
Theme URI:
Description: Child theme for Powder - custom blocks and styles for ModelLink
Author: ModelLink
Author URI:
Template: powder-main
Version: 1.0
License: GNU General Public License v3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: modellink-child
*/

/* ==========================================================================
   DARK THEME - Matching modellink.se
   ========================================================================== */

/* Global dark background */
body,
.wp-site-blocks {
    background-color: #ffffff;
    color: #0a0a0a;
}

/* Sticky Header - transparent overlay */
header.wp-block-template-part,
.wp-block-template-part[data-slug="header"],
header[class*="header"],
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: transparent !important;
    transition: background 0.3s ease, transform 0.4s ease, opacity 0.4s ease;
}

/* Header hidden after 15% scroll */
.site-header.header-hidden,
header.wp-block-template-part.header-hidden,
.wp-block-template-part[data-slug="header"].header-hidden,
body.is-model-page .site-header.header-hidden,
body.is-model-page header.wp-block-template-part.header-hidden {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Header scroll state - transparent */
.site-header.scrolled {
    background: transparent;
}

/* Header navigation links */
.site-header .wp-block-navigation a,
.site-header .wp-block-site-title a,
.site-header .wp-block-navigation .wp-block-navigation-item__content {
}

/* Mobile overlay - transparent inner elements */
.wp-block-navigation__responsive-container.is-menu-open *:not(a):not(button):not(svg):not(path) {
    background-color: transparent !important;
    background: transparent !important;
}

/* Active menu item - underline (not in footer) */
.wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
    text-decoration: underline !important;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
    text-decoration-color: currentColor;
}

/* Remove active underline in footer */
footer .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.site-footer .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.site-footer-bar .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
footer.wp-block-template-part .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.wp-block-template-part[data-slug="footer"] .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
    text-decoration: none !important;
}

/* Hero Video - full viewport, behind header */
.hero-video {
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
}

.hero-video .wp-block-video,
.hero-video figure {
    margin: 0;
}

.hero-video video {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    display: block;
}

/* Models Section */
.models-section {
    background-color: #ffffff;
}

/* Runway Grid - 3 square videos */
.runway-grid {
    width: 100%;
    background-color: #ffffff;
}

.runway-grid .wp-block-columns {
    gap: 0 !important;
    margin: 0 !important;
}

.runway-grid .wp-block-column {
    padding: 0 !important;
    margin: 0 !important;
}

.runway-grid .wp-block-video,
.runway-grid figure {
    margin: 0 !important;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.runway-grid video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.runway-grid h4 {
    color: #0a0a0a;
    padding: 12px 16px 0;
}

.runway-grid p {
    padding: 0 16px 16px;
}

/* Covers Grid */
.covers-grid {
    background-color: #ffffff;
}

.covers-grid h4 {
    color: #0a0a0a;
}

/* Footer - dark */
.site-footer-bar {
    background-color: #0f0f0f;
}

.site-footer-bar a {
    color: #ffffff !important;
}

/* Footer top arrow */
.footer-top {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    margin-left: auto;
    font-size: 18px;
    line-height: 1;
}

/* Centered on mobile */
@media (max-width: 768px) {
    .covers-grid,
    .square-video {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ===== MODEL PAGES ===== */

/* Model page - sticky header */
body.is-model-page header.wp-block-template-part,
body.is-model-page .wp-block-template-part[data-slug="header"],
body.is-model-page .site-header {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    background: rgba(10, 10, 10, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Add padding to body on model page to compensate for fixed header */
body.is-model-page {
    padding-top: 80px;
}

/* Model Stats - sticky bottom bar */
.model-stats {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    z-index: 100;
}

/* Remove inner padding from the block wrapper */
.model-stats__inner {
    padding: 0 !important;
}

.model-stat {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    white-space: nowrap;
}

.model-stat span {
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.model-stat strong {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
}

/* Model name heading */
.namnmodel {
    text-transform: uppercase;
    line-height: 0.95;
    font-weight: 900;
}

.namnmodel.wp-block-post-title,
h1.namnmodel,
h2.namnmodel,
h3.namnmodel,
h4.namnmodel,
h5.namnmodel,
h6.namnmodel {
    display: block !important;
    white-space: normal !important;
}

.namnmodel a {
    display: inline-block !important;
    white-space: normal !important;
}

.namnmodel__first,
.namnmodel__rest {
    display: block;
    font-weight: 900;
}

/* Model page - paired images (modelpic2) */
.wp-block-columns.modelpic2 {
    justify-content: center;
    align-items: stretch;
    gap: clamp(16px, 3vw, 40px);
}

.wp-block-columns.modelpic2 > .wp-block-column {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.wp-block-columns.modelpic2 figure.wp-block-image {
    width: min(420px, 100%);
    aspect-ratio: 3 / 4;
    overflow: hidden;
    margin: 0 auto !important;
}

.wp-block-columns.modelpic2 figure.wp-block-image img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

@media (max-width: 781px) {
    .wp-block-columns.modelpic2 {
        flex-direction: column;
        align-items: center;
    }

    .wp-block-columns.modelpic2 figure.wp-block-image {
        width: min(520px, 100%);
    }
}

/* Model Sidebar - fixed vertical overlay on left */
.model-sidebar,
.wp-block-template-part[data-slug="sidebar"] {
    position: fixed !important;
    left: 0 !important;
    top: auto;
    bottom: auto;
    z-index: 500;
    width: 40px !important;
    max-height: 250px;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px;
    padding: 15px 8px 10px !important;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    min-height: 0 !important;
}

.model-sidebar.sidebar-visible {
    opacity: 1;
}

.model-sidebar * {
    pointer-events: auto;
}

/* Social icon styling */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon svg {
    width: 20px;
    height: 20px;
    fill: #0a0a0a;
    transition: opacity 0.2s ease;
}

.social-icon:hover svg {
    opacity: 0.5;
}

/* Instagram icon wrapper - vertical layout */
.instagram-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.instagram-icon-wrapper .social-icon {
    transform: none;
}

.instagram-model-name {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0a0a0a;
    white-space: nowrap;
}

/* Model Stats Bar - fixed bottom */
.model-stats-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    z-index: 1001;
}

.model-stats-bar .model-stat {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    white-space: nowrap;
}

.model-stats-bar .model-stat-label {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.model-stats-bar .model-stat-value {
    font-size: 0.6rem;
    font-weight: 700;
    color: #ffffff;
}

/* Black logo on model page */
body.is-model-page .wp-block-site-logo img {
    filter: brightness(0) !important;
}

/* ===== BLOG PAGE ===== */

/* Blog header - force black on everything */
.site-header--blog,
.site-header--blog *,
.site-header--blog a,
.site-header--blog [style*="color"],
.site-header--blog .wp-block-navigation,
.site-header--blog .wp-block-navigation[style] {
    color: #000000 !important;
    fill: #000000 !important;
    stroke: #000000 !important;
}

/* Override: let overlay menu use its own colors */
.site-header--blog .is-menu-open,
.site-header--blog .is-menu-open *,
.site-header--blog .is-menu-open a {
    color: #ffffff !important;
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

.site-header--blog a:hover {
    color: #22c55e !important;
}

/* Header scroll detection script loaded via functions.php */
