/**
 * Sections Styles
 * Stili per tutte le sezioni della landing page
 * (Saranno popolati nelle fasi successive)
 */

/* ========== TRANSIZIONI BORDO SFONDO ========== */

/* Colore di fondo locale per l'effetto "fade" — eredita i CSS var del tema */
.section-home       { --section-bg: var(--color-bg-main); }
.section-attivita   { --section-bg: var(--color-bg-alt);  }
.section-formazione { --section-bg: var(--color-bg-main); }
.section-contatti   { --section-bg: var(--color-bg-alt);  }

/* Base pseudo-elementi: z-index: -1 dentro isolation:isolate → sopra background, sotto contenuto */
.section[class*="bg-transition-top-"]::before,
.section[class*="bg-transition-bottom-"]::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 100px;
    pointer-events: none;
    z-index: 1;
}
.section[class*="bg-transition-top-"]::before   { top: 0; }
.section[class*="bg-transition-bottom-"]::after { bottom: 0; }

/* Sfocatura */
.section.bg-transition-top-blur::before {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}
.section.bg-transition-bottom-blur::after {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    mask-image: linear-gradient(to top, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 0%, transparent 100%);
}

/* Dissolvi → colore di fondo della sezione */
.section.bg-transition-top-fade::before    { background: linear-gradient(to bottom, var(--section-bg), transparent); }
.section.bg-transition-bottom-fade::after  { background: linear-gradient(to top,    var(--section-bg), transparent); }

/* Scurisci */
.section.bg-transition-top-darken::before   { background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent); }
.section.bg-transition-bottom-darken::after { background: linear-gradient(to top,    rgba(0,0,0,0.4), transparent); }

/* ========== HOME SECTION ========== */
.section.section-home {
    background:
        linear-gradient(to bottom, rgba(216, 199, 200, 0.0), rgba(216, 199, 200, 0.0)),
        var(--bg-url, none)
        center center / cover no-repeat;
    background-color: var(--color-bg-main);
}

.section-home {
    text-align: center;
    justify-content: center;
}

.profile-image-container {
    margin-bottom: 30px;
}

.profile-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    border: 5px solid var(--color-detail);
    box-shadow: 0 8px 30px rgba(61, 143, 163, 0.3);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(61, 143, 163, 0.4);
}

.main-subtitle {
    font-family: var(--font-main);
    font-size: 2rem;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--color-detail);
    margin-bottom: 20px;
}

.main-title {
    font-family: var(--font-heading); /* Source Serif 4 */
    font-size: 3rem;
    font-weight: 400; /* Regular per Serif */
    color: var(--color-text);
    margin-bottom: 20px;
    line-height: 1;
    animation: fadeIn 0.8s ease 0.2s backwards;
}

.home-description {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--color-text);
    max-width: 580px;
    margin: -10px auto 20px;
    line-height: 1.6;
    text-align: center;
}

.hero-professional-order {
    font-family: var(--font-body);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--color-detail);
    margin: -20px auto 20px;
    text-align: center;
}

.home-quote {
    font-family: var(--font-quote);
    font-size: 1.7rem;
    font-style: normal;
    color: var(--color-text);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
    width: fit-content;
    max-width: min(600px, calc(100% - 2rem));
    margin: 0 auto;
    line-height: 1.3;
    padding: 20px 36px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    animation: fadeIn 1s ease 0.4s backwards;
}

@media (max-width: 600px) {
    .home-quote {
        font-size: 1.3rem;
        padding: 14px 16px;
        border-radius: 18px;
    }
}

/* ========== ATTIVITÀ SECTION ========== */
.section.section-attivita {
    background:
        linear-gradient(to bottom, rgba(216, 199, 200, 0.00), rgba(216, 199, 200, 0.00)),
        var(--bg-url, none)
        center center / cover no-repeat;
    background-color: var(--color-bg-alt);
}

.section-attivita .container {
    max-width: 960px;
}

.main-activity {
    background: #fff;
    padding: 28px 36px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 25%;
    gap: 30px;
    align-items: center;
}

.main-activity-left {
    display: flex;
    flex-direction: column;
}

.main-activity-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    align-self: stretch;
}

.main-activity::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--color-detail), var(--color-accent));
}

.main-activity:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.main-activity h3 {
    font-size: 1.8rem;
    color: var(--color-detail);
    margin-bottom: 10px;
}

.activity-description {
    font-size: 1.15rem;
    line-height: 1.3;
    white-space: pre-line;
    margin-bottom: 14px;
}

.activity-details {
    display: flex;
    gap: 30px;
    margin-bottom: 14px;
}

.detail-item {
    font-size: 1rem;
}

.schedule-table {
    width: 100%;
    max-width: 320px;
    border-collapse: collapse;
    margin: 0;
    font-size: 1rem;
}

.schedule-table td {
    padding: 2px 12px;
    text-align: center;
}

.schedule-day {
    font-weight: 600;
    color: var(--color-text);
    width: 50px;
    text-align: right;
}

.schedule-closed td {
    color: #bbb;
}

.quick-contact-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.contact-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: transparent;
    color: var(--color-detail);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.contact-btn svg {
    width: 22px;
    height: 22px;
}

.contact-btn i {
    font-size: 1.2rem;
}

.contact-btn:hover {
    background: var(--color-detail);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(61, 143, 163, 0.25);
}

.activities-list {
    padding: 22px 28px;
    background: rgba(255, 255, 255, 0.87);
    border-radius: 15px;
    margin-bottom: 14px;
}

.activities-list h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--color-text);
}

.activities-list ul {
    list-style: none;
    padding-left: 0;
}

.activities-list li {
    margin-bottom: 10px;
    font-size: 1.05rem;
    padding-left: 14px;
    border-left: 3px solid var(--color-detail);
}

