/*
Theme Name: MRC25
Description: Tema personalizzato per Milano RE Costruzioni basato su Underscores
Author: Sviluppatore Front-End
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mrc25
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* CSS Custom Properties */
:root {
    --primary-color: #251D07;
    --secondary-color: #DCAA20;
    --text-color: #251D07;
    --light-gray: #f3f3f3;
    --border-color: #e1e1e1;
    --white: #f9f9f9;
    --cream: #eae8e3;
    --black: #251D07;
    --font-primary: 'PT Serif Caption', Georgia, 'Times New Roman', serif;
    --font-secondary: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset e base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    font-family: 'PT Serif Caption', Georgia, 'Times New Roman', serif;
    color: var(--text-color);
    background-color: var(--cream);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--black);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ================= HEADER ================= */
.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.site-branding {
    display: flex;
    align-items: center;
    width: 180px;
    height: 60px;
    padding: 0 20px;
    box-sizing: content-box;
    border-radius: 0 0 8px 0;
    opacity: 1;
    transition: all 0.3s ease;
}



.scrolled .site-branding {
    opacity: 1;
}

img.custom-logo {
    max-width: 175px;
    width: auto;
    height: 55px;
    transition: transform 0.3s ease;
}

.site-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.site-title a {
    color: var(--black);
}

