/*
Theme Name: Weald Child
Description: Child theme of Weald for custom modifications with new Eva design
Template: weald
Version: 1.0.1
Author: Custom Development
*/

/* Google Fonts: Playfair Display e Figtree */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;700&family=Playfair+Display:wght@400;700&display=swap');

/* Reset e Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #1a1a1a;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* Font families */
.font-serif { font-family: 'Playfair Display', Georgia, serif; }
.font-sans { font-family: 'Figtree', sans-serif; }

/* Custom colors */
.text-gold { color: #c9a227; }
.bg-gold-light { background-color: #e8dcc4; }

/* ========================
   HEADER STYLES
   ======================== */

.site-header {
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #e5e7eb;
}

/* Top bar con social e lingua */
.header-top-bar {
    display: none; /* Nascosto su mobile */
}

@media (min-width: 1024px) {
    .header-top-bar {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 1rem;
        padding: 0.5rem 2rem;
        border-bottom: 1px solid #f3f4f6;
    }
}

.header-social-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-social-icons a {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.header-social-icons a:hover {
    opacity: 1;
}

.header-social-icons svg {
    width: 1rem;
    height: 1rem;
}

.header-language {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.header-language .active {
    font-weight: 700;
}

.header-language .inactive {
    color: #9ca3af;
}

/* Main header row */
.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    position: relative;
}

@media (min-width: 1024px) {
    .header-main {
        padding: 0.75rem 2rem;
    }
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Logo image - responsive sizing */
.logo img {
    height: auto;
    max-height: 50px;
    width: auto;
}

@media (max-width: 767px) {
    .logo img {
        max-height: 38px; /* 20% bigger than 32px */
    }
}

@media (min-width: 768px) {
    .logo img {
        max-height: 60px;
    }
}

.logo svg {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text .pre {
    font-size: 0.5rem;
    letter-spacing: 0.1em;
}

.logo-text .main {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.logo-text .main span {
    font-weight: 400;
}

.logo-text .sub {
    font-size: 0.4rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navigation */
.main-nav {
    display: none;
    position: relative;
}

@media (min-width: 1024px) {
    .main-nav {
        display: flex;
        align-items: center;
        gap: 2.25rem;
    }
}

.nav-link {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: opacity 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #000;
}

.nav-link:hover {
    opacity: 0.6;
    color: #000;
}

.nav-link svg {
    width: 0.9rem;
    height: 0.9rem;
    color: #000;
}

/* Megamenu styles */
.nav-item {
    position: static;
}

.megamenu {
    position: fixed;
    top: 0; /* Will be set by JavaScript */
    left: 0;
    right: 0;
    width: 100%;
    background-color: #fff;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #d1d5db;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
}

.nav-item:hover .megamenu {
    opacity: 1;
    visibility: visible;
}

.megamenu-container {
    max-width: 1400px;
    margin: 0 3rem 0 auto;
    padding: 0 2rem;
}

/* Main grid: two columns - links area + gallery area */
.megamenu-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: start;
}

/* Links content area - title ABOVE the 3 columns */
.megamenu-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Title row - both titles aligned on same baseline */
.megamenu-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.5rem;
    white-space: nowrap;
    margin: 0;
}

/* Three columns of links below title */
.megamenu-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.megamenu-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.megamenu-link {
    font-size: 1rem;
    color: #1a1a1a;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.megamenu-link:hover {
    opacity: 0.6;
}

/* Gallery area - title ABOVE the image */
.megamenu-gallery {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 300px;
    max-width: 300px;
    flex-shrink: 0;
}

.megamenu-gallery-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    white-space: nowrap;
}

/* Gallery image - constrained to column width */
.megamenu-gallery-image {
    width: 100%;
    max-width: 300px;
    background-color: #f3f4f6;
    overflow: hidden;
    position: relative;
}

.megamenu-gallery-image a {
    display: block;
    width: 100%;
}

.megamenu-gallery-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* Mobile menu button */
.mobile-menu-btn {
    padding: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    z-index: 200;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-overlay.is-open {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.mobile-menu-nav {
    flex: 1;
    overflow-y: auto;
}

.mobile-menu-item {
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-item:first-child {
    border-top: none;
}

.mobile-menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1a1a1a;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    color: #1a1a1a;
}

/* Submenu mobile */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f9fafb;
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
}

.mobile-submenu.is-open {
    max-height: 500px;
}

.mobile-submenu-inner {
    padding: 1rem 0;
}

.mobile-submenu-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.mobile-submenu-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}

.mobile-submenu-link {
    font-size: 0.8rem;
    color: #4b5563;
    padding: 0.35rem 0;
    display: block;
}

.mobile-submenu-link:hover {
    color: #1a1a1a;
}

/* Mobile menu footer */
.mobile-menu-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    margin-top: auto;
}

.mobile-menu-social {
    display: flex;
    gap: 1rem;
}

.mobile-menu-social a {
    display: block;
}

.mobile-menu-social svg {
    width: 1.5rem;
    height: 1.5rem;
}

.mobile-menu-lang {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.mobile-menu-lang .active {
    font-weight: 400;
    color: #1a1a1a;
}

.mobile-menu-lang .inactive {
    font-weight: 700;
    color: #1a1a1a;
}

/* Mobile social icons (in header main) */
.mobile-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Hide social icons in header on mobile, only show menu button */
.mobile-social a {
    display: none;
}

.mobile-social a svg {
    width: 1rem;
    height: 1rem;
    opacity: 0.7;
}

@media (min-width: 1024px) {
    .mobile-social {
        display: none;
    }
}

/* ========================
   HERO SECTION
   ======================== */

.hero-section {
    padding: 2rem 1rem;
}

@media (min-width: 768px) {
    .hero-section {
        padding: 2.5rem 2rem;
    }
}

.hero-grid {
    max-width: 1664px;
    margin: 2rem auto 4rem auto;
    text-align: center;
}

@media (min-width: 768px) {
    .hero-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: start;
        text-align: left;
    }
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.75rem;
    line-height: 1.15;
    letter-spacing: 0.01em;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 0;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
}

.hero-text {
    font-size: 1.05rem;
    font-weight:500;
    color: #374151;
    line-height: 1.6;
}

.hero-text p {
    margin-bottom: 0.75rem;
}

.hero-text p:last-child {
    margin-bottom: 0;
}

/* Hero image */
.hero-image-container {
    max-width: 1664px;
    margin: 1.5rem auto 0;
    background-color: #f3f4f6;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-image-container {               
        margin-top: 2rem;
    }
}

/* ========================
   SECTION TITLES
   ======================== */

.section-intro {
    padding: 1.5rem 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .section-intro {
        padding: 2rem;
    }
}

.section-title {
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1.6;
    margin-bottom: 0.25rem;

  font-family: 'Playfair Display',serif;
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 1.15;
  letter-spacing: .01em;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

@media (min-width: 768px) {
    .section-title {
        /* font-size: 0.9rem; */
        font-size: 2.5rem;
    }
}

.section-subtitle {
    /* font-size: 0.7rem; */
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;

  font-family: 'Playfair Display',serif;
  font-weight: 600;
  font-size: 2.5rem;
  line-height: 1.15;
  letter-spacing: .01em;
  margin-bottom: 2.5rem;
  text-transform: uppercase;
  color: black;

}

/* ========================
   EBOOK SECTIONS
   ======================== */

.ebook-grid {
    display: grid;
}

@media (min-width: 768px) {
    .ebook-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ebook-image {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
}

.ebook-image.light-bg {
    background-color: #f3f4f6;
}

@media (min-width: 768px) {
    .ebook-image {
        min-height: 400px;
    }
}

.ebook-content {
    background-color: #e8dcc4;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .ebook-content {
        min-height: 400px;
        padding: 3rem;
    }
}

.ebook-subtitle {
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #374151;
    margin-bottom: 0.75rem;
}

.ebook-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.2;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .ebook-title {
        font-size: 2.875rem;
    }
}

/* Order for wedding bands section */
.ebook-order-1 {
    order: 2;
}

.ebook-order-2 {
    order: 1;
}

@media (min-width: 768px) {
    .ebook-order-1 {
        order: 1;
    }
    .ebook-order-2 {
        order: 2;
    }
}

/* ========================
   BUTTONS
   ======================== */

.btn-outline {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 1px solid #000;
    background-color: black; /* was: transparent; */
    color: white !important; /* #000; f*/
    font-family: 'Figtree', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline:hover {
    background-color: #000;
    color: #fff;
}

/* ========================
   BLOG SECTION
   ======================== */

.blog-section {
    padding: 2rem 1rem;
    background-color: #fff;
}

@media (min-width: 768px) {
    .blog-section {
        padding: 2.5rem 2rem;
    }
}

.blog-section .section-title {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #000;
    max-width: 1664px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .blog-section .section-title {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
}

.blog-grid {
    max-width: 1664px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .blog-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        gap: 2.5rem;
    }
}

.blog-card {
    background-color: #fff;
    overflow: hidden;
}

/* Mobile: horizontal layout */
.blog-card-inner {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
}

@media (min-width: 768px) {
    .blog-card-inner {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }
}

.blog-card-image {
    width: 100%;
    flex-shrink: 0;
    position: relative;
    background-color: #f9fafb;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

@media (min-width: 768px) {
    .blog-card-image {
        width: 100%;
        aspect-ratio: 4 / 5;
    }
}

.blog-card-image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.blog-card-image .relative {
    width: 100%;
    height: 100%;
}

.blog-card-image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    max-width: none !important;
    max-height: none !important;
}

.blog-date {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background-color: #000;
    color: #fff;
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    font-weight: 400;
}

@media (min-width: 768px) {
    .blog-date {
        top: 1rem;
        left: 1rem;
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

.blog-card-content {
    flex: 1;
}

@media (min-width: 768px) {
    .blog-card-content {
        padding: 1.25rem 0.75rem;
    }
}

.blog-card-title {
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 0.75rem;
    color: #000;
}

@media (min-width: 768px) {
    .blog-card-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }
}

.blog-card-text {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .blog-card-text {
        font-size: 0.875rem;
    }
}

@media (min-width: 768px) {
    .blog-card .btn-outline {
        display: none;
    }
}

.blog-section-footer {
    text-align: center;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .blog-section-footer {
        margin-top: 2rem;
    }
}

/* ========================
   FOOTER
   ======================== */

.site-footer {
    background-color: #fff;
    padding-bottom: 1.5rem;
}

/* Mobile footer - 3 columns structure per row */
.footer-grid-mobile {
    display: block;
}

@media (min-width: 768px) {
    .footer-grid-mobile {
        display: none;
    }
}

.footer-row-mobile {
    display: grid;
    grid-template-columns: 1fr 8fr 1fr;
    border-top: 1px solid #000;
}

.footer-row-mobile:last-child {
    border-bottom: 1px solid #000;
}

.footer-col-empty-mobile {
    /* Colonnina vuota laterale */
}

.footer-col-empty-mobile:first-child {
    border-right: 1px solid #000;
}

.footer-col-empty-mobile:last-child {
    border-left: 1px solid #000;
}

.footer-col-content-mobile {
    padding: 2rem 1.5rem;
    text-align: center;
}

/* Desktop footer - 5 columns structure */
.footer-grid-desktop {
    display: none;
}

@media (min-width: 768px) {
    .footer-grid-desktop {
        display: block;
        border-top: 1px solid #000;
        border-bottom: 1px solid #000;
    }
    
    .footer-grid-inner {
        display: grid;
        grid-template-columns: 1fr 3fr 3fr 3fr 1fr;
    }
    
    /* Empty side columns */
    .footer-col-empty {
        border-right: 1px solid #000;
    }
    
    .footer-col-empty:last-child {
        border-right: none;
        border-left: 1px solid #000;
    }
    
    /* Content columns */
    .footer-col-content {
        padding: 2.5rem 2rem;
        border-right: 1px solid #000;
    }
    
    .footer-col-content:last-of-type {
        border-right: none;
    }
}

.footer-title {
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-link {
    font-size: 0.9rem;
    color: #1a1a1a;
    transition: opacity 0.2s;
    padding: 0.15rem 0;
}

@media (min-width: 768px) {
    .footer-link {
        font-size: 0.875rem;
    }
}

.footer-link:hover {
    opacity: 0.6;
}

.footer-text {
    font-size: 0.875rem;
    color: #1a1a1a;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.footer-text a {
    text-decoration: underline;
}

.footer-text a:hover {
    opacity: 0.6;
}

.footer-text strong {
    font-weight: 700;
}

/* Fairmined */
.fairmined {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .fairmined {
        align-items: flex-start;
    }
}

.fairmined-logo {
    width: 70px;
    height: auto;
    margin-bottom: 0.5rem;
}

.fairmined-text {
    text-align: center;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .fairmined-text {
        text-align: left;
    }
}

.fairmined-text .brand {
    font-weight: 700;
    font-size: 0.875rem;
    display: block;
    letter-spacing: 0.05em;
}

.fairmined-text .tagline {
    font-size: 0.6rem;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
}

/* Social icons in footer */
.footer-social {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .footer-social {
        justify-content: flex-start;
    }
}

.footer-social-icon {
    display: block;
    transition: opacity 0.2s;
}

.footer-social-icon:hover {
    opacity: 0.6;
}

.footer-social-icon svg {
    width: 2rem;
    height: 2rem;
}

@media (min-width: 768px) {
    .footer-social-icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Copyright */
.footer-copyright {
    padding: 1.25rem 1rem;
    text-align: center;
}

.footer-copyright p {
    font-size: 0.7rem;
    color: #6b7280;
    line-height: 1.5;
}

.footer-copyright a {
    color: #6b7280;
}

.footer-copyright a:hover {
    opacity: 0.6;
}

/* ========================
   RING PLACEHOLDERS
   ======================== */

.ring-gold {
    background: linear-gradient(135deg, #d4af37 0%, #f5e6c3 40%, #d4af37 70%, #aa8c2c 100%);
    border-radius: 50%;
}

.ring-silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #f5f5f5 40%, #a8a8a8 70%, #808080 100%);
    border-radius: 50%;
}

.ruby-stone {
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c41e3a 50%, #8b0000 100%);
    border-radius: 50%;
}

/* Utility */
.relative { position: relative; }
.absolute { position: absolute; }

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

.blog-page {
    padding: 1.5rem 1rem 3rem;
}

@media (min-width: 768px) {
    .blog-page {
        padding: 2rem 2rem 4rem;
    }
}

.blog-container {
    max-width: 1664px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: #6b7280;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #1a1a1a;
}

.breadcrumb span {
    margin: 0 0.35rem;
}

/* Page title */
.page-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 2.5rem;
        margin-bottom: 2.5rem;
    }
}

/* Blog layout */
.blog-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .blog-layout {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 3rem;
    }
}

/* Blog posts list */
.blog-posts {
    display: flex;
    flex-direction: column;
}

/* Single blog post */
.blog-post {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
    .blog-post {
        flex-direction: row;
        gap: 1.5rem;
    }
}

.blog-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.blog-post-image {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #f3f4f6;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (min-width: 768px) {
    .blog-post-image {
        width: 240px;
        height: 180px;
        aspect-ratio: auto;
    }
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-post-content {
    flex: 1;
}

.blog-post-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .blog-post-title {
        font-size: 1.15rem;
    }
}

.blog-post-title a {
    transition: opacity 0.2s;
}

.blog-post-title a:hover {
    opacity: 0.6;
}

.blog-post-date {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.blog-post-meta {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.blog-post-excerpt {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-post-link {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.blog-post-link:hover {
    opacity: 0.6;
}

/* Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .blog-sidebar {
        position: sticky;
        top: 2rem;
        align-self: start;
    }
}

/* Search box */
.sidebar-search {
    position: relative;
}

.sidebar-search input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid #d1d5db;
    font-family: 'Figtree', sans-serif;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.sidebar-search input:focus {
    border-color: #1a1a1a;
}

.sidebar-search button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.sidebar-search svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
}

/* Sidebar sections */
.sidebar-section {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-title {
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.sidebar-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #1a1a1a;
}

.sidebar-list a {
    text-decoration: underline;
    transition: opacity 0.2s;
}

.sidebar-list a:hover {
    opacity: 0.6;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid #d1d5db;
    font-size: 0.875rem;
}

.pagination-label {
    margin-right: 0.5rem;
}

.pagination-page {
    padding: 0.25rem 0.5rem;
    transition: opacity 0.2s;
}

.pagination-page:hover {
    opacity: 0.6;
}

.pagination-page.active {
    font-weight: 700;
}

.pagination-dots {
    color: #6b7280;
}

/* ========================
   TAILWIND-STYLE GRID SYSTEM
   ======================== */

/* Container - max-width 1600px */
.container {
    width: 100%;
    max-width: 1664px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Grid system */
.grid {
    display: grid;
}

.grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

/* Gap utilities */
.gap-16 {
    gap: 4rem;
}

.gap-8 {
    gap: 2rem;
}

/* Column spans - Mobile first (default full width) */
.col-span-12 {
    grid-column: span 12 / span 12;
}

.col-span-9 {
    grid-column: span 9 / span 9;
}

.col-span-3 {
    grid-column: span 3 / span 3;
}

/* Responsive column spans - Tablet and up (md: 768px) */
@media (min-width: 768px) {
    .md\:col-span-12 {
        grid-column: span 12 / span 12;
    }

    .md\:col-span-9 {
        grid-column: span 9 / span 9;
    }

    .md\:col-span-3 {
        grid-column: span 3 / span 3;
    }
}

/* ========================
   BLOG POST CONTENT STYLES
   ======================== */

/* Breadcrumb inside single post */
.single-post .breadcrumb {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.single-post .breadcrumb a {
    color: #6b7280;
    transition: color 0.2s;
}

.single-post .breadcrumb a:hover {
    color: #1a1a1a;
}

.single-post .breadcrumb span {
    margin: 0 0.25rem;
}

/* Single post header */
.single-post .post-header {
    padding: 0 0 2rem;
    border-bottom: none;
}

.single-post .post-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 2.25rem;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

@media (min-width: 768px) {
    .single-post .post-title {
        font-size: 3rem;
    }
}

/* Post date - separate line, bold */
.single-post .post-date {
    font-family: 'Figtree', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

/* Post meta - categories and author on separate line */
.single-post .post-meta {
    font-family: 'Figtree', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 0;
}

.single-post .post-meta a {
    color: #1a1a1a;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.single-post .post-meta a:hover {
    opacity: 0.6;
}

/* Post featured image */
.single-post .post-featured-image {
    margin: 2rem 0;
}

.single-post .post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post content typography */
.single-post .post-content {
    font-family: 'Figtree', sans-serif;
    font-size: 1.155rem;
    line-height: 1.85;
    color: #374151;
}

@media (min-width: 768px) {
    .single-post .post-content {
        font-size: 1.21rem;
        line-height: 1.9;
    }
}

/* Paragraphs */
.single-post .post-content p {
    margin-bottom: 1.75rem;
}

.single-post .post-content p:last-child {
    margin-bottom: 0;
}

/* Headings in content */
.single-post .post-content h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.75rem;
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: #1a1a1a;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.single-post .post-content h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.4rem;
    line-height: 1.4;
    letter-spacing: 0.02em;
    color: #1a1a1a;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}

.single-post .post-content h4 {
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.5;
    color: #1a1a1a;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Images in content - FORCE 100% WIDTH */
.single-post .post-content img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block;
    margin: 2.5rem 0;
}

/* WordPress wp-caption container - FORCE 100% WIDTH */
.single-post .post-content .wp-caption {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2.5rem 0 !important;
}

.single-post .post-content .wp-caption img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block;
    margin: 0 !important;
}

.single-post .post-content .wp-caption a {
    display: block;
    width: 100%;
    text-decoration: none;
}

.single-post .post-content .wp-caption a img {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
}

/* Remove WordPress alignment restrictions */
.single-post .post-content .aligncenter,
.single-post .post-content .alignleft,
.single-post .post-content .alignright,
.single-post .post-content .alignnone {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2.5rem 0 !important;
    display: block !important;
}

.single-post .post-content .aligncenter img,
.single-post .post-content .alignleft img,
.single-post .post-content .alignright img,
.single-post .post-content .alignnone img {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
}

/* Figure elements */
.single-post .post-content figure {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2.5rem 0 !important;
}

.single-post .post-content figure img {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
}

/* Image captions - WordPress wp-caption-text */
.single-post .post-content .wp-caption-text,
.single-post .post-content .wp-caption p {
    font-family: 'Figtree', sans-serif;
    font-size: 1.1rem;
    font-style: italic;
    color: #9ca3af;
    text-align: left;
    margin-top: 0.75rem !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    line-height: 1.5;
}

/* Modern WordPress figcaption */
.single-post .post-content figcaption {
    font-family: 'Figtree', sans-serif;
    font-size: 1.1rem;
    font-style: italic;
    color: #9ca3af;
    text-align: left;
    margin-top: 0.75rem !important;
    margin-bottom: 0 !important;
    line-height: 1.5;
}

/* Links in content */
.single-post .post-content a {
    color: #1a1a1a;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.single-post .post-content a:hover {
    opacity: 0.6;
}

/* Lists */
.single-post .post-content ul,
.single-post .post-content ol {
    margin: 1.75rem 0;
    padding-left: 1.5rem;
}

.single-post .post-content li {
    margin-bottom: 0.75rem;
    line-height: 1.85;
}

/* Blockquotes */
.single-post .post-content blockquote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.7;
    color: #4b5563;
    border-left: 3px solid #e5e7eb;
    padding-left: 1.5rem;
    margin: 2.5rem 0;
}

/* WordPress blocks compatibility */
.single-post .post-content .wp-block-image {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2.5rem 0 !important;
}

.single-post .post-content .wp-block-image img {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
}

.single-post .post-content .wp-block-image figcaption {
    margin-top: 0.75rem !important;
}

/* Post footer (tags) */
.single-post .post-footer {
    padding: 2rem 0 1rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 3rem;
}

.single-post .post-footer .post-tags {
    font-family: 'Figtree', sans-serif;
    font-size: 0.9rem;
    color: #6b7280;
}

.single-post .post-footer .post-tags a {
    color: #1a1a1a;
    text-decoration: none;
    transition: opacity 0.2s;
}

.single-post .post-footer .post-tags a:hover {
    opacity: 0.6;
}

/* ========================
   SINGLE PAGE STYLES (for WordPress pages)
   Single column layout with max-width 1600px
   Typography matching blog post style
   ======================== */

/* Page wrapper - single column centered */
.single-page-wrapper {
    max-width: 1600px;
    margin: 0 auto;
}

/* Breadcrumb navigation */
.single-page .breadcrumb {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.single-page .breadcrumb a {
    color: #6b7280;
    transition: color 0.2s;
}

.single-page .breadcrumb a:hover {
    color: #1a1a1a;
}

.single-page .breadcrumb span {
    margin: 0 0.25rem;
}

/* Page header */
.single-page .page-header {
    padding: 0 0 2rem;
    border-bottom: none;
}

.single-page .page-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 2.25rem;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

@media (min-width: 768px) {
    .single-page .page-title {
        font-size: 3rem;
    }
}

/* Page featured image */
.single-page .page-featured-image {
    margin: 2rem 0;
}

.single-page .page-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Page content typography - matching blog posts */
.single-page .page-content {
    font-family: 'Figtree', sans-serif;
    font-size: 1.155rem;
    line-height: 1.85;
    color: #374151;
}

@media (min-width: 768px) {
    .single-page .page-content {
        font-size: 1.21rem;
        line-height: 1.9;
    }
}

/* Paragraphs */
.single-page .page-content p {
    margin-bottom: 1.75rem;
}

.single-page .page-content p:last-child {
    margin-bottom: 0;
}

/* Headings in content */
.single-page .page-content h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.75rem;
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: #1a1a1a;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.single-page .page-content h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.4rem;
    line-height: 1.4;
    letter-spacing: 0.02em;
    color: #1a1a1a;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}

.single-page .page-content h4 {
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.5;
    color: #1a1a1a;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Images in content */
.single-page .page-content img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block;
    margin: 2.5rem 0;
}

/* WordPress wp-caption container */
.single-page .page-content .wp-caption {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2.5rem 0 !important;
}

.single-page .page-content .wp-caption img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block;
    margin: 0 !important;
}

.single-page .page-content .wp-caption a {
    display: block;
    width: 100%;
    text-decoration: none;
}

.single-page .page-content .wp-caption a img {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
}

/* Remove WordPress alignment restrictions */
.single-page .page-content .aligncenter,
.single-page .page-content .alignleft,
.single-page .page-content .alignright,
.single-page .page-content .alignnone {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2.5rem 0 !important;
    display: block !important;
}

.single-page .page-content .aligncenter img,
.single-page .page-content .alignleft img,
.single-page .page-content .alignright img,
.single-page .page-content .alignnone img {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
}

/* Figure elements */
.single-page .page-content figure {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2.5rem 0 !important;
}

.single-page .page-content figure img {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
}

/* Captions */
.single-page .page-content .wp-caption-text,
.single-page .page-content .wp-caption p {
    font-family: 'Figtree', sans-serif;
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin-top: 0.75rem;
    padding: 0;
    font-style: italic;
}

.single-page .page-content figcaption {
    font-family: 'Figtree', sans-serif;
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Links in content */
.single-page .page-content a {
    color: #c9a227;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.single-page .page-content a:hover {
    opacity: 0.7;
}

/* Lists */
.single-page .page-content ul,
.single-page .page-content ol {
    margin: 1.75rem 0;
    padding-left: 1.5rem;
}

.single-page .page-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Blockquotes */
.single-page .page-content blockquote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #4b5563;
    border-left: 3px solid #c9a227;
    padding-left: 1.5rem;
    margin: 2rem 0;
}

/* WordPress block images */
.single-page .page-content .wp-block-image {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2.5rem 0;
}

.single-page .page-content .wp-block-image img {
    width: 100% !important;
    height: auto !important;
}

.single-page .page-content .wp-block-image figcaption {
    text-align: center;
}

/* ========================
   PORTFOLIO SINGLE PAGE STYLES
   Mobile-first responsive design
   ======================== */

/* Page container */
.portfolio-page {
    padding: 1rem 0 2rem;
}

@media (min-width: 768px) {
    .portfolio-page {
        padding: 2rem 0 3rem;
    }
}

@media (min-width: 1024px) {
    .portfolio-page {
        padding: 2.5rem 0 4rem;
    }
}

/* ---- Mobile Header (title + category before slider) ---- */
.portfolio-header-mobile {
    display: block;
    padding: 0 0 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.portfolio-header-mobile .work-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.25;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
    color: #1a1a1a;
}

.portfolio-header-mobile .work-category-mobile {
    font-family: 'Figtree', sans-serif;
    font-size: 0.8rem;
    color: #6b7280;
}

.portfolio-header-mobile .work-category-mobile a {
    color: #6b7280;
    text-decoration: underline;
    transition: color 0.2s;
}

.portfolio-header-mobile .work-category-mobile a:hover {
    color: #1a1a1a;
}

/* Hide mobile header on desktop */
@media (min-width: 768px) {
    .portfolio-header-mobile {
        display: none;
    }
}

/* ---- Portfolio Grid Layout ---- */
.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Desktop: 75% / 25% grid */
@media (min-width: 768px) {
    .portfolio-grid {
        display: grid;
        grid-template-columns: 1fr 280px;
        gap: 2.5rem;
        align-items: start;
    }
}

@media (min-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: 1fr 320px;
        gap: 3rem;
    }
}

@media (min-width: 1280px) {
    .portfolio-grid {
        grid-template-columns: 3fr 1fr;
        gap: 4rem;
    }
}

/* ---- Banner Column (slider/gallery/video) ---- */
.portfolio-banner-column {
    width: 100%;
    min-width: 0; /* Prevent flex/grid overflow */
}

.portfolio-item-single {
    width: 100%;
}

.portfolio-page .work-banner {
    width: 100%;
    position: relative;
}

.portfolio-page .work-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---- Flexslider Portfolio Overrides ---- */
.portfolio-page .portfolio-slider {
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    background: transparent;
}

.portfolio-page .portfolio-slider .slides {
    margin: 0;
    padding: 0;
    list-style: none;
}

.portfolio-page .portfolio-slider .slides li {
    margin: 0;
    padding: 0;
}

.portfolio-page .portfolio-slider .slides img {
    width: 100%;
    height: auto;
    display: block;
}

/* Slider navigation arrows - positioned at center of IMAGE only (not caption/dots) */
.portfolio-page .nemus-direction-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
    height: 0;
}

.portfolio-page .nemus-direction-nav li {
    list-style: none;
}

.portfolio-page .nemus-direction-nav a {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(100, 100, 100, 0.7);
    color: #fff;
    font-size: 0;
    position: absolute;
    transition: background 0.2s;
    border-radius: 50%;
}

.portfolio-page .nemus-direction-nav a:hover {
    background: rgba(80, 80, 80, 0.85);
}

.portfolio-page .nemus-direction-nav a.nemus-prev {
    left: 8px;
}

.portfolio-page .nemus-direction-nav a.nemus-next {
    right: 8px;
}

/* ---- Arrow vertical positioning at 50% of IMAGE height ---- */
/* Assuming 4:3 aspect ratio images: half height = banner_width × 0.375 */
/* Subtract half arrow height to center the arrow on that point */

/* Mobile (< 768px): full width minus 2rem container padding */
/* Banner width = 100vw - 2rem, half image height = (100vw - 2rem) × 0.375 */
.portfolio-page .nemus-direction-nav a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(120, 120, 120, 0.75);
    top: calc((100vw - 2rem) * 0.375 - 20px);
}

.portfolio-page .nemus-direction-nav a.nemus-prev {
    left: 4px;
}

.portfolio-page .nemus-direction-nav a.nemus-next {
    right: 4px;
}

/* Tablet (768px - 1023px): grid 1fr + 280px sidebar + 2.5rem gap, 4rem container padding */
/* Banner width = 100vw - 4rem - 280px - 2.5rem */
@media (min-width: 768px) {
    .portfolio-page .nemus-direction-nav a {
        width: 44px;
        height: 44px;
        background: rgba(100, 100, 100, 0.7);
        top: calc((100vw - 4rem - 280px - 2.5rem) * 0.375 - 22px);
    }

    .portfolio-page .nemus-direction-nav a.nemus-prev {
        left: 8px;
    }

    .portfolio-page .nemus-direction-nav a.nemus-next {
        right: 8px;
    }
}

/* Desktop (1024px - 1279px): grid 1fr + 320px sidebar + 3rem gap */
/* Banner width = 100vw - 4rem - 320px - 3rem */
@media (min-width: 1024px) {
    .portfolio-page .nemus-direction-nav a {
        top: calc((100vw - 4rem - 320px - 3rem) * 0.375 - 22px);
    }
}

/* Large Desktop (1280px+): grid 3fr/1fr + 4rem gap, container max 1664px */
/* Banner width = min(100vw, 1664px) - 4rem padding, then × 0.75 for 3fr portion, minus 2rem for gap share */
@media (min-width: 1280px) {
    .portfolio-page .nemus-direction-nav a {
        /* At 1280px+: banner ≈ (viewport - padding - gap) × 0.75 */
        /* Capped when container reaches max-width */
        top: calc(min((100vw - 4rem - 4rem) * 0.75, 1200px) * 0.375 - 22px);
    }
}

/* Very large screens (1700px+): container at max-width, banner fixed size */
@media (min-width: 1700px) {
    .portfolio-page .nemus-direction-nav a {
        /* Container maxed at 1664px, banner ≈ 1200px, half 4:3 height ≈ 450px */
        top: calc(450px - 22px);
    }
}

/* Arrow icons - Using Unicode characters for universal support */
.portfolio-page .nemus-direction-nav a::before,
.nemus-direction-nav a::before {
    font-style: normal;
    speak: none;
    display: block;
    text-align: center;
    position: absolute;
    left: 0;
    top: 0;
    text-indent: 0px;
    text-decoration: none;
}

/* Mobile first: 40px arrows */
.portfolio-page .nemus-direction-nav a::before,
.nemus-direction-nav a::before {
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 22px;
}

/* Desktop (768px+): 44px arrows */
@media (min-width: 768px) {
    .portfolio-page .nemus-direction-nav a::before,
    .nemus-direction-nav a::before {
        width: 44px;
        height: 44px;
        line-height: 44px;
        font-size: 28px;
    }
}

/* Previous arrow icon - use Unicode chevrons (works everywhere) */
.portfolio-page .nemus-direction-nav a.nemus-prev::before,
.nemus-direction-nav a.nemus-prev::before,
.nemus-direction-nav .nemus-prev::before {
    content: '\2039'; /* Single Left-Pointing Angle Quotation Mark - universal support */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-weight: 300;
}

/* Next arrow icon - use Unicode chevrons (works everywhere) */
.portfolio-page .nemus-direction-nav a.nemus-next::before,
.nemus-direction-nav a.nemus-next::before,
.nemus-direction-nav .nemus-next::before {
    content: '\203A'; /* Single Right-Pointing Angle Quotation Mark - universal support */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-weight: 300;
}

/* Slider pagination dots - reduced spacing */
.portfolio-page .nemus-control-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
    flex-wrap: wrap;
}

.portfolio-page .nemus-control-nav li {
    margin: 0;
}

.portfolio-page .nemus-control-nav a {
    display: block;
    width: 10px;
    height: 10px;
    background: #d1d5db;
    border-radius: 50%;
    font-size: 0;
    cursor: pointer;
    transition: background 0.2s;
}

.portfolio-page .nemus-control-nav a:hover,
.portfolio-page .nemus-control-nav a.nemus-active {
    background: #1a1a1a;
}

/* Mobile: Smaller dots to fit in 2 rows max */
@media (max-width: 767px) {
    .portfolio-page .nemus-control-nav a {
        width: 10px;
        height: 10px;
        padding: 3px;
        box-sizing: content-box;
    }

    .portfolio-page .nemus-control-nav {
        gap: 0.35rem;
    }
}

/* ---- Image title caption ---- */
.portfolio-page .work-img-title {
    display: block;
    font-family: 'Figtree', sans-serif;
    font-size: 0.85rem;
    font-style: italic;
    color: #6b7280;
    margin-top: 0.75rem;
    padding: 0 0.5rem;
    line-height: 1.5;
    text-align: center;
}

@media (min-width: 768px) {
    .portfolio-page .work-img-title {
        font-size: 0.95rem;
        padding: 0;
        text-align: left;
    }
}

/* ---- Image List Type ---- */
.portfolio-image-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.portfolio-image-item {
    margin: 0;
}

.portfolio-image-item img {
    width: 100%;
    height: auto;
    display: block;
}

.portfolio-image-item figcaption {
    font-family: 'Figtree', sans-serif;
    font-size: 0.85rem;
    font-style: italic;
    color: #6b7280;
    margin-top: 0.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .portfolio-image-item figcaption {
        text-align: left;
    }
}

/* ---- Lightbox link ---- */
.portfolio-lightbox-link {
    display: block;
}

.portfolio-lightbox-link img {
    width: 100%;
    height: auto;
    transition: opacity 0.2s;
}

.portfolio-lightbox-link:hover img {
    opacity: 0.9;
}

/* ---- Video Wrapper (responsive) ---- */
.portfolio-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.portfolio-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ---- Content Column (sidebar on desktop) ---- */
.portfolio-content-column {
    width: 100%;
}

@media (min-width: 768px) {
    .portfolio-content-column {
        position: sticky;
        top: 100px; /* Account for sticky header */
        align-self: start;
    }
}

/* Work Content container */
.portfolio-page .work-content {
    padding: 0;
}

/* Work Title - desktop only (mobile title is in header) */
.portfolio-page .work-title-desktop {
    display: none;
}

@media (min-width: 768px) {
    .portfolio-page .work-title-desktop {
        display: block;
        font-family: 'Playfair Display', serif;
        font-weight: 400;
        font-size: 1.5rem;
        line-height: 1.25;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        margin-bottom: 1.25rem;
        color: #1a1a1a;
    }
}

@media (min-width: 1024px) {
    .portfolio-page .work-title-desktop {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
}

/* Work Description */
.portfolio-page .work-description {
    font-family: 'Figtree', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .portfolio-page .work-description {
        font-size: 1rem;
        margin-bottom: 1.75rem;
    }
}

.portfolio-page .work-description p {
    margin-bottom: 0.875rem;
}

.portfolio-page .work-description p:last-child {
    margin-bottom: 0;
}

.portfolio-page .work-description a {
    color: #1a1a1a;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.portfolio-page .work-description a:hover {
    opacity: 0.6;
}

/* Work Info (Category, Skills, URL) */
.portfolio-page .work-info {
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
    margin: 0;
}

.portfolio-page .work-info dt {
    font-family: 'Figtree', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.portfolio-page .work-info dd {
    font-family: 'Figtree', sans-serif;
    font-size: 0.9rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    margin-left: 0;
}

.portfolio-page .work-info dd:last-child {
    margin-bottom: 0;
}

.portfolio-page .work-info dd a {
    color: #1a1a1a;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.portfolio-page .work-info dd a:hover {
    opacity: 0.6;
}

/* ---- Portfolio Navigation ---- */
.portfolio-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    padding: 1.25rem 0;
    margin-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
    .portfolio-nav {
        padding: 1.5rem 0;
        margin-top: 2.5rem;
    }
}

.portfolio-nav-prev,
.portfolio-nav-next {
    flex: 1;
    min-width: 0; /* Prevent overflow */
}

.portfolio-nav-next {
    text-align: right;
}

.portfolio-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Figtree', sans-serif;
    font-size: 0.85rem;
    color: #1a1a1a;
    transition: opacity 0.2s;
    padding: 0.5rem 0;
}

@media (min-width: 768px) {
    .portfolio-nav a {
        font-size: 0.9rem;
    }
}

.portfolio-nav a:hover {
    opacity: 0.6;
}

.portfolio-nav .nav-arrow {
    font-size: 1rem;
    flex-shrink: 0;
}

.portfolio-nav .nav-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* On very small screens, hide nav text and show only arrows */
@media (max-width: 480px) {
    .portfolio-nav .nav-text {
        display: none;
    }

    .portfolio-nav a {
        padding: 0.75rem;
        background: #f3f4f6;
        border-radius: 4px;
    }

    .portfolio-nav .nav-arrow {
        font-size: 1.25rem;
    }
}

/* ---- Utility Classes ---- */
.clear {
    clear: both;
}

.hide {
    display: none !important;
}

/* ---- AddToAny Share Buttons in Portfolio ---- */
.portfolio-page .addtoany_share_save_container {
    margin: 1.5rem 0;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.portfolio-page .addtoany_header {
    font-family: 'Figtree', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

/* ---- Print Styles ---- */
@media print {
    .portfolio-page {
        padding: 0;
    }

    .portfolio-grid {
        display: block;
    }

    .portfolio-content-column {
        position: static;
    }

    .portfolio-nav,
    .nemus-direction-nav,
    .nemus-control-nav,
    .addtoany_share_save_container {
        display: none !important;
    }
}

/* ========================
   TWO-COLUMN LAYOUT (one_half)
   For ebook pages and similar content
   ======================== */

/* Container for one_half columns - ensures max-width 1600px */
.page-content {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

/* Clearfix for page-content - ensures floated one_half columns are properly contained */
.page-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Clear floats helper */
.clear {
    clear: both;
}

/* One Half Column - Mobile First (stacked) */
.one_half {
    width: 100%;
    margin-bottom: 2rem;
}

/* Desktop: Side by side 50%/50% layout */
@media (min-width: 768px) {
    .one_half {
        width: 48%;
        float: left;
        margin-right: 4%;
        margin-bottom: 0;
    }

    .one_half.last {
        margin-right: 0;
    }
}

/* Responsive iframe/video in one_half columns */
.one_half iframe {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* Form styling adjustments within one_half columns */
.one_half ._form {
    max-width: 100% !important;
    margin: 0 !important;
}

/* Ensure content within columns doesn't overflow */
.one_half img {
    max-width: 100%;
    height: auto;
}

/* ========================
   MOBILE HOMEPAGE FIXES
   ======================== */

/* Unified section title - for "SOLO ANELLI DI FIDANZAMENTO..." and similar */
.section-title-unified {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.4;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: center;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    .section-title-unified {
        font-size: 1.75rem;
        line-height: 1.3;
    }
}

/* Diamond section extra padding */
.section-diamonds {
    padding: 2.5rem 1rem;
}

@media (min-width: 768px) {
    .section-diamonds {
        padding: 3rem 2rem;
    }
}

/* Gold/Yellow button variant */
.btn-gold {
    background-color: #c9a227 !important;
    border-color: #c9a227 !important;
    color: #fff !important;
}

.btn-gold:hover {
    background-color: #a8861f !important;
    border-color: #a8861f !important;
    color: #fff !important;
}

/* Ebook section - subtitle now comes after title */
.ebook-content .ebook-title {
    margin-bottom: 0.5rem;
}

.ebook-content .ebook-subtitle {
    margin-bottom: 1.5rem;
    margin-top: 0;
}

/* ========================
   BLOG CARDS MOBILE FIX
   Show full card content on mobile
   ======================== */

/* Mobile: vertical stacked layout */
.blog-card-inner {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

/* Mobile: image takes reasonable height, not full container */
.blog-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
}

/* Mobile: content visible with padding */
.blog-card-content {
    padding: 1rem 0.5rem;
}

/* Mobile: show the button */
.blog-card .btn-outline {
    display: inline-block;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

@media (min-width: 768px) {
    .blog-card-inner {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .blog-card-image {
        aspect-ratio: 4 / 5;
    }

    .blog-card-content {
        padding: 1.25rem 0.75rem;
    }

    /* Hide individual buttons on desktop, use "Vai al Blog" instead */
    .blog-card .btn-outline {
        display: none;
    }
}

/* Blog section title - smaller on mobile for one line */
.blog-section .section-title {
    font-size: 1.25rem;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .blog-section .section-title {
        font-size: 2.5rem;
        white-space: normal;
    }
}

/* Blog card titles and text - black color */
.blog-card-title,
.blog-card-title a {
    color: #000 !important;
}

.blog-card-text {
    color: #000 !important;
}

/* VAI AL BLOG button - 100% width on mobile */
.blog-section-footer .btn-outline {
    display: block;
    width: 100%;
    text-align: center;
}

@media (min-width: 768px) {
    .blog-section-footer .btn-outline {
        display: inline-block;
        width: auto;
    }
}

/* ========================
   BLOG PAGES RESPONSIVE FIXES
   Fix responsive issues on single posts and blog archive
   ======================== */

/* Grid gap - reduce on mobile */
.blog-page .grid.gap-16 {
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .blog-page .grid.gap-16 {
        gap: 4rem;
    }
}

/* Ensure grid columns stack on mobile */
.blog-page .grid.grid-cols-12 {
    display: block;
}

@media (min-width: 768px) {
    .blog-page .grid.grid-cols-12 {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
}

/* Main content and sidebar full width on mobile */
.blog-page .col-span-12,
.blog-page .col-span-9,
.blog-page [class*="md:col-span"] {
    width: 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .blog-page .md\:col-span-9 {
        grid-column: span 9 / span 9;
        width: auto;
    }

    .blog-page .md\:col-span-3 {
        grid-column: span 3 / span 3;
        width: auto;
    }
}

/* Container overflow fix */
.blog-page .container {
    overflow-x: hidden;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .blog-page .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Blog post images - responsive */
.blog-page .blog-post-image {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
}

.blog-page .blog-post-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
}

@media (min-width: 768px) {
    .blog-page .blog-post-image {
        width: 240px;
        flex-shrink: 0;
        margin-bottom: 0;
    }
}

/* Blog post layout - stack on mobile */
.blog-page .blog-post {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .blog-page .blog-post {
        flex-direction: row;
        gap: 1.5rem;
    }
}

/* Single post content - prevent overflow */
.single-post .post-content {
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.single-post .post-content img,
.single-post .post-content iframe,
.single-post .post-content video,
.single-post .post-content embed,
.single-post .post-content object {
    max-width: 100% !important;
    height: auto !important;
}

/* Single post featured image */
.single-post .post-featured-image {
    margin: 1.5rem 0;
}

.single-post .post-featured-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Single post title - responsive font size */
.single-post .post-title {
    font-size: 1.5rem;
    line-height: 1.25;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    .single-post .post-title {
        font-size: 3rem;
    }
}

/* Page title - responsive */
.blog-page .page-title {
    font-size: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    .blog-page .page-title {
        font-size: 2.5rem;
    }
}

/* Sidebar spacing on mobile */
.blog-page .blog-sidebar {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
    .blog-page .blog-sidebar {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}

/* Breadcrumb responsive */
.blog-page .breadcrumb {
    font-size: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    .blog-page .breadcrumb {
        font-size: 0.875rem;
    }
}

/* WordPress embedded content - responsive */
.single-post .post-content .wp-block-embed,
.single-post .post-content .wp-block-video,
.single-post .post-content .wp-block-audio {
    max-width: 100% !important;
}

.single-post .post-content .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.single-post .post-content .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Tables responsive */
.single-post .post-content table {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
}

/* Pre and code blocks responsive */
.single-post .post-content pre,
.single-post .post-content code {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
}

/* ========================
   PORTFOLIO SLIDER MOBILE FIX
   Fix caption and pagination dots overlap on mobile
   ======================== */

/* Mobile: Proper spacing for caption and dots - reduced white space */
@media (max-width: 767px) {
    /* Pagination dots - minimal spacing below caption */
    .nemus-control-nav,
    .nemus-control-paging,
    .portfolio-slider .nemus-control-nav,
    .portfolio-page .nemus-control-nav,
    .flexslider .nemus-control-nav,
    ol.nemus-control-nav,
    ol.nemus-control-paging {
        margin-top: 0.5rem !important;
        padding-top: 0 !important;
        padding-bottom: 0.5rem !important;
        position: relative !important;
        clear: both !important;
        gap: 0.3rem !important;
    }

    /* Smaller dots to fit in 2 rows */
    .nemus-control-nav a,
    .nemus-control-paging a,
    ol.nemus-control-nav a,
    ol.nemus-control-paging li a {
        width: 9px !important;
        height: 9px !important;
        padding: 2px !important;
    }

    /* Caption styling - minimal spacing */
    .work-img-title,
    em.work-img-title,
    .portfolio-slider .work-img-title,
    .flexslider .slides .work-img-title,
    .portfolio-page .work-img-title {
        display: block !important;
        position: relative !important;
        z-index: 10 !important;
        background: #fff !important;
        padding: 0.35rem 0.25rem 0.25rem !important;
        margin-top: 0.25rem !important;
        margin-bottom: 0 !important;
        line-height: 1.4 !important;
        font-size: 0.75rem !important;
        text-align: center !important;
    }
}

/* Desktop: restore normal spacing */
@media (min-width: 768px) {
    .nemus-control-nav,
    .nemus-control-paging,
    .portfolio-slider .nemus-control-nav,
    .portfolio-page .nemus-control-nav {
        margin-top: 0 !important;
    }

    .work-img-title,
    em.work-img-title {
        background: transparent !important;
        z-index: auto !important;
    }
}

/* ========================
   PORTFOLIO CATEGORY ARCHIVE PAGES
   Styles for portfolio-category taxonomy pages
   ======================== */

/* Main content container */
.tax-portfolio-category .content,
.post-type-archive-weald_portfolio .content {
    max-width: 1664px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

@media (min-width: 768px) {
    .tax-portfolio-category .content,
    .post-type-archive-weald_portfolio .content {
        padding: 2.5rem 2rem 4rem;
    }
}

/* Section title */
.tax-portfolio-category .section-title,
.post-type-archive-weald_portfolio .section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.tax-portfolio-category .section-title h1,
.post-type-archive-weald_portfolio .section-title h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 2rem;
    line-height: 1.2;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0;
}

@media (min-width: 768px) {
    .tax-portfolio-category .section-title h1,
    .post-type-archive-weald_portfolio .section-title h1 {
        font-size: 2.5rem;
    }
}

/* Category filter tabs */
.portfolio_categories.box {
    margin-bottom: 2.5rem;
}

.portfolio_categories.box ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.portfolio_categories.box ul li {
    margin: 0;
}

.portfolio_categories.box ul li a {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    font-family: 'Figtree', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1a1a1a;
    background-color: transparent;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
}

.portfolio_categories.box ul li a:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.portfolio_categories.box ul li.current-cat a,
.portfolio_categories.box ul li a.active {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

/* Portfolio grid container */
.portfolio.wide-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .portfolio.wide-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .portfolio.wide-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1400px) {
    .portfolio.wide-content {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Override columns_2 class if present */
.portfolio.wide-content.columns_2 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .portfolio.wide-content.columns_2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .portfolio.wide-content.columns_2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

/* Portfolio item card */
.portfolio-list-item {
    position: relative;
    overflow: hidden;
    background-color: #f9fafb;
}

.portfolio-list-item a {
    display: block;
    position: relative;
}

.portfolio-list-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

/* Hover overlay */
.portfolio-list-item .hover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-list-item:hover .hover {
    opacity: 1;
}

.portfolio-list-item:hover img {
    transform: scale(1.05);
}

.portfolio-list-item .hover p {
    text-align: center;
    padding: 1.5rem;
    margin: 0;
}

.portfolio-list-item .hover strong {
    display: block;
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .portfolio-list-item .hover strong {
        font-size: 1.25rem;
    }
}

.portfolio-list-item .hover em {
    display: block;
    font-family: 'Figtree', sans-serif;
    font-style: normal;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Clear floats from original theme */
.portfolio .clear {
    display: none;
}

/* Divider */
.tax-portfolio-category .divider,
.post-type-archive-weald_portfolio .divider {
    display: none;
}

/* Pagination for portfolio archives */
.tax-portfolio-category .pagination,
.post-type-archive-weald_portfolio .pagination,
.tax-portfolio-category .ajax_pagination_portfolio,
.post-type-archive-weald_portfolio .ajax_pagination_portfolio {
    margin-top: 3rem;
    text-align: center;
}

/* ========================
   GALLERY PAGE (portfolio showcase page)
   Styles for the main gallery/portfolio page
   ======================== */

/* Gallery page content container */
.page-template-default .content:has(.portfolio_categories),
.page .content:has(.portfolio.wide-content) {
    max-width: 1664px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

@media (min-width: 768px) {
    .page-template-default .content:has(.portfolio_categories),
    .page .content:has(.portfolio.wide-content) {
        padding: 2.5rem 2rem 4rem;
    }
}

/* Gallery page section title */
.page .content > .section-title,
.page-template-default .content > .section-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page .content > .section-title h1,
.page-template-default .content > .section-title h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 2rem;
    line-height: 1.2;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0;
}

@media (min-width: 768px) {
    .page .content > .section-title h1,
    .page-template-default .content > .section-title h1 {
        font-size: 2.5rem;
    }
}

/* Hide the asterisk or clean up title */
.page .content > .section-title h1 span {
    display: inline;
}

/* AddToAny share buttons on gallery page */
.page .content > .addtoany_share_save_container {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.page .content > .addtoany_share_save_container .addtoany_header {
    font-family: 'Figtree', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.page .content > .addtoany_share_save_container .a2a_kit {
    justify-content: center;
}

/* Intro text (h5 tags) on gallery page */
.page .content > h5 {
    font-family: 'Figtree', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.7;
    color: #374151;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 1rem;
}

.page .content > h5 strong {
    font-weight: 600;
}

.page .content > h5 a {
    color: #1a1a1a;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.page .content > h5 a:hover {
    opacity: 0.6;
}

/* Add spacing before portfolio categories */
.page .content > h5:last-of-type {
    margin-bottom: 2.5rem;
}

/* Hide deprecated social buttons */
.page .content .fb-like,
.page .content .g-plusone,
.page .content .fb-comments {
    display: none !important;
}

/* Hide empty paragraphs and ins tags */
.page .content > p:has(ins:empty),
.page .content > p > ins:empty {
    display: none;
}

/* Comments section on gallery page */
.page .content #comments {
    display: none;
}

/* Ensure portfolio categories has proper spacing on gallery page */
.page .content > .portfolio_categories.box {
    margin-top: 2rem;
    margin-bottom: 2.5rem;
}

/* Portfolio grid on gallery page */
.page .content .portfolio.wide-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .page .content .portfolio.wide-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .page .content .portfolio.wide-content {
        gap: 2.5rem;
    }
}

/* Divider on gallery page */
.page .content > .divider {
    display: none;
}