/*
Theme Name: Beyond Villa
Theme URI: https://www.beyondvilla.it
Author: Baretta Associati
Author URI: https://www.barettaassociati.it
Description: Tema personalizzato per Beyond Villa - Design & Built di ville in Italia. Un tema elegante e minimalista per presentare progetti di architettura residenziale di lusso.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: beyondvilla
Tags: custom-logo, custom-menu, featured-images, theme-options, translation-ready

Beyond Villa - A Living Elevation
Specialisti in Design & Built di ville in Italia
*/

/* ==========================================================================
   CSS Variables / Design Tokens
   ========================================================================== */
:root {
    /* Colors */
    --bv-black: #000000;
    --bv-white: #ffffff;
    --bv-gray-dark: #1a1a1a;
    --bv-gray-medium: #666666;
    --bv-gray-light: #f5f5f5;
    --bv-primary: #8b7355;
    --bv-primary-dark: #6d5a44;
    --bv-overlay: rgba(0, 0, 0, 0.4);
    --bv-overlay-light: rgba(0, 0, 0, 0.6);

    /* Typography */
    --bv-font-primary: 'Cormorant Garamond', Georgia, serif;
    --bv-font-secondary: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --bv-spacing-xs: 0.5rem;
    --bv-spacing-sm: 1rem;
    --bv-spacing-md: 2rem;
    --bv-spacing-lg: 4rem;
    --bv-spacing-xl: 6rem;
    --bv-spacing-xxl: 8rem;

    /* Transitions */
    --bv-transition: all 0.3s ease;
    --bv-transition-slow: all 0.6s ease;

    /* Container */
    --bv-container-width: 1400px;
    --bv-container-padding: 2rem;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--bv-font-secondary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--bv-black);
    background-color: var(--bv-white);
    overflow-x: hidden;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--bv-font-primary);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: var(--bv-spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h4 {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

p {
    margin-bottom: var(--bv-spacing-sm);
    color: var(--bv-gray-medium);
}

a {
    color: var(--bv-black);
    text-decoration: none;
    transition: var(--bv-transition);
}

a:hover {
    opacity: 0.7;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
    max-width: var(--bv-container-width);
    margin: 0 auto;
    padding: 0 var(--bv-container-padding);
}

.section {
    padding: var(--bv-spacing-xl) 0;
}

.section--large {
    padding: var(--bv-spacing-xxl) 0;
}

.section--dark {
    background-color: var(--bv-black);
    color: var(--bv-white);
}

.section--dark p {
    color: rgba(255, 255, 255, 0.8);
}

.section--gray {
    background-color: var(--bv-gray-light);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--bv-spacing-md);
}

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

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

.grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

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

@media (max-width: 768px) {
    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: transparent;
    transition: var(--bv-transition);
    padding: var(--bv-spacing-sm) 0;
}

.site-header.scrolled {
    background-color: var(--bv-white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.site-header.scrolled .nav-link,
.site-header.scrolled .site-logo {
    color: var(--bv-black);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--bv-container-padding);
    max-width: var(--bv-container-width);
    margin: 0 auto;
}

.site-logo {
    font-family: var(--bv-font-primary);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--bv-white);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.site-logo img {
    max-height: 50px;
    width: auto;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: var(--bv-spacing-md);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--bv-spacing-md);
}

.nav-link {
    font-family: var(--bv-font-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bv-white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: var(--bv-transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--bv-white);
    transition: var(--bv-transition);
}

.site-header.scrolled .menu-toggle span {
    background-color: var(--bv-black);
}

@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--bv-black);
        flex-direction: column;
        justify-content: center;
        transition: transform 0.3s ease;
        transform: translateX(100%);
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
        gap: var(--bv-spacing-lg);
    }

    .nav-link {
        font-size: 1.5rem;
        color: var(--bv-white);
    }

    .language-switcher {
        margin-left: 0;
        margin-top: var(--bv-spacing-lg);
        justify-content: center;
    }

    .language-switcher li a {
        font-size: 1.25rem;
    }
}

/* Language Switcher Base Styles */
.language-switcher {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin-left: var(--bv-spacing-md);
    padding: 0;
}

.language-switcher li a {
    font-family: var(--bv-font-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--bv-white);
    opacity: 0.5;
    letter-spacing: 0.1em;
}

.language-switcher li.current-lang a {
    opacity: 1;
}

.site-header.scrolled .language-switcher li a {
    color: var(--bv-black);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--bv-white);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bv-overlay);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--bv-container-padding);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin-bottom: var(--bv-spacing-md);
    color: var(--bv-white);
}

