/*
Theme Name: Luxicasa Theme
Theme URI: https://luxicasa.com
Author: Luxicasa Dev
Description: Custom built theme. No parent. Absolute authority.
Version: 2.0.1
*/

:root {
    /* --- COLOR PALETTE --- */
    --color-bg: #fcfcfc;
    --color-surface: #ffffff;
    --color-text-main: #000000; /* Punched up from #1a1a1a for maximum contrast */
    --color-text-muted: rgba(0, 0, 0, 0.5); /* Blends perfectly on any background */
    --color-border: rgba(0, 0, 0, 0.1); /* Architectural hairlines */
    --color-accent: #000000;
    --color-error: #d32f2f;
    --color-success: #2e7d32;

    /* --- TYPOGRAPHY --- */
    --font-serif: "Playfair Display", "Didot", "Bodoni MT", serif;
    --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;

    /* --- FLUID TYPOGRAPHY SCALE --- */
    --text-xs: 10px;
    --text-sm: 13px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 22px;
    --text-2xl: clamp(1.5rem, 3vw, 2rem);
    --text-3xl: clamp(2rem, 4vw, 3rem);
    --text-4xl: clamp(2.5rem, 5vw, 4rem);
    --text-5xl: clamp(3.5rem, 7vw, 6rem); /* Massive editorial scale */

    /* --- ARCHITECTURAL SPACING SCALE --- */
    --space-3xs: 4px;
    --space-2xs: 8px;
    --space-xs: 12px;
    --space-sm: 20px;
    --space-md: 32px;
    --space-lg: 48px;
    --space-xl: 80px;
    --space-2xl: 120px;
    --space-3xl: clamp(80px, 12vw, 160px); /* The missing variable for fluid section gaps! */

    /* --- SHARP GEOMETRY --- */
    --radius-sm: 2px;
    --radius-md: 0px; /* Forced sharp for 2026 standard */
    --radius-lg: 0px; 
    --radius-full: 9999px; /* Kept for specific UI dots */

    /* --- SHADOWS --- */
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 15px 40px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 30px 60px rgba(0, 0, 0, 0.12);

    /* --- CONTAINERS --- */
    --container-width: 1400px;
    --container-padding: 40px;
    
    /* --- MICRO-INTERACTIONS --- */
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.6s cubic-bezier(0.19, 1, 0.22, 1); /* Cinematic easing */
}

/* --- GLOBAL RESETS --- */
html {
    box-sizing: border-box;
    font-size: 16px;
}

*, *:before, *:after {
    box-sizing: inherit;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.1; /* Tightened from 1.2 for editorial headlines */
    margin: 0 0 var(--space-xs) 0;
    color: var(--color-text-main);
}

p {
    margin: 0 0 var(--space-sm) 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

img, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* --- LENIS SMOOTH SCROLLING ENGINE --- */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1024px) {
    :root {
        --container-padding: 30px;
    }
}

@media (max-width: 600px) {
    :root {
        --container-padding: 20px;
        --space-xl: 60px;
        --space-2xl: 80px;
    }
}

/* ==========================================
   404 ERROR PAGE STYLING
   ========================================== */

/* 1. Force the header to be solid black/white on the 404 page */
body.error404 .site-header {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05) !important;
}

body.error404 .site-header,
body.error404 .site-header a,
body.error404 .site-header .site-branding a {
    color: #000000 !important;
}

body.error404 .site-header .nav-list a::after {
    background-color: #000000 !important;
}

/* 2. Style the Error Container */
.error-404-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 140px 20px 80px;
    background-color: #fcfcfc;
    text-align: center;
}

.error-container {
    max-width: 600px;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.error-title {
    font-family: var(--font-serif);
    font-size: clamp(6rem, 15vw, 12rem);
    line-height: 1;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    letter-spacing: -0.03em;
}

.error-subtitle {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: #333333;
    margin: 0 0 20px 0;
    font-weight: 400;
}

.error-text {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: #666666;
    margin: 0 0 40px 0;
    line-height: 1.6;
}

.error-btn {
    display: inline-block;
    padding: 16px 36px;
    background-color: #1a1a1a;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.4s ease, transform 0.2s ease;
}

.error-btn:hover {
    background-color: #007769; /* Luxury Teal */
    color: #ffffff;
    transform: translateY(-2px);
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   JOURNAL ARTICLE STYLES (SINGLE.PHP)
   ========================================== */

/* 1. Force the header to be solid black/white on single posts */
body.single-post .site-header {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05) !important;
}

body.single-post .site-header,
body.single-post .site-header a,
body.single-post .site-header .site-branding a {
    color: #000000 !important;
}

body.single-post .site-header .nav-list a::after {
    background-color: #000000 !important;
}

/* 2. Editorial Layout Architecture */
.editorial-article {
    padding-bottom: 100px;
}

.article-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

/* 3. Header Typography */
.article-header {
    padding: 40px 0 60px 0;
}

.article-category {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #007769; /* Luxury Teal */
    margin-bottom: 20px;
}

.article-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    color: #1a1a1a;
    margin: 0 0 30px 0;
    letter-spacing: -0.02em;
}

