/*
Theme Name: lucatripaldi.com
Theme URI: https://lucatripaldi.com
Author: LukeLAB
Author URI: 
Description: Tema personalizzato per lucatripaldi.com
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: lucatripaldi
Tags: custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ---------------------------------------------------------------------------
   CSS Variables & Base
   --------------------------------------------------------------------------- */
:root {
    --color-accent: #AD9D78;
    --color-text: #000000;
    --color-bg: #ffffff;
    --color-muted: #666666;
    --font-display: 'Anton', sans-serif;
    --font-body: 'Noto Serif', serif;
    --font-size: 0.9rem;
    --max-width: 960px;
    --content-width: 760px;
    --sidebar-width: 180px;
    --spacing: 40px;
}

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

html {
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--font-size);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

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

a:hover,
a:focus {
    color: var(--color-accent);
}

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

/* ---------------------------------------------------------------------------
   Typography
   --------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-body);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 1rem;
    color: var(--color-accent);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.1rem;
    color: var(--color-accent) !important;
}

h3 {
    font-size: 1.3rem;
}

p {
    margin: 0 0 1rem;
}

strong,
b {
    font-weight: 700;
}

/* ---------------------------------------------------------------------------
   Layout
   --------------------------------------------------------------------------- */
.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-wrapper {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
    gap: 0.25rem;
    flex: 1;
    align-items: start;
}

.site-content-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.site-header {
    padding: 0 0 1rem;
    position: relative;
}

.site-header__inner {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    position: relative;
}

.site-branding {
    text-align: right;
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    position: relative;
}

/* Gradient fade behind the header, visible only when sticky */
.site-header::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: -2rem;
    right: 0;
    bottom: -6rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.92) 25%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body.sticky-header .site-header.is-stuck::before {
    opacity: 1;
}

.site-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.site-title a {
    color: inherit;
}

.logo-luca {
    color: var(--color-accent);
}

.logo-tripaldi {
    color: var(--color-text);
}

.site-main {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.site-sidebar {
    position: sticky;
    top: 2rem;
    text-align: center;
    z-index: 100;
}

/* ---------------------------------------------------------------------------
   Navigation
   --------------------------------------------------------------------------- */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0 0 0.6rem;
}

.main-navigation a {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-accent);
    text-transform: lowercase;
    display: inline-block;
    transition: color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item a,
.main-navigation .current-menu-ancestor a,
.main-navigation .current_page_item a {
    color: var(--color-text);
}