.site-description {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.site-header {
    background-color: #0003;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    height: 60px;
}

.site-header.scrolled {
    background: rgba(234, 232, 227, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* --- Media Query HEADER --- */
@media (min-width: 1024px) {
    .header-flex {
        padding: 0 4rem;
    }

    .site-branding {
        width: 250px;
        height: 60px;
        padding: 0 40px;
    }

    img.custom-logo {
        max-width: 200px;
        height: 68px;
    }
    .scrolled .site-branding,
    .site-header.scrolled {
        height: 100px;
    }
}

/* ========== NAVIGAZIONE DESKTOP ========== */
.main-navigation {
    display: none;
    margin: 0;
    box-shadow: none;
    background: transparent;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: row;
    gap: 3rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu li a {
    color: var(--cream);
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    letter-spacing: 0.5px;
}

.scrolled .nav-menu li a {
    color: var(--text-color);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-menu li a:hover {
    color: var(--secondary-color);
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* --- Media Query NAVIGAZIONE DESKTOP --- */

@media (min-width: 1024px) {
    .main-navigation {
        display: block;
        margin: 0;
        padding: 1rem 3rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-menu {
        gap: 4rem;
    }

    .nav-menu li a {
        font-size: 1.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ========== NAVIGAZIONE MOBILE ========== */
.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10001;
}

.hamburger {
    width: 28px;
    height: 3px;
    background: var(--cream);
    border-radius: 2px;
    position: relative;
    transition: background 0.3s;
    display: block;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 28px;
    height: 3px;
    background: var(--cream);
    border-radius: 2px;
    transition: transform 0.3s, top 0.3s, bottom 0.3s;
}

.scrolled .hamburger,
.scrolled .hamburger::before,
.scrolled .hamburger::after {
    background: var(--text-color);
}


.hamburger::before {
    top: -9px;
}

.hamburger::after {
    bottom: -9px;
}

.menu-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.open {
    display: block;
    opacity: 1;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -80vw;
    width: 80vw;
    max-width: 400px;
    height: 100vh;
    background: var(--cream);
    z-index: 9999;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.08);
    transition: left 0.3s;
    padding: 60px 2rem 2rem 2rem;
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-direction: column;
    gap: 2rem;
}

.mobile-menu.open {
    left: 0;
}

.mobile-menu .menu-branding {
    height: 60px;
    width: 80vw;
    position: absolute;
    z-index: 10;
    left: 0;
    top: 0;
    background: var(--primary-color);
    padding: 0px 0 0 50px;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 8rem;
}

.mobile-menu-list li a {
    font-family: var(--font-secondary);
    font-size: 1.3rem;
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 400;
    transition: color 0.2s;
}

.mobile-menu-list li a:hover {
    color: var(--primary-color);
}
.mobile-menu-text-bottom {
    color: #251D0755;
    font-size: 12px;
}

/* --- Media Query NAVIGAZIONE MOBILE --- */
@media (min-width: 1024px) {

    .mobile-menu,
    .mobile-menu-overlay,
    .menu-toggle {
        display: none !important;
    }
}

/* ========== CONTENUTO ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-content {
    padding: 2rem 0;
    min-height: 60vh;
}

.content-area {
    margin-bottom: 2rem;
}

.entry-header {
    margin-bottom: 1.5rem;
}

.entry-header.entry-header-full {
    width: 100vw;
    position: absolute;
    left: 0;
    top: 0px;
    height: 400px;
    overflow: hidden;
}

.entry-title {
    margin-bottom: 0.5rem;
}

.entry-header.entry-header-full .entry-title {
    position: absolute;
    bottom: 60px;
    left: 50%;
    max-width: 1200px;
    width: 100vw;
    margin: 0 auto;
    transform: translateX(-50%);
    font-size: 3rem;
    letter-spacing: 2px;
    padding: 0 1rem;
    color: var(--white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.entry-title a {
    color: var(--black);
}

.entry-title a:hover {
    color: var(--primary-color);
}

.entry-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.entry-meta span {
    margin-right: 1rem;
}

.entry-content {
    margin-bottom: 2rem;
    line-height: 1.7;
}

.entry-content>p {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    line-height: 1.875rem;
}

.entry-header.entry-header-full+.entry-content {
    margin-top: 400px;
}

.entry-header.entry-header-full .post-thumbnail img {
    height: 400px;
    object-fit: cover;
}

.wp-block-cover.has-parallax {
    width: 100vw;
    position: absolute;
    left: 0;
    height: 40dvh;
    min-height: 40dvh;
    color: var(--white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.wp-block-cover.has-parallax+p {
    margin-top: calc(40dvh + 80px);
}

.entry-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.entry-footer-meta span {
    margin-right: 1rem;
}

.post-thumbnail {
    margin-bottom: 1.5rem;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.read-more {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* --- Media Query CONTENUTO --- */
@media (min-width: 1024px) {
    .container {
        padding: 0 3rem;
    }

    .site-content {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
    }

    .content-area {
        margin-bottom: 0;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.75rem;
    }

    .entry-header.entry-header-full .entry-title {
        font-size: 4.5rem;
        padding: 0 4rem;
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 0 4rem;
    }
}

/* ========== FOOTER ========== */
.site-footer {
    background-color: var(--primary-color);
    color: var(--cream);
    padding: 2rem 0;
    margin-top: 16rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-navigation ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.footer-navigation a {
    color: var(--cream);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-navigation a:hover,
.site-info a:hover {
    opacity: 1;
}

.footer-societa {
    color: var(--light-gray);
    opacity: 0.8;
}

.footer-societa strong {
    color: var(--secondary-color);
}

.site-info {
    text-align: center;
    border-top: 1px solid #555;
    padding-top: 1rem;
}

.site-info p {
    margin: 0;
    color: var(--light-gray);
}
.site-info a {
    margin: 0;
    opacity: 0.8;
    color: var(--light-gray);
}

/* --- Media Query FOOTER --- */
@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .footer-content {
        grid-template-columns: 2fr 1fr;
    }
}

/* ========== UTILITY ========== */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.alignleft {
    float: left;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 1rem;
}

.wp-caption-text {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
}

/* Search results */
.search-result {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.search-result:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* 404 page */
.error-404 {
    text-align: center;
    padding: 3rem 0;
}

.error-404 .page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Comments */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--light-gray);
    border-radius: 4px;
}

.comment-author {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

/* Navigation */
.post-navigation {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.nav-previous,
.nav-next {
    padding: 1rem;
    background-color: var(--light-gray);
    border-radius: 4px;
}

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

.nav-subtitle {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.nav-title {
    font-weight: bold;
}

/* --- Media Query NAVIGAZIONE --- */
@media (min-width: 1024px) {
    .nav-links {
        grid-template-columns: 1fr 1fr;
    }
}

/* ========== SEZIONI HOMEPAGE ========== */

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--black);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.mrc-overview {
    padding: 0 0 16rem 0;
}

/* Sezione Attività  */
.mrc-activities {
    padding: 8rem 0;
    background: url(./assets/img/mrc-overview-bg.jpg) no-repeat center center;
    background-size: cover;
    background-blend-mode: luminosity;
    background-color: rgba(220, 170, 32, 0.1);
}

.mrc-activities .container {
    padding: 6rem 3rem 8rem 2rem;
    margin: 0 auto;
    width: 100vw;
    overflow: hidden;
}

.activities-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.activity-card {
    border: 4px solid rgba(255, 255, 255, .8);
    padding: 2.5rem 2rem;
    border-radius: 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
    backdrop-filter: blur(10px);
}

.activity-card:nth-child(1) {
    animation-delay: 0.2s;
}

.activity-card:nth-child(2) {
    animation-delay: 0.4s;
}

.activity-card:nth-child(3) {
    animation-delay: 0.6s;
}

.activity-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(7px);
}

.activity-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.activity-card:hover .activity-icon {
    transform: scale(1.5);
}

.activity-icon i {
    font-size: 2rem;
    color: var(--white);
}

.activity-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.activity-card p {
    color: var(--white);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.activity-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.activity-link::after {
    content: '→';
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.activity-link:hover {
    color: var(--primary-color);
}

.activity-link:hover::after {
    transform: translateX(5px);
}

/* Sezione Portfolio */
.mrc-portfolio {
    padding: 16rem 0 0 0;
    background: var(--cream);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
}

.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.portfolio-item:nth-child(1) {
    animation-delay: 0.1s;
}

.portfolio-item:nth-child(2) {
    animation-delay: 0.2s;
}

.portfolio-item:nth-child(3) {
    animation-delay: 0.3s;
}

.portfolio-item:nth-child(4) {
    animation-delay: 0.4s;
}

.portfolio-item:nth-child(5) {
    animation-delay: 0.5s;
}

.portfolio-item:nth-child(6) {
    animation-delay: 0.6s;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    /* background: linear-gradient(135deg,
            rgba(37, 29, 7, 0.9) 0%,
            rgba(37, 29, 7, 0.7) 100%); */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: all 0.5s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
    backdrop-filter: blur(0px);
}

.portfolio-content {
    text-align: center;
    color: white;
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-content {
    transform: translateY(0);
}

.portfolio-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    color: var(--white);
}

.portfolio-content p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    line-height: 1.4;
}

.portfolio-link {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.portfolio-link:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.portfolio-cta {
    text-align: center;
    margin-top: 3rem;
}

.btn-primary,
.wp-block-button__link {
    display: inline-block;
    color: var(--primary-color);
    background: var(--light-gray);
    border: 2px solid var(--primary-color);
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 0;
    box-shadow: none;
}

.btn-primary:hover,
.wp-block-button__link:hover {
    background: var(--cream);
    color: var(--primary-color);
    transform: translateY(-2px);
    border: 2px solid var(--secondary-color);
}

/* Animazioni */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Media Query SEZIONI HOMEPAGE --- */
@media (min-width: 1024px) {
    .mrc-activities .container {
        padding: 6rem 8rem 8rem 8rem;
    }

    .activities-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .section-title {
        font-size: 3.5rem;
    }

    .section-subtitle {
        font-size: 1.3rem;
    }
}

/* --- STILI GALLERIA LAVORI --- */

/* Griglia galleria */
.mrc-gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.mrc-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mrc-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.mrc-gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.mrc-gallery-item:hover .mrc-gallery-image {
    transform: scale(1.05);
}

.mrc-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem;
    font-size: 0.9rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mrc-gallery-item:hover .mrc-gallery-caption {
    transform: translateY(0);
}

/* Lightbox */
.mrc-gallery-lightbox {
    position: relative;
}

/* Nascondi thumbnails quando usato con carousel */
.mrc-lavoro-carousel + .mrc-gallery-lightbox .mrc-gallery-thumbnails {
    display: none;
}

.mrc-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin: 2rem 0;
}

.mrc-gallery-thumb {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mrc-gallery-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mrc-gallery-thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.mrc-lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mrc-lightbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

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

.mrc-lightbox-image-container {
    position: relative;
    text-align: center;
}

.mrc-lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.mrc-lightbox-caption {
    color: white;
    padding: 1rem;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0 0 8px 8px;
    margin-top: -4px;
}

.mrc-lightbox-close,
.mrc-lightbox-prev,
.mrc-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10000;
}

.mrc-lightbox-close:hover,
.mrc-lightbox-prev:hover,
.mrc-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mrc-lightbox-close {
    top: 20px;
    right: 20px;
}

.mrc-lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.mrc-lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Media queries per galleria */
@media (min-width: 768px) {
    .mrc-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .mrc-gallery-thumbnails {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .mrc-gallery-thumb img {
        height: 150px;
    }
}

@media (min-width: 1024px) {
    .mrc-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .mrc-gallery-thumbnails {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .mrc-gallery-thumb img {
        height: 180px;
    }
}

/* --- STILI CAROUSEL LAVORI --- */

/* Mobile First - Carousel Styles */
.mrc-lavoro-carousel {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.mrc-lavoro-header {
    margin-bottom: 1rem;
    text-align: center;
}

.mrc-lavoro-title {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
}

.mrc-lavoro-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
}

.mrc-carousel-container {
    position: relative;
    background: var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.mrc-carousel-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    max-height: 300px;
    overflow: hidden;
}

.mrc-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.mrc-carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: none;
    padding: 8px;
}

.mrc-carousel-slide.active {
    display: block;
}

.mrc-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 5px;
}

.mrc-carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    font-size: 0.8rem;
    text-align: center;
}

.mrc-carousel-prev,
.mrc-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10;
}

.mrc-carousel-prev:hover,
.mrc-carousel-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.mrc-carousel-prev {
    left: 10px;
}

.mrc-carousel-next {
    right: 10px;
}

.mrc-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
}

.mrc-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: var(--cream);
    cursor: pointer;
    transition: background 0.3s ease;
}

.mrc-carousel-dot.active {
    background: var(--primary-color);
}

.mrc-carousel-counter {
    position: absolute;
    bottom: 65px;
    right: 20px;
    z-index: 10;
    text-align: center;
    padding: 5px 15px;
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-color);
    background: #fff4;
    border-radius: 30px;
}

/* Media queries per carousel */
@media (min-width: 768px) {
    .mrc-carousel-wrapper {
        max-height: 500px;
    }
    
    .mrc-lavoro-title {
        font-size: 2rem;
    }
    
    .mrc-lavoro-description {
        font-size: 1rem;
    }
    
    .mrc-carousel-prev,
    .mrc-carousel-next {
        width: 50px;
        height: 50px;
    }
    
    .mrc-carousel-prev {
        left: 20px;
    }
    
    .mrc-carousel-next {
        right: 20px;
    }
}

@media (min-width: 1024px) {
    .mrc-carousel-wrapper {
        max-height: 640px;
    }
    
    .mrc-lavoro-title {
        font-size: 2.5rem;
    }
    
    .mrc-lavoro-description {
        font-size: 1.1rem;
    }
}


form.wpcf7-form input,
form.wpcf7-form textarea {
    border: none;
    background: var(--white);
    color: var(--primary-color);
    font-size: 18px;
    display: block;
    padding: 10px 15px;
    margin-top: 5px;
    width: 100%;
    border-radius: 5px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

form.wpcf7-form input:focus,
form.wpcf7-form textarea:focus {
    outline: none;
    border: none !important;
    background: #fff;
}
form.wpcf7-form input.wpcf7-submit {
    background: var(--primary-color);
    color: var(--white);
    font-size: 18px;
    display: block;
    padding: 15px 15px;
    width: 100%;
    margin: 40px 0 0 auto;
    border-radius: 0;
    cursor: pointer;
}