/*
Theme Name: Estinti Saluti
Author: Luxen Digital Art
Version: 1.0
*/

:root {
    --navy-deep: #0a1632;
    --navy-mid: #162447;
    --blue-royal: #1f3a93;
    --blue-bright: #4a69bd;
    --gold-warm: #f4a261;
    --gold-light: #e9c46a;
    --cream: #fef9f3;
    --shadow-soft: rgba(10, 22, 50, 0.15);
    --shadow-medium: rgba(10, 22, 50, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Crimson Text', serif;
    color: var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
    background: linear-gradient(135deg,
            var(--navy-deep) 0%,
            var(--navy-mid) 25%,
            var(--blue-royal) 50%,
            var(--navy-mid) 75%,
            var(--navy-deep) 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(74, 105, 189, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(244, 162, 97, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(31, 58, 147, 0.2) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 22, 50, 0.85);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(244, 162, 97, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.scrolled {
    padding: 1rem 2rem;
    background: rgba(10, 22, 50, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

nav .container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /* Forza l'uso di tutto lo spazio */

}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    /* Impedisce al logo di andare su due righe */
    flex-shrink: 0;
    /* Impedisce al logo di rimpicciolirsi troppo */
    padding: 15px;

}

.logo-img {
    width: 48px;
    height: auto;
    display: block;
}

.logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gold-warm);
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav a {
    color: var(--cream);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.3px;
    position: relative;
    transition: all 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-warm);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--gold-warm);
}

nav a:hover::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;

}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--gold-warm);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Main Container with Rounded Border */
.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    margin: 100px 40px 40px 40px;
    background: rgba(10, 22, 50, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    border: 2px solid rgba(244, 162, 97, 0.3);
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

section {
    padding: 120px 80px;
    max-width: 1400px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

section:nth-child(1) {
    animation-delay: 0.2s;
}

section:nth-child(2) {
    animation-delay: 0.3s;
}

section:nth-child(3) {
    animation-delay: 0.4s;
}

section:nth-child(4) {
    animation-delay: 0.5s;
}

section:nth-child(5) {
    animation-delay: 0.6s;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 10px 80px 120px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(244, 162, 97, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-icon {
    width: 360px;

    height: auto;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4.5rem;
    font-weight: 600;
    color: var(--gold-warm);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.6rem;
    color: var(--cream);
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-style: italic;
    font-weight: 300;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.9;
    max-width: 900px;
    margin: 0 auto;
    color: rgba(254, 249, 243, 0.85);
}

/* Section Styles */
h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 600;
    color: var(--gold-warm);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-warm), transparent);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.card {
    background: rgba(31, 58, 147, 0.2);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(244, 162, 97, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1; /* Aggiungi questo per la gestione dei livelli */
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(244, 162, 97, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1; /* Sposta l'effetto luce SOTTO il testo e i link */
    pointer-events: none; /* Rende l'effetto invisibile al mouse */
}

/* Forza la cliccabilità di tutti i link dentro le card */
.card a {
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
}


.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--gold-warm);
    box-shadow: 0 15px 40px rgba(244, 162, 97, 0.2);
}

.card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: var(--gold-light);
    margin-bottom: 1rem;
    font-weight: 600;
}

.card p,
.card li {
    font-size: 1.15rem;
    line-height: 1.8;
    color: rgba(254, 249, 243, 0.85);
}

ul {
    list-style: none;
    margin-top: 1.5rem;
}

li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 1rem;
}

li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--gold-warm);
    font-size: 1.5rem;
    line-height: 1.8rem;
}

/* Contact Form */
.contact-form {
    max-width: 700px;
    margin: 3rem auto 0;
    background: rgba(31, 58, 147, 0.2);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(244, 162, 97, 0.2);
}

.form-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    font-size: 1.1rem;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input,
textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(10, 22, 50, 0.4);
    border: 1px solid rgba(244, 162, 97, 0.3);
    border-radius: 12px;
    color: var(--cream);
    font-family: 'Crimson Text', serif;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold-warm);
    background: rgba(10, 22, 50, 0.6);
    box-shadow: 0 0 0 3px rgba(244, 162, 97, 0.1);
}

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

button {
    width: 100%;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, var(--gold-warm), var(--gold-light));
    border: none;
    border-radius: 12px;
    color: var(--navy-deep);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(244, 162, 97, 0.4);
}

button:active {
    transform: translateY(0);
}

/* Timeline Styles */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 4rem auto 0;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg,
            transparent 0%,
            var(--gold-warm) 10%,
            var(--gold-warm) 90%,
            transparent 100%);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.timeline-item:nth-child(1) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.4s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.6s;
}

.timeline-item.left .timeline-content {
    margin-left: 0;
    margin-right: auto;
    padding-right: 60px;
    width: calc(50% - 30px);
}

.timeline-item.right .timeline-content {
    margin-left: auto;
    margin-right: 0;
    padding-left: 60px;
    width: calc(50% - 30px);
}