.article-meta {
    font-family: var(--font-sans);
    font-size: 13px;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.meta-divider {
    margin: 0 15px;
    color: #cccccc;
}

/* 4. Cinematic Media */
.article-featured-media {
    max-width: 1200px; /* Aligns with the property page width */
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

.cinematic-img {
    width: 100%;
    height: clamp(400px, 60vh, 700px);
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

/* 5. Constrained Typography (The Secret to readability) */
.article-content-wrapper {
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.article-content {
    max-width: 720px; /* Golden ratio for reading length */
    width: 100%;
}

.prose p {
    font-family: var(--font-serif);
    font-size: 20px;
    line-height: 1.8;
    color: #333333;
    margin-bottom: 30px;
}

.prose h2, .prose h3 {
    font-family: var(--font-serif);
    color: #1a1a1a;
    margin: 60px 0 20px 0;
    line-height: 1.3;
}

.prose h2 { font-size: 32px; }
.prose h3 { font-size: 24px; }

.prose blockquote {
    font-family: var(--font-serif);
    font-size: 28px;
    font-style: italic;
    line-height: 1.4;
    color: #007769;
    margin: 50px 0;
    padding-left: 30px;
    border-left: 3px solid #007769;
}

.prose img {
    border-radius: 4px;
    margin: 40px 0;
}

/* 6. Footer Button */
.article-footer {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid #eeeeee;
}

.back-to-journal-btn {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #1a1a1a;
    text-decoration: none;
    padding: 15px 30px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.back-to-journal-btn:hover {
    border-color: #1a1a1a;
    background: #fcfcfc;
}

/* ==========================================
   JOURNAL INDEX ARCHIVE (HOME.PHP)
   ========================================== */

/* 1. Force the header to be solid black/white on the blog index */
body.blog .site-header {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05) !important;
}

body.blog .site-header,
body.blog .site-header a,
body.blog .site-header .site-branding a {
    color: #000000 !important;
}

body.blog .site-header .nav-list a::after {
    background-color: #000000 !important;
}

/* 2. Minimalist Typographic Hero */
.journal-hero-clean {
    padding: 160px 20px 60px; /* Pushes content below the header */
    background-color: #ffffff;
    border-bottom: 1px solid #eeeeee;
    margin-bottom: 80px;
}

.journal-hero-clean .hero-subtitle {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    display: block;
    margin-bottom: 20px;
    color: #007769; /* Luxury Teal */
}

.journal-hero-clean .hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 8vw, 6rem);
    line-height: 1;
    margin: 0 0 20px 0;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.journal-hero-clean .hero-intro {
    font-family: var(--font-serif);
    font-size: 22px;
    font-style: italic;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

/* 3. Layout Architecture */
.journal-container {
    padding-bottom: 120px;
}

.journal-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 80px 40px;
    margin-top: 80px;
}

/* 4. The Article Cards */
.journal-entry {
    background: transparent;
}

.entry-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.entry-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    margin-bottom: 25px;
    background: #f5f5f5;
}

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

.entry-link:hover .entry-img {
    transform: scale(1.03);
}

.placeholder-img {
    width: 100%;
    height: 100%;
    background: #eaeaea;
}

.entry-header {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.entry-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-sans);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #999999;
    margin-bottom: 15px;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 10px;
}

.entry-cat {
    color: #1a1a1a;
    font-weight: 700;
}

.entry-title {
    font-family: var(--font-serif);
    font-size: 26px;
    line-height: 1.3;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    transition: color 0.3s ease;
}

.entry-link:hover .entry-title {
    color: #007769;
}

.entry-excerpt {
    font-family: var(--font-sans);
    font-size: 15px;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1; /* Pushes the "Read More" button to the bottom align */
}

.read-more {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #1a1a1a;
    transition: margin-left 0.3s ease;
    display: inline-block;
    margin-top: auto;
}

.entry-link:hover .read-more {
    margin-left: 8px;
}

/* 5. FEATURED POST (The New Layout) */
.featured-entry {
    margin-bottom: 80px;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 80px;
}

.featured-link {
    flex-direction: row;
    gap: 60px;
    align-items: center;
}

.featured-media {
    flex: 1.5;
    aspect-ratio: 16/9; /* Wider cinematic ratio for the hero post */
    margin-bottom: 0;
}

.entry-content-box {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.massive-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 25px;
}

.featured-excerpt {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 35px;
}

/* 6. Elegant Pagination */
.archive-pagination {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #1a1a1a;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 15px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.archive-pagination .page-numbers:hover,
.archive-pagination .page-numbers.current {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

/* 7. Responsive Adjustments */
@media (max-width: 1024px) {
    .featured-link { flex-direction: column; gap: 30px; }
    .featured-media { aspect-ratio: 4/3; }
    .journal-feed-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .journal-hero-clean { padding: 120px 20px 40px; margin-bottom: 40px; }
    .journal-feed-grid { grid-template-columns: 1fr; gap: 60px; }
    .featured-entry { padding-bottom: 60px; margin-bottom: 60px; }
}

/* ==========================================
   FORCE SOLID HEADER ON ALL ARCHIVES & SEARCH
   ========================================== */
body.archive .site-header,
body.search .site-header,
body.tax-property_location .site-header,
body.page-template-page-regions .site-header {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: none !important;
    height: var(--header-height-scrolled, 75px) !important;
}

body.archive .site-header,
body.archive .site-header a,
body.archive .site-header .site-branding a,
body.search .site-header,
body.search .site-header a,
body.search .site-header .site-branding a,
body.tax-property_location .site-header,
body.tax-property_location .site-header a,
body.tax-property_location .site-header .site-branding a,
body.page-template-page-regions .site-header,
body.page-template-page-regions .site-header a,
body.page-template-page-regions .site-header .site-branding a {
    color: #000000 !important;
}

body.archive .site-header .nav-list a::after,
body.search .site-header .nav-list a::after,
body.tax-property_location .site-header .nav-list a::after,
body.page-template-page-regions .site-header .nav-list a::after {
    background-color: #000000 !important;
}