.hero-subtitle {
    font-size: clamp(1.4rem, 2.8vw, 1.75rem);
    font-weight: 300;
    margin-bottom: var(--bv-spacing-lg);
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
    }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    font-family: var(--bv-font-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 2.5rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--bv-transition);
    text-align: center;
}

.btn--primary {
    background-color: var(--bv-black);
    color: var(--bv-white);
    border-color: var(--bv-black);
}

.btn--primary:hover {
    background-color: var(--bv-white);
    color: var(--bv-black);
    opacity: 1;
}

.btn--outline {
    background-color: transparent;
    color: var(--bv-white);
    border-color: var(--bv-white);
}

.btn--outline:hover {
    background-color: var(--bv-white);
    color: var(--bv-black);
    opacity: 1;
}

.btn--outline-dark {
    background-color: transparent;
    color: var(--bv-black);
    border-color: var(--bv-black);
}

.btn--outline-dark:hover {
    background-color: var(--bv-black);
    color: var(--bv-white);
    opacity: 1;
}

.btn--ghost {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn--ghost:hover {
    color: var(--bv-white);
    border-color: var(--bv-white);
    background-color: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

.hero-cta-group {
    display: flex;
    gap: var(--bv-spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .hero-cta-group {
        flex-direction: column;
        align-items: center;
        gap: var(--bv-spacing-sm);
    }
}

/* ==========================================================================
   Content Sections
   ========================================================================== */
.intro-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.intro-section h2 {
    margin-bottom: var(--bv-spacing-md);
}

/* Split Section */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 80vh;
}

.split-section--reverse .split-content {
    order: -1;
}

.split-image {
    background-size: cover;
    background-position: center;
    min-height: 400px;
}

.split-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--bv-spacing-xl);
}

@media (max-width: 992px) {
    .split-section {
        grid-template-columns: 1fr;
    }

    .split-section--reverse .split-content {
        order: 0;
    }
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: var(--bv-spacing-lg);
}

.feature-card__icon {
    width: 60px;
    height: 60px;
    margin-bottom: var(--bv-spacing-md);
}

.feature-card__title {
    font-size: 1.25rem;
    margin-bottom: var(--bv-spacing-sm);
}

/* ==========================================================================
   Projects/Progetti
   ========================================================================== */
.project-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.project-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--bv-transition-slow);
}

.project-card:hover .project-card__image {
    transform: scale(1.05);
}

.project-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--bv-spacing-lg);
    color: var(--bv-white);
}

.project-card__title {
    font-size: 1.75rem;
    margin-bottom: var(--bv-spacing-xs);
    color: var(--bv-white);
}

.project-card__excerpt {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: var(--bv-spacing-sm);
}

.project-card__link {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bv-white);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-card__link:hover {
    opacity: 1;
    gap: 1rem;
}

/* Project Showcase (alternating layout) */
.project-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 80vh;
}

.project-showcase:nth-child(even) .project-showcase__image {
    order: 1;
}

.project-showcase__image {
    background-size: cover;
    background-position: center;
    min-height: 500px;
}

.project-showcase__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--bv-spacing-xl);
    background-color: var(--bv-gray-light);
}

@media (max-width: 992px) {
    .project-showcase {
        grid-template-columns: 1fr;
    }

    .project-showcase:nth-child(even) .project-showcase__image {
        order: 0;
    }
}

/* ==========================================================================
   Team Section
   ========================================================================== */
.team-member {
    text-align: center;
}

.team-member__image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: var(--bv-spacing-md);
    filter: grayscale(100%);
    transition: var(--bv-transition);
}

.team-member:hover .team-member__image {
    filter: grayscale(0%);
}

.team-member__name {
    font-size: 1.5rem;
    margin-bottom: var(--bv-spacing-xs);
}

.team-member__role {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bv-gray-medium);
    margin-bottom: var(--bv-spacing-sm);
}

/* ==========================================================================
   FAQ / Accordion
   ========================================================================== */
.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.accordion-header {
    width: 100%;
    padding: var(--bv-spacing-md) 0;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--bv-font-primary);
    font-size: 1.25rem;
    color: var(--bv-black);
    transition: var(--bv-transition);
}

.accordion-header:hover {
    color: var(--bv-gray-medium);
}