.past-activities {
    opacity: 0.7;
}

.activity-type-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-detail);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 6px;
}

.activity-item-title {
    display: block;
    font-weight: 600;
    color: var(--color-text);
    font-size: 1rem;
}

.activity-item-desc {
    font-size: 0.95rem;
    color: var(--color-text);
    margin: 4px 0 0 0;
    line-height: 1.3;
    white-space: pre-line;
}

.activity-item-meta {
    font-size: 1rem;
    color: #666;
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.activity-item-meta.activity-locations {
    line-height: 1.2;
}

/* ========== FORMAZIONE SECTION ========== */
.section.section-formazione {
    background:
        linear-gradient(rgba(241, 241, 241, 0.00), rgba(241, 241, 241, 0.00)),
        var(--bg-url, none)
        center center / cover no-repeat;
    background-color: var(--color-bg-main);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    align-items: start;
}

.education-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.education-column-header {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-detail);
    padding-bottom: 8px;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.6),
        0 0 16px rgba(255, 255, 255, 0.4),
        0 0 2px rgba(255, 255, 255, 0.9);
}

.education-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 18px 20px;
    border-radius: 10px;
    border-left: 4px solid var(--color-detail);
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-20px);
}

.education-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.education-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.education-degree-type {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-detail);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 3px;
}

.education-degree-subject {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.education-year {
    font-size: 1rem;
    color: #666;
    margin: 0 0 3px 0;
}

.education-gallery {
    display: none;
    gap: 15px;
    overflow-x: auto;
    padding: 15px 0 10px;
    scroll-snap-type: x mandatory;
}

.education-item.expanded .education-gallery {
    display: flex;
}

.info-icon {
    font-family: 'Dancing Script', cursive;
    font-style: normal;
    font-weight: 700;
    font-size: 1.4rem;
    line-height: 1;
    display: block;
}

.education-institution {
    font-size: 1rem;
    color: var(--color-text);
    margin: 0 0 3px 0;
}

.education-thesis {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.3;
    white-space: pre-line;
    margin: 6px 0 0 0;
}

.expand-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f1f1;
    color: var(--color-detail);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.expand-btn:hover {
    background: var(--color-detail);
    color: #fff;
    transform: scale(1.1);
}

.education-item.expanded .education-gallery {
    margin-top: 20px;
}

.education-gallery::-webkit-scrollbar {
    height: 6px;
}

.gallery-frame {
    min-width: 200px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--color-detail);
    scroll-snap-align: start;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-frame:hover {
    transform: scale(1.05);
    border-color: var(--color-accent);
    box-shadow: 0 4px 15px rgba(61, 143, 163, 0.3);
}

.gallery-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-frame:hover img {
    transform: scale(1.1);
}

/* ========== CONTATTI SECTION ========== */
.section.section-contatti {
    background:
        linear-gradient(rgba(241, 241, 241, 0.00), rgba(241, 241, 241, 0.00)),
        var(--bg-url, none)
        center center / cover no-repeat;
    background-color: var(--color-bg-alt);
}

.section-contatti .container {
    max-width: 1320px;
}

.contacts-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 20px;
}

.contacts-left,
.contacts-right {
    min-width: 0;
}

.contacts-left {
    display: flex;
    flex-direction: column;
}

.contact-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 18px 22px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--color-detail);
    text-align: center;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 16px;
}

.contact-info p {
    margin-bottom: 6px;
    font-size: 1.15rem;
    transition: color 0.2s ease;
}

.contact-info p strong {
    font-weight: 400;
}

.contact-info a {
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.contact-info p:hover {
    color: var(--color-detail);
    cursor: pointer;
    -webkit-text-stroke: 0.5px var(--color-detail);
}

.map-container {
    flex: 1;
    min-height: 200px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    height: 100%;
    min-height: 200px;
    display: block;
}

/* Form Contatti */
.form-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--color-detail);
    text-align: center;
}

#contact-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    position: absolute;
    left: 15px;
    top: 14px;
    font-size: 1rem;
    font-weight: 400;
    color: #999;
    pointer-events: none;
    transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
    background: #fff;
    padding: 0 4px;
    line-height: 1;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 15px 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease;
    background: #fff;
}

.form-group textarea {
    resize: vertical;
    padding-top: 20px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-detail);
}

/* Label flottante: si sposta in alto quando il campo ha focus o contenuto */
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -9px;
    font-size: 0.8rem;
    color: var(--color-detail);
}

/* Captcha: label normale sopra il campo (la domanda matematica va letta) */
.captcha-group {
    padding-top: 4px;
}

.captcha-group label {
    position: static;
    display: block;
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 6px;
    background: none;
    padding: 0;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--color-detail);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(61, 143, 163, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(61, 143, 163, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(61, 143, 163, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.privacy-consent-group {
    margin-bottom: 20px;
}

.privacy-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text);
}

.privacy-consent-label input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 0.2rem;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--color-detail);
}

.privacy-consent-label a {
    color: var(--color-detail);
    text-decoration: underline;
}

.privacy-consent-label a:hover {
    text-decoration: none;
}

.form-message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.form-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
}

.form-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
}

.honeypot {
    position: absolute;
    left: -9999px;
}

/* Booking Section */
.booking-section {
    display: none;
    margin-top: 50px;
    padding: 40px;
    background: #fff;
    border-radius: 10px;
}

.booking-section h3 {
    font-size: 1.8rem;
    color: var(--color-detail);
    margin-bottom: 20px;
    text-align: center;
}

/* Placeholder - completato nelle prossime fasi */

/* ========== CREDITS FOOTER ========== */
.site-credits {
    text-align: center;
    padding: 10px 20px;
    font-size: 0.8rem;
    color: #999;
    background: var(--color-bg-main);
}