.timeline-content {
    position: relative;
    background: rgba(31, 58, 147, 0.2);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(244, 162, 97, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 3px;
    background: var(--gold-warm);
    transform: translateY(-50%);
}

.timeline-item.left .timeline-content::before {
    right: -40px;
}

.timeline-item.right .timeline-content::before {
    left: -40px;
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--gold-warm);
    border: 4px solid var(--navy-deep);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 4px rgba(244, 162, 97, 0.3);
}

.timeline-item.left .timeline-content::after {
    right: -50px;
}

.timeline-item.right .timeline-content::after {
    left: -50px;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--gold-warm);
    box-shadow: 0 15px 40px rgba(244, 162, 97, 0.2);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 2.5rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--gold-warm), var(--gold-light));
    color: var(--navy-deep);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 5px 20px rgba(244, 162, 97, 0.4);
}

.timeline-content h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: var(--gold-light);
    margin-bottom: 1rem;
    margin-top: 1rem;
    font-weight: 600;
}

.timeline-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: rgba(254, 249, 243, 0.85);
}

@media (max-width: 768px) {



    .timeline::before { 
        left: 15px; /* Spostata più a sinistra */
        width: 1px; /* Linea più sottile */
        opacity: 0.5;
    }

     .timeline-item {
        justify-content: flex-start;
    }


    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        width: calc(100% - 70px); /*quello che sto modificando*/
        margin-left: 60px;
        margin-right: 0;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .timeline-item.left .timeline-content::before,
    .timeline-item.right .timeline-content::before {
        left: -40px;
        right: -40px;
    }

    .timeline-item.left .timeline-content::after,
    .timeline-item.right .timeline-content::after {
        left: -50px;
        right: auto;
    }

    .step-number {
        left: 1.5rem;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    background: rgba(10, 22, 50, 0.5);
    border-top: 1px solid rgba(244, 162, 97, 0.2);
    color: rgba(254, 249, 243, 0.7);
    font-size: 1rem;
}

footer p {
    margin-bottom: 0.5rem;
}

.credit {
    font-style: italic;
    color: var(--gold-light);
}

/* --- RESPONSIVE (MOBILE) --- */
@media (max-width: 768px) {
    .hero-icon {
        margin-left: -30px;
        margin-top: -60px;
        margin-bottom: -60px;
        width: 280px;
        height: auto;
        display: inline-block;

    }

    .hero {
        padding: 30px 15px 60px;
    }

    .hero-description {
        font-size: 1.1rem;
        line-height: 1.6;
        padding: 0 5px;
        margin-bottom: 3rem;
    }



    nav {
        padding: 1rem 1.2rem;
    }

    nav .container {
        display: flex;
        justify-content: space-between;
        /* Spinge logo a sinistra e hamburger a destra */
        align-items: center;
        width: 100%;
    }

    .logo-text {
        font-size: 1.5rem;
        /* Riduce leggermente il font per fare spazio */
    }

    .hamburger {
        display: flex;
        margin-left: auto;
        /* Forza l'hamburger a destra */
    }

    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        background: rgba(10, 22, 50, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 30px;
        transition: right 0.4s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }

    nav ul.active {
        right: 0;
    }

    .page-wrapper {
        margin: 80px 10px 10px 10px;
        border-radius: 25px;
    }

    section {
        padding: 50px 15px;
    }

    h1 {
        font-size: 2.2rem;
    }


    

   
     .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        width: calc(100% - 40px); /* Molto più larga */
        margin-left: 50px; /* Margine ridotto da 60 a 40 */
        padding: 1.2rem; /* Padding interno ridotto per dare spazio al testo */
    }

    .timeline-content::before {
        left: -25px;
        width: 25px;
    }

   

    
    
   
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.25rem;
    }

    /* Font ancora più piccolo per smartphone stretti */
    .logo-img {
        width: 36px;
    }

    nav {
        padding: 1rem 1rem;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    background: rgba(10, 22, 50, 0.5);
    border-top: 1px solid rgba(244, 162, 97, 0.2);
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 40px;
    border: 2px solid var(--gold-warm);
    border-radius: 12px;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--gold-warm);
    border-radius: 25px;
    opacity: 0.6;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--gold-warm);
    border-radius: 50%;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 20px);
        opacity: 0;
    }
}

/* Per far sì che CF7 accetti i tuoi stili */
.wpcf7-form .form-group {
    margin-bottom: 2rem;
}

.wpcf7-form-control.wpcf7-text,
.wpcf7-form-control.wpcf7-textarea {
    /* qui usa le proprietà del tuo vecchio input/textarea */
    width: 100%;
    padding: 1rem;
    background: rgba(10, 22, 50, 0.4);
    border: 1px solid rgba(244, 162, 97, 0.3);
    color: white;
}

.wpcf7-submit {
    /* qui usa le proprietà del tuo vecchio button */
    background: linear-gradient(135deg, var(--gold-warm), var(--gold-light));
    cursor: pointer;
    width: 100%;
    border: none;
    padding: 1.2rem;
    font-weight: 600;
}