.accordion-icon {
    font-size: 1.5rem;
    transition: var(--bv-transition);
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content__inner {
    padding-bottom: var(--bv-spacing-md);
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

/* ==========================================================================
   Method/Process Steps
   ========================================================================== */
.process-steps {
    counter-reset: step;
}

.process-step {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: var(--bv-spacing-md);
    padding: var(--bv-spacing-lg) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.process-step__number {
    font-family: var(--bv-font-primary);
    font-size: 4rem;
    color: var(--bv-gray-light);
    line-height: 1;
}

.process-step__number::before {
    counter-increment: step;
    content: "0" counter(step);
}

.process-step__title {
    font-size: 1.5rem;
    margin-bottom: var(--bv-spacing-sm);
}

@media (max-width: 768px) {
    .process-step {
        grid-template-columns: 1fr;
    }
}

/* Guarantees Grid */
.guarantee-card {
    padding: var(--bv-spacing-lg);
    background-color: var(--bv-white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--bv-transition);
}

.guarantee-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.guarantee-card__number {
    font-family: var(--bv-font-primary);
    font-size: 3rem;
    color: var(--bv-gray-light);
    margin-bottom: var(--bv-spacing-sm);
}

.guarantee-card__title {
    font-size: 1.25rem;
    margin-bottom: var(--bv-spacing-sm);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--bv-spacing-xl);
}

@media (max-width: 992px) {
    .contact-section {
        grid-template-columns: 1fr;
    }
}

.contact-info__item {
    margin-bottom: var(--bv-spacing-md);
}

.contact-info__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bv-gray-medium);
    margin-bottom: var(--bv-spacing-xs);
}

.contact-info__value {
    font-size: 1.125rem;
}

.contact-info__value a {
    color: var(--bv-black);
}

/* Contact Form */
.contact-form .form-group {
    margin-bottom: var(--bv-spacing-md);
}

.contact-form label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--bv-spacing-xs);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    font-family: var(--bv-font-secondary);
    font-size: 1rem;
    transition: var(--bv-transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--bv-black);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--bv-black);
    color: var(--bv-white);
    padding: var(--bv-spacing-xl) 0 var(--bv-spacing-md);
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--bv-spacing-xl);
    padding-bottom: var(--bv-spacing-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 992px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-main {
        grid-template-columns: 1fr;
    }
}

.footer-brand__logo {
    font-family: var(--bv-font-primary);
    font-size: 1.5rem;
    margin-bottom: var(--bv-spacing-md);
}

.footer-brand__tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
}

.footer-nav__title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--bv-spacing-md);
}

.footer-nav ul {
    list-style: none;
}

.footer-nav li {
    margin-bottom: var(--bv-spacing-xs);
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.footer-nav a:hover {
    color: var(--bv-white);
    opacity: 1;
}

.footer-social {
    display: flex;
    gap: var(--bv-spacing-sm);
    margin-top: var(--bv-spacing-md);
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--bv-white);
    transition: var(--bv-transition);
}

.footer-social a:hover {
    background-color: var(--bv-white);
    color: var(--bv-black);
    opacity: 1;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--bv-spacing-md);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 576px) {
    .footer-bottom {
        flex-direction: column;
        gap: var(--bv-spacing-sm);
        text-align: center;
    }
}

/* ==========================================================================
   WhatsApp Floating Button
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: var(--bv-transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    opacity: 1;
}

.whatsapp-float svg {
    width: 30px;
    height: 30px;
    fill: var(--bv-white);
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float svg {
        width: 22px;
        height: 22px;
    }
}

/* ==========================================================================
   Page Header
   ========================================================================== */
.page-header {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    color: var(--bv-white);
    text-align: center;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bv-overlay);
}

.page-header__content {
    position: relative;
    z-index: 1;
    padding: var(--bv-spacing-xxl) var(--bv-container-padding);
}

.page-header__title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: var(--bv-spacing-sm);
}

.page-header__subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-center {
    text-align: center;
}

.text-white {
    color: var(--bv-white);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-sm {
    margin-bottom: var(--bv-spacing-sm);
}

.mb-md {
    margin-bottom: var(--bv-spacing-md);
}

.mb-lg {
    margin-bottom: var(--bv-spacing-lg);
}

.mt-lg {
    margin-top: var(--bv-spacing-lg);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-delay-1 {
    animation-delay: 0.2s;
}

.animate-delay-2 {
    animation-delay: 0.4s;
}

.animate-delay-3 {
    animation-delay: 0.6s;
}

/* ==========================================================================
   WordPress Specific
   ========================================================================== */
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

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

.alignleft {
    float: left;
    margin-right: var(--bv-spacing-md);
}

.alignright {
    float: right;
    margin-left: var(--bv-spacing-md);
}

/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