/* Mobile toggle */
.menu-toggle {
    display: none;
    position: absolute;
    top: 2.2rem;
    right: 1rem;
    background: transparent;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    font-family: var(--font-display);
    font-size: 1rem;
    text-transform: lowercase;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle:hover,
.menu-toggle:focus {
    color: var(--color-text);
    border-color: var(--color-text);
}

.menu-toggle[aria-expanded="true"] {
    color: var(--color-text);
    border-color: var(--color-text);
}

/* Mobile navigation container (visible only on mobile) */
.mobile-navigation {
    display: none;
}

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

.entry-title {
    margin: 0;
}

.entry-content {
    margin-top: 1.5rem;
}

.entry-content > * {
    margin-bottom: 0.1rem;
}

.entry-content strong {
    color: var(--color-text);
}

.entry-content a {
    color: var(--color-text);
    text-decoration: underline;
}

.entry-content a:hover,
.entry-content a:focus {
    color: var(--color-accent);
}

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

.post-thumbnail img {
    width: 100%;
}

/* ---------------------------------------------------------------------------
   WordPress blocks
   --------------------------------------------------------------------------- */
.wp-block-image {
    margin: 0 0 1.5rem;
}

.wp-block-image img {
    display: block;
}

.wp-block-video,
.wp-block-embed {
    margin: 0 0 1.5rem;
}

.wp-block-video video,
.wp-block-embed iframe {
    width: 100%;
}

.wp-block-columns {
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.wp-block-column > *:first-child {
    margin-top: 0;
}

.wp-block-column > *:last-child {
    margin-bottom: 0;
}

.wp-block-button {
    margin-bottom: 1rem;
}

/* WordPress alignments */
.alignwide {
    max-width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-right: -2rem;
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* ---------------------------------------------------------------------------
   Utility classes
   --------------------------------------------------------------------------- */
.btn-outline,
.wp-block-button__link {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    border-radius: 999px;
    padding: 0.4rem 1.2rem;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.btn-outline:hover,
.wp-block-button__link:hover {
    color: var(--color-bg);
    background: var(--color-accent);
}

.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;
}

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.site-footer {
    padding: 2rem 2rem 4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--color-muted);
    background: var(--color-bg);
}

.site-footer__inner {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

.footer-widget-area {
    min-width: 0;
}

.footer-widget-1,
.footer-widget-2 {
    text-align: left;
}

.footer-widget-3 {
    text-align: right;
}

.site-footer .widget {
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.site-footer .widget:last-child {
    margin-bottom: 0;
}

.site-footer .widget-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    text-transform: lowercase;
    color: var(--color-text);
    margin: 0 0 1rem;
}

.site-footer .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer .widget li {
    margin: 0 0 0.5rem;
}

.site-footer .widget a {
    color: var(--color-text);
    padding: 0px !important;
}

.site-footer .widget a:hover,
.site-footer .widget a:focus {
    color: var(--color-accent);
}

/* ---------------------------------------------------------------------------
   Sticky header option
   --------------------------------------------------------------------------- */
body.sticky-header .site {
    padding-top: 4rem;
}

body.sticky-header .site-header {
    position: sticky;
    top: 1rem;
    z-index: 1000;
    padding-top: 0;
}

body.sticky-header .site-sidebar {
    top: 1rem;
}

body.sticky-header .site-header__inner {
    align-items: flex-start;
}

@media (max-width: 1024px) {
    body.sticky-header .site {
        padding-top: 3rem;
    }
}

@media (max-width: 768px) {
    body.sticky-header .site {
        padding-top: 0.5rem;
    }
}

/* ---------------------------------------------------------------------------
   Responsive - Tablet
   --------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 160px;
    }

    .site-header {
        padding: 3rem 0 0;
    }

    .site-header__inner {
        padding: 0 2rem;
    }

    .site-title {
        font-size: 2.4rem;
    }

    .site-wrapper {
        padding: 3rem 2rem 2rem;
    }

    .main-navigation a {
        font-size: 1.3rem;
    }

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

/* ---------------------------------------------------------------------------
   Responsive - Mobile
   --------------------------------------------------------------------------- */
@media (max-width: 768px) {
    :root {
        --content-width: 100%;
    }

    .site-header {
        padding: 0;
    }

    body.sticky-header .site-header {
        top: 0;
    }

    body.sticky-header .site-header__inner {
        align-items: center;
    }

    .site-header__inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 1rem 1rem;
    }

    .site-branding {
        width: 100%;
        max-width: none;
        text-align: center;
        flex: 0 0 auto;
    }
    
    .site-header::before {
        bottom: -2rem;
    }

    .menu-toggle {
        display: block;
        position: static;
        margin: 0.75rem auto 0;
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
        background: rgba(255, 255, 255, 0.65);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }

    /* Gradient fade behind the header, same as sticky desktop */
    body.sticky-header .site-header::before,
    body.sticky-header .site-header.is-stuck::before,
    .site-header::before {
        opacity: 1;
        left: -1rem;
        right: -1rem;
    }

    /* Extend the gradient when the mobile menu is open so content stays covered */
    .site-header.mobile-menu-open::before {
        bottom: -50rem;
        background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.98) 60%, rgba(255, 255, 255, 0) 100%);
    }

    .site-sidebar {
        display: none;
    }

    .site-title {
        font-size: 2rem;
    }

    .mobile-navigation {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: max-height 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
        background: transparent;
        text-align: center;
        padding: 1rem 1rem 0;
        z-index: 10;
    }

    .mobile-navigation.toggled {
        max-height: 500px;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .mobile-navigation .main-navigation {
        background: transparent;
        padding: 0;
    }

    .mobile-navigation .main-navigation ul {
        background: transparent;
    }

    .site-wrapper {
        grid-template-columns: 1fr;
        padding: 0 1rem 1rem;
    }

    .main-navigation li {
        margin: 0 0 0.75rem;
    }

    .main-navigation a {
        font-size: 1.4rem;
    }

    .site-footer {
        padding: 2rem 1rem 3rem;
    }

    .footer-widget-1,
    .footer-widget-2,
    .footer-widget-3 {
        text-align: left;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    /* ---------------------------------------------------------------------------
       Mobile alignment options
       --------------------------------------------------------------------------- */
    .mobile-logo-left .site-branding {
        text-align: left;
    }

    .mobile-logo-center .site-branding {
        text-align: center;
    }

    .mobile-logo-right .site-branding {
        text-align: right;
    }

    .mobile-menu-toggle-left .menu-toggle {
        align-self: flex-start;
        margin: 0.75rem auto 0 0;
    }

    .mobile-menu-toggle-center .menu-toggle {
        align-self: center;
        margin: 0.75rem auto 0;
    }

    .mobile-menu-toggle-right .menu-toggle {
        align-self: flex-end;
        margin: 0.75rem 0 0 auto;
    }

    .mobile-menu-links-left .mobile-navigation {
        text-align: left;
    }

    .mobile-menu-links-center .mobile-navigation {
        text-align: center;
    }

    .mobile-menu-links-right .mobile-navigation {
        text-align: right;
    }
}


/* =========================================
   WPForms - Full Width & Border Bottom
   Tema WordPress
   ========================================= */


/* -----------------------------------------
   1. TUTTI I CAMPI FULL WIDTH
   ----------------------------------------- */

.wpforms-container .wpforms-field {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}


/* -----------------------------------------
   2. INPUT, TEXTAREA E SELECT
   ----------------------------------------- */

.wpforms-container .wpforms-field input[type="text"],
.wpforms-container .wpforms-field input[type="email"],
.wpforms-container .wpforms-field input[type="tel"],
.wpforms-container .wpforms-field input[type="number"],
.wpforms-container .wpforms-field input[type="url"],
.wpforms-container .wpforms-field input[type="date"],
.wpforms-container .wpforms-field input[type="password"],
.wpforms-container .wpforms-field textarea,
.wpforms-container .wpforms-field select {

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    box-sizing: border-box !important;

    /* Solo bordo inferiore */
    border: none !important;
    border-bottom: 1px solid #cccccc !important;

    border-radius: 0 !important;

    /* Sfondo */
    background: transparent !important;

    /* Testo */
    color: #444444 !important;

    /* Spaziatura */
    padding: 12px 0 !important;

    /* Rimuove effetti */
    box-shadow: none !important;
}


/* -----------------------------------------
   3. FOCUS
   ----------------------------------------- */

.wpforms-container .wpforms-field input:focus,
.wpforms-container .wpforms-field textarea:focus,
.wpforms-container .wpforms-field select:focus {

    border: none !important;
    border-bottom: 2px solid #ad9d78 !important;

    border-radius: 0 !important;

    outline: none !important;
    box-shadow: none !important;
}


/* -----------------------------------------
   4. NOME E COGNOME FULL WIDTH
   ----------------------------------------- */

/* Riga del campo Nome */
.wpforms-container .wpforms-field-name .wpforms-field-row {

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 0 !important;
}


/* Colonne Nome e Cognome */
.wpforms-container .wpforms-field-name
.wpforms-field-row-block {

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    padding: 0 !important;

    margin: 0 0 15px 0 !important;
}


/* Input Nome e Cognome */
.wpforms-container .wpforms-field-name input {

    width: 100% !important;
    max-width: 100% !important;
}


/* -----------------------------------------
   5. TUTTE LE RIGHE DEI CAMPI
   ----------------------------------------- */

.wpforms-container .wpforms-field-row {

    width: 100% !important;
    max-width: 100% !important;
}


/* -----------------------------------------
   6. TEXTAREA
   ----------------------------------------- */

.wpforms-container .wpforms-field-textarea textarea {

    width: 100% !important;
    max-width: 100% !important;

    min-height: 120px;

    resize: vertical;
}


/* -----------------------------------------
   7. SELECT / DROPDOWN
   ----------------------------------------- */

.wpforms-container .wpforms-field-select select {

    width: 100% !important;
    max-width: 100% !important;

    cursor: pointer;
}


/* -----------------------------------------
   8. CHECKBOX E RADIO
   ----------------------------------------- */

/* Mantieni le dimensioni normali */
.wpforms-container input[type="checkbox"],
.wpforms-container input[type="radio"] {

    width: auto !important;
    max-width: none !important;

    border: initial !important;
    padding: initial !important;
    background: initial !important;
}


/* -----------------------------------------
   9. LABEL
   ----------------------------------------- */

.wpforms-container .wpforms-field-label {

    color: #262626 !important;

    margin-bottom: 6px !important;
}


/* -----------------------------------------
   10. PLACEHOLDER
   ----------------------------------------- */

.wpforms-container input::placeholder,
.wpforms-container textarea::placeholder {

    color: #999999 !important;
    opacity: 1;
}


/* -----------------------------------------
   11. ERRORI
   ----------------------------------------- */

.wpforms-container .wpforms-field input.wpforms-error,
.wpforms-container .wpforms-field textarea.wpforms-error,
.wpforms-container .wpforms-field select.wpforms-error {

    border: none !important;
    border-bottom: 1px solid #ff0000 !important;
}


/* -----------------------------------------
   12. PULSANTE INVIO
   ----------------------------------------- */

.wpforms-container .wpforms-submit {

    background-color: #ad9d78 !important;

    border: 1px solid #a19574 !important;
    border-radius: 5px !important;

    color: #ffffff !important;

    padding: 12px 25px !important;

    cursor: pointer;
}


/* -----------------------------------------
   13. RIMOZIONE SPAZI LATERALI
   ----------------------------------------- */

.wpforms-container .wpforms-field-row-block {

    padding-left: 0 !important;
    padding-right: 0 !important;
}