/* ===================================================================
   CORPORESANO - STYLE.CSS
   =================================================================== */

/* ============================ */
/*      VARIABILI E RESET       */
/* ============================ */
:root {
    --primary-color: #d4af37; /* Oro */
    --dark-bg: #121212;
    --light-bg: #f4f4f4;
    --text-light: #ffffff;
    --text-dark: #333333;
    --navbar-bg: rgba(18, 18, 18, 0.9);
    --font-family: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--text-light);
    color: var(--text-dark);
}

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

a:hover {
    color: #b89a30;
}

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

.section-padding {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 900;
}

#staff .section-title {
    margin-bottom: 3rem;
}

.bg-light {
    background-color: var(--light-bg);
}

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

/* ============================ */
/*      HEADER & NAVBAR         */
/* ============================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    transition: background-color 0.4s ease, padding 0.4s ease;
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0.7) 0%, rgba(18, 18, 18, 0) 100%);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar.scrolled {
    background-color: var(--navbar-bg);
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
}


.navbar.show-logo .navbar-logo {
    opacity: 1;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 700;
    position: relative;
    padding-bottom: 0.25rem;
}

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

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

/* ============================ */
/*     SEZIONE LOGO INIZIALE    */
/* ============================ */
#home {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}
#hero-logo-container {
    display: flex;
    justify-content: center;
}

.hero-logo {
    max-width: 90%;
    max-height: 70vh;
    width: auto;
    height: auto;
}



/* ============================ */
/*         SERVIZI SECTION        */
/* ============================ */
.section-main-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.section-tagline {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #777;
    margin-bottom: 3rem;
    text-transform: uppercase;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.service-card {
    text-align: center;
    padding: 1rem;
}

.service-card img {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem auto;
    transition: transform 0.3s ease;
}

.service-card:hover img {
    transform: scale(1.1);
}

.service-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
}


/* ============================ */
/*      SEZIONE MOTTO/CTA       */
/* ============================ */
.motto-section {
    background-color: var(--dark-bg);
    color: var(--text-light);
    text-align: center;
}

.motto-section h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.motto-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--dark-bg);
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #b89a30;
    color: var(--dark-bg);
    transform: translateY(-3px);
}

/* ============================ */
/*       LAYOUT A 2 COLONNE     */
/* ============================ */
.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.column-image img {
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.column-text h2 {
    font-size: 2.2rem;
}

.column-subtitle {
    font-size: 0.9rem;
    text-align: center;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.treatment-list {
    list-style: none;
    padding-left: 0;
    margin-top: 1.5rem;
}

.treatment-list li {
    font-size: 1.1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.treatment-list li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 1rem;
    font-size: 1.2rem;
}

/* ============================ */
/*         STAFF SECTION        */
/* ============================ */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.staff-member {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 1rem; /* Add padding at the bottom for content */
    position: relative;
}

.plus-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 25px;
    height: 25px;
    z-index: 1;
    opacity: 1;
    transform: scale(1);
    transition: transform 0.3s ease;
}

@media (min-width: 600px) {
    .plus-icon {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .staff-member:hover .plus-icon {
        opacity: 1;
        transform: scale(1) rotate(90deg);
    }
}

.plus-icon::before,
.plus-icon::after {
    content: '';
    position: absolute;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.plus-icon::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    transform: translateY(-50%);
}

.plus-icon::after {
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    transform: translateX(-50%);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}


.staff-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.staff-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    margin: 1.5rem auto 1rem auto; /* Adjust margin-top */
    border: 4px solid var(--primary-color); /* Changed border color */
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.staff-member:hover img {
    transform: scale(1.05); /* Slightly less aggressive scale on image */
    border-color: var(--dark-bg); /* Change border color on hover */
}

.staff-member-info {
    text-align: center;
    padding: 0 1rem;
    width: 100%; /* Ensure it takes full width */
}

.staff-member-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
    font-weight: 700;
}

.staff-member-info h4 {
    font-size: 0.9rem;
    color: #777; /* A slightly muted color for the role */
    margin-bottom: 1rem;
    font-weight: 500;
}

.staff-member .view-profile {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.staff-member .view-profile:hover {
    color: var(--dark-bg);
}

.staff-member .view-profile i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.staff-member:hover .view-profile i {
    transform: translateX(5px);
}


/* ============================ */
/*      TESTIMONIALS SECTION    */
/* ============================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.testimonial-card {
    background-color: #fdfdfd;
    border: 1px solid #eee;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.testimonial-card blockquote {
    margin: 0;
    flex-grow: 1; /* Makes sure the quote takes up available space */
    position: relative;
    padding-left: 2rem;
}

.testimonial-card blockquote::before {
    content: '“';
    position: absolute;
    left: -10px;
    top: -10px;
    font-size: 4rem;
    color: var(--primary-color);
    font-family: 'Merriweather', serif;
    opacity: 0.5;
}

.testimonial-card blockquote p {
    font-family: 'Merriweather', serif;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.7;
}

.testimonial-card cite {
    display: block;
    text-align: right;
    margin-top: 1rem;
    font-weight: 700;
    font-style: normal;
    color: var(--text-dark);
}

/* ============================ */
/*   MODALE STAFF (SWIPER)    */
/* ============================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #fff;
    padding: 1rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    overflow: hidden; /* Added to hide overflowing content */
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2.5rem;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 20;
}

.close-modal:hover {
    color: var(--primary-color);
}

.staff-swiper {
    width: 100%;
    height: auto;
    padding-bottom: 40px;
}

.swiper-slide {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 2.5rem;
    min-height: auto;
}

.swiper-slide img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    margin-bottom: 1rem;
    border: 4px solid var(--light-bg);
}

.swiper-slide h3 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.swiper-slide h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.swiper-slide p.bio {
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    padding-right: 0;
}

.staff-swiper .swiper-button-next,
.staff-swiper .swiper-button-prev {
    color: var(--primary-color);
}

.staff-swiper .swiper-pagination-bullet-active {
    background: var(--primary-color);
}


/* ============================ */
/*       CONTATTI SECTION       */
/* ============================ */
.column-form form {
    display: flex;
    flex-direction: column;
}

.column-form input, .column-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-family);
}

.column-form button {
    align-self: flex-start;
}

.column-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.column-info p {
    margin-bottom: 1rem;
}

.map-container {
    margin-top: 2rem;
    border-radius: 10px;
    overflow: hidden;
}

/* ============================ */
/*           FOOTER             */
/* ============================ */
footer {
    background: var(--dark-bg);
    color: var(--text-light);
    text-align: center;
    padding: 2rem 0;
}

.social-icons a {
    color: var(--text-light);
    margin: 0 0.5rem;
    font-size: 1.5rem;
}

.social-icons {
    margin-bottom: 1rem;
}

#nutrizione p {
    text-align: center;
}

.contact-section-bg {
    background-color: var(--dark-bg);
    color: var(--text-light);
}

.contact-section-bg .section-title {
    color: var(--text-light);
}

.social-icons-contatti {
    margin-top: 2rem;
}

.social-icons-contatti a {
    color: var(--text-light);
    margin: 0 1rem;
    font-size: 2rem;
    transition: color 0.3s ease;
}

.social-icons-contatti a:hover {
    color: var(--primary-color);
}

.service-card-link {
    text-decoration: none;
    color: inherit;
}
/* ============================ */
/*    WHATSAPP FLOAT BUTTON     */
/* ============================ */

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.whatsapp-float.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.whatsapp-float:hover {
    background-color: #128C7E;
}

/* ============================ */
/*       RESPONSIVITÀ           */
/* ============================ */

@media (min-width: 599px) {
    .hero-section {
        position: relative;
        overflow: hidden;
    }

    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('asset/hom_page.webp');
        background-color: var(--dark-bg);
        background-size: cover;
        background-position: center;
        filter: blur(5px);
        z-index: -1;
    }
}

@media (max-width: 599px) {

    #home {
        background-color: var(--dark-bg);
    }

    .nav-links {
        display: none;
    }
    
    .navbar .container {
        justify-content: center;
    }

    .two-columns {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    #estetica .column-image, 
    #nutrizione .column-image {
        order: 2;
    }

    #estetica .column-text,
    #nutrizione .column-text {
        order: 1;
    }

    .column-text {
        width: 100%;
    }

    .treatment-list {
        padding-left: 2rem;
    }

    .column-image {
        margin-bottom: 0;
    }

    .section-title, .section-main-title {
        font-size: 2rem;
    }

    .section-tagline {
        font-size: 1.2rem;
    }

    .motto-section h1 {
        font-size: 2.5rem;
    }

    .staff-swiper .swiper-button-next,
    .staff-swiper .swiper-button-prev {
        display: none;
    }

    .staff-grid-wrapper {
        position: relative;
        max-height: 586px;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
    }

    .staff-grid-wrapper.expanded {
        max-height: 10000px; /* Makes sure the max-height will be greater than the content */
        transition: max-height 3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .expand-staff-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 40px;
        background: linear-gradient(to top, #a09b9bb3 0%, rgba(18, 18, 18, 0) 100%);
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: flex-end;
        padding-bottom: 1rem;
    }

    .expand-staff-overlay::after {
        content: '';
        display: block;
        width: 20px;
        height: 20px;
        border-left: 3px solid var(--primary-color);
        border-bottom: 3px solid var(--primary-color);
        transform: rotate(-45deg);
    }

    .staff-grid-wrapper.expanded .expand-staff-overlay {
        display: none;
    }

    .plus-icon {
        animation: pulse 2s infinite;
    }

    #terapie, #estetica, #fitness, #nutrizione {
        position: relative;
        background-size: cover;
        background-position: center;
        color: white;
        padding: 4rem 2rem;
    }

    #terapie::before, #estetica::before, #fitness::before, #nutrizione::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 0;
    }

    #terapie .container, #estetica .container, #fitness .container, #nutrizione .container {
        position: relative;
        z-index: 1;
    }

    #terapie .column-image, #estetica .column-image, #fitness .column-image, #nutrizione .column-image {
        display: none;
    }

    #terapie .section-title, #estetica .section-title, #fitness .section-title, #nutrizione .section-title,

    #terapie .treatment-list li, #estetica .treatment-list li, #fitness .treatment-list li,
    #nutrizione p {
        color: white;
    }

    #terapie .treatment-list li::before, #estetica .treatment-list li::before, #fitness .treatment-list li::before {
        color: var(--primary-color);
    }

    #terapie {
        background-image: url('asset/services/terapia-640w.webp');
    }

    #estetica {
        background-image: url('asset/services/estetica-640w.webp');
        background-color: transparent;
    }

    #fitness {
        background-image: url('asset/services/fitness-640w.webp');
    }

    #nutrizione {
        background-image: url('asset/services/nutrizione-640w.webp');
        background-color: transparent;
    }
    .whatsapp-float {
        right: 10px;
        bottom: 20px;
        width: 3rem;
        height: 3rem;
    }

}

/* ============================ */
/*      ANIMATIONS              */
/* ============================ */

.fade-in-element {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.fade-in-element.is-visible {
  opacity: 1;
}

.slide-in-element {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}
.slide-in-element.slide-from-right {
  transform: translateX(30px);
}

.slide-in-element.is-visible {
  opacity: 1;
  transform: translateX(0);
}