/* CSS Variables */
:root {
    --primary-color: #9DD3D7;
    --text-dark: #555;
    --text-medium: white;
    --text-light: #666;
    --text-gray: #A6A6A6;
    --bg-white: #ffffff;
    --bg-light: #fafafa;
    --border-light: #f0f0f0;
    --border-lighter: #f5f5f5;
    --shadow-light: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 16px 40px rgba(74, 144, 226, 0.12);
    --transition-smooth: all 0.3s ease;
    --transition-medium: all 0.4s ease;
    --border-radius: 8px;
    --border-radius-large: 30px;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Styles */
body {
    font-family: "Instrument Serif", serif;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-white);
    letter-spacing: 0.3px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utility Classes */
.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-thin { font-weight: 200; }
.fw-medium { font-weight: 500; }

.text-center { text-align: center; }

.smooth-transition { transition: var(--transition-smooth); }
.medium-transition { transition: var(--transition-medium); }

/* Card Hover Effect */
.card-hover {
    transition: var(--transition-medium);
    border: 1px solid var(--border-lighter);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(74, 144, 226, 0.1);
}

/* Header */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-texts {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.activity-name {
    font-family: "Instrument Serif", serif;
    margin: 0;
    font-weight: 500;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: #939393;
}

.person-name {
    font-family: "Instrument Serif", serif;
    margin: 0;
    font-weight: 1;
    font-size: clamp(0.7rem, 2.5vw, 1.5rem);
    color: #CACACA;
    padding-left: 1rem;
}

.logo img {
    width: 140px;
    max-width: 100%;
    height: auto;
    display: block;
    opacity: 1;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-family: "Instrument Serif", serif;
    font-style: italic;
    text-decoration: none;
    color: #939393;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
    position: relative;
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px 20px;
    background: 
        linear-gradient(rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.80)),
        url("./images/background_image.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-text {
    max-width: 900px;
    text-align: center;
    z-index: 1;
}

.hero-text p {
    font-size: clamp(1.6rem, 2.6vw, 1.6rem);
    font-style: italic;
    margin-bottom: 20px;
    color: #939393;
    line-height: 1.5;
}

.firma{
    text-align: right;
}
/* Services Section */
.services {
    padding: 50px;
    background: 
        linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
        url("./images/services-bg.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.services-title {
    font-style: italic;
    font-size: clamp(2rem, 7.5vw, 4.5rem);
    color: #9E9E9E;
    text-align: center;
    margin-bottom: 20px;
    line-height: 0.8;
    font-weight: 400;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 80px;
}

.service-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    width: 100%;
}

.service-image {
    width: 100%;
    height: 220px;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.service-content {
    padding: 40px 10px;
}

.service-content h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: 20px;
    color: #939393;
    letter-spacing: 0.5px;
    font-weight: 500;
    text-align: center;
}

.service-content p {
    color: #C6C6C6;
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    font-style: italic;
    text-align: center;
}

/* Button */
.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: var(--border-radius-large);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    letter-spacing: 1px;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    margin: 60px 0;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.2);
    transition: var(--transition-medium);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

/* About Section */
.about {
    padding: 100px 0;
    background-color: var(--primary-color);
    opacity: 0.8;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about p {
    font-style: italic;
    font-size: clamp(1.6rem, 2.6vw, 1.6rem);
    color: var(--text-medium);
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Certifications Section */
.certifications {
    padding: 100px 0;
    overflow: hidden;
    background: 
        linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
        url("./images/services-bg2.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Titolo */
.certifications h2 {
    font-style: italic;
    font-size: clamp(2rem, 7.5vw, 4.5rem);
    color: #9E9E9E;
    text-align: center;
    margin-bottom: 20px;
    line-height: 0.8;
    font-weight: 400;
}

/* Contenitore dei box centrati */
.certifications-boxes {
    display: flex;
    justify-content: center;
    align-items: stretch; /* forza i box ad avere la stessa altezza */
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 80px;
}

/* Singolo box */
.cert-card {
    text-align: center;
    padding: 50px 40px;
    background: var(--bg-white);
    border-radius: 6px;
    flex: 1 1 320px; /* flessibile ma con base minima */
    max-width: 450px;
    min-height: 280px; /* altezza minima uguale per tutti */
    display: flex;
    flex-direction: column;
    justify-content: center; /* centra verticalmente il contenuto */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Titolo del box */
.cert-card h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: 15px;
    color: #939393;
    letter-spacing: 0.5px;
    font-weight: 500;
    text-align: center;
}

/* Testo del box */
.cert-card p {
    color: #C6C6C6;
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    font-style: italic;
    text-align: center;
}

/* Bottone nel box */
.cert-btn {
    display: inline-block;
    margin-top: 25px;
    padding: 10px 25px;
    background-color: var(--primary-color, #9E9E9E); /* fallback se non hai definito la variabile */
    color: white;
    font-size: 0.95rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cert-btn:hover {
    background-color: #7a7a7a;
    transform: translateY(-2px);
}




/* Footer */
.footer {
    background-color: #1a1a1a;
    color: var(--bg-white);
    padding: 80px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 50px;
}

.footer-section h3 {
    margin-bottom: 25px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    color: var(--primary-color);
}

.footer-section p, 
.footer-section a {
    color: var(--text-gray);
    text-decoration: none;
    margin-bottom: 12px;
    display: block;
    font-size: 14px;
    line-height: 1.6;
    transition: var(--transition-smooth);
}

.footer-section a:hover {
    color: var(--primary-color);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

a.service-card {
    text-decoration: none; /* Rimuove la sottolineatura */
    color: inherit;        /* Mantiene il colore del testo originale */
    display: block;        /* Assicura che si comporti come un blocco */
    cursor: pointer;
}

/* Assicura che i titoli dentro le card mantengano il loro colore */
a.service-card h3 {
    color: #939393;
}

/* Hamburger base (desktop hidden) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* Stato attivo animazione */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

/* Responsive Design */

/* Tablet Large - 1024px */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .service-image {
        height: 200px;
    }
    
    .certifications-boxes {
        gap: 25px;
    }
}

/* Tablet - 768px */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .nav-container {
        justify-content: center;
        text-align: center;
    }
    
    .logo {
        gap: 10px;
    }
    
    .logo img {
        width: 100px;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        gap: 20px;
        width: 100%;
        background: var(--bg-white);
        padding: 20px;
        border-top: 1px solid var(--border-light);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .nav-links.active {
        display: flex;
    }

    /* Hero */
    .hero {
        min-height: 500px;
        padding: 40px 20px;
        background-size: 70%;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-text p {
        font-size: clamp(1.3rem, 2.2vw, 1.5rem);
        margin-bottom: 15px;
    }

    /* Services */
    .services {
        padding: 60px 20px;
    }
    
    .services-title {
        font-size: clamp(2rem, 6vw, 3.5rem);
        margin-bottom: 40px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 50px;
    }
    
    .service-card {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .service-image {
        height: 250px;
    }
    
    .service-content {
        padding: 35px 20px;
    }
    
    .service-content h3 {
        font-size: clamp(1.3rem, 2vw, 1.6rem);
        margin-bottom: 15px;
    }
    
    .service-content p {
        font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    }

    .btn-primary {
        margin: 50px 0;
        padding: 14px 35px;
        font-size: clamp(1rem, 2.2vw, 1.3rem);
    }

    /* About */
    .about {
        padding: 80px 20px;
    }
    
    .about-content {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .about p {
        font-size: clamp(1.3rem, 2.2vw, 1.5rem);
        margin-bottom: 20px;
    }

    /* Certifications */
    .certifications {
        padding: 80px 20px;
    }
    
    .certifications h2 {
        font-size: clamp(2rem, 6vw, 3.5rem);
        margin-bottom: 40px;
    }
    
    .certifications-boxes {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin-top: 50px;
    }
    
    .cert-card {
        padding: 40px 30px;
        max-width: 100%;
        min-height: 240px;
        flex: 1 1 auto;
    }
    
    .cert-card h3 {
        font-size: clamp(1.3rem, 2vw, 1.6rem);
    }
    
    .cert-card p {
        font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    }
    
    .cert-btn {
        padding: 12px 28px;
        font-size: 1rem;
    }

    /* Footer */
    .footer {
        padding: 60px 0 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-section h3 {
        margin-bottom: 20px;
        font-size: 1.2rem;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 15px;
        margin-bottom: 10px;
    }
}

/* Mobile Large - 480px */
@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 12px;
    }

    /* Header */
    .logo img {
        width: 80px;
    }
    
    .activity-name {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
    }
    
    .person-name {
        font-size: clamp(0.5rem, 2.5vw, 1rem);
        padding-left: 0.5rem;
    }
    
    .nav-links a {
        padding: 12px 15px;
        font-size: 1.2rem;
    }

    /* Hero */
    .hero {
        min-height: 450px;
        padding: 30px 15px;
        background-size: 85%;
    }
    
    .hero-text p {
        font-size: clamp(1.1rem, 2vw, 1.3rem);
        margin-bottom: 12px;
    }

    /* Services */
    .services {
        padding: 50px 15px;
    }
    
    .services-title {
        font-size: clamp(1.8rem, 5.5vw, 3rem);
        margin-bottom: 30px;
    }
    
    .services-grid {
        gap: 20px;
        margin-top: 40px;
    }
    
    .service-card {
        max-width: 100%;
    }
    
    .service-image {
        height: 250px;
    }
    
    .service-content {
        padding: 30px 15px;
    }
    
    .service-content h3 {
        font-size: clamp(1.2rem, 2vw, 1.4rem);
        margin-bottom: 12px;
    }
    
    .service-content p {
        font-size: clamp(0.85rem, 1.6vw, 1rem);
    }

    .btn-primary {
        margin: 40px 0;
        padding: 12px 30px;
        font-size: clamp(0.95rem, 2vw, 1.2rem);
    }

    /* About */
    .about {
        padding: 60px 15px;
    }
    
    .about p {
        font-size: clamp(1.1rem, 2vw, 1.3rem);
        margin-bottom: 15px;
    }

    /* Certifications */
    .certifications {
        padding: 60px 15px;
    }
    
    .certifications h2 {
        font-size: clamp(1.8rem, 5.5vw, 3rem);
        margin-bottom: 30px;
    }
    
    .certifications-boxes {
        margin-top: 40px;
        gap: 15px;
    }
    
    .cert-card {
        padding: 30px 20px;
        min-height: 220px;
    }
    
    .cert-card h3 {
        font-size: clamp(1.1rem, 2vw, 1.4rem);
        margin-bottom: 12px;
    }
    
    .cert-card p {
        font-size: clamp(0.85rem, 1.6vw, 1rem);
        line-height: 1.5;
    }
    
    .cert-btn {
        padding: 10px 24px;
        font-size: 0.9rem;
        margin-top: 20px;
    }

    /* Footer */
    .footer {
        padding: 50px 0 25px;
    }
    
    .footer-content {
        gap: 35px;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 14px;
    }
}

/* Mobile Small - 375px */
@media (max-width: 375px) {
    .hero {
        min-height: 400px;
        background-size: 95%;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .services-title,
    .certifications h2 {
        font-size: clamp(1.6rem, 5vw, 2.5rem);
    }
    
    .service-image {
        height: 180px;
    }
    
    .cert-card {
        padding: 25px 15px;
        min-height: 200px;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .service-image img,
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }

}

