/* ============================================
   NORI YOGA - WEBSITE STYLES
   Modern, Accessible, Mobile-First Design
   ============================================ */

/* ============================================
   CSS VARIABLES (Design Tokens)
   ============================================ */

:root {
    /* Colors */
    --primary-sage: #8B9D83;
    --primary-dark: #5C6B54;
    --secondary-sand: #E8DCC4;
    --accent-terracotta: #C77D58;

    /* Neutrals */
    --white: #FFFFFF;
    --off-white: #FAF8F5;
    --gray-light: #E5E5E5;
    --gray-medium: #6B6B6B;
    --gray-dark: #2D2D2D;
    --black: #1A1A1A;

    /* Semantics */
    --success: #6B9D7A;
    --error: #D87355;
    --focus: #5C6B54;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --h1-size: clamp(2.5rem, 5vw, 4rem);
    --h2-size: clamp(2rem, 4vw, 3rem);
    --h3-size: clamp(1.5rem, 3vw, 2rem);
    --h4-size: clamp(1.25rem, 2.5vw, 1.5rem);

    --body-large: 1.125rem;
    --body-base: 1rem;
    --body-small: 0.875rem;

    --lh-tight: 1.2;
    --lh-normal: 1.6;
    --lh-relaxed: 1.8;

    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Layout */
    --container-max: 1200px;
    --container-padding: clamp(1rem, 5vw, 3rem);
    --section-padding-y: clamp(3rem, 8vw, 6rem);
    --grid-gap: 2rem;

    /* Effects */
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s ease;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--body-base);
    line-height: var(--lh-normal);
    color: var(--gray-dark);
    background-color: var(--off-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: var(--lh-tight);
    font-weight: var(--fw-semibold);
    color: var(--black);
    margin-bottom: var(--space-md);
}

h1 { font-size: var(--h1-size); }
h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); }
h4 { font-size: var(--h4-size); }

p {
    margin-bottom: var(--space-md);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

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

ul {
    list-style: none;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-dark);
    color: var(--white);
    padding: var(--space-sm) var(--space-md);
    z-index: 100;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

/* Hidden field for anti-spam */
.hidden {
    display: none;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-padding-y) 0;
}

.text-center {
    text-align: center;
}

.section-title {
    margin-bottom: var(--space-lg);
}

.section-subtitle {
    font-size: var(--body-large);
    color: var(--gray-medium);
    max-width: 700px;
    margin: 0 auto var(--space-2xl);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: var(--fw-semibold);
    font-size: var(--body-base);
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-terracotta);
    color: var(--white);
}

.btn-primary:hover {
    background: #B36B47;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(199, 125, 88, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: transform var(--transition-base);
}

.navbar.hidden {
    transform: translateY(-100%);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--container-padding);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: var(--fw-bold);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    width: 55px;
    height: 55px;
    object-fit: contain;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.hamburger {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--gray-dark);
    position: relative;
    transition: var(--transition-base);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background: var(--gray-dark);
    transition: var(--transition-base);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.nav-menu {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-menu a {
    color: var(--gray-dark);
    font-weight: var(--fw-medium);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-terracotta);
    transition: width var(--transition-base);
}

.nav-menu a:hover::after,
.nav-menu a:focus::after {
    width: 100%;
}

.btn-nav {
    background: var(--primary-sage);
    color: var(--white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
}

.btn-nav::after {
    display: none;
}

.btn-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-lg);
        box-shadow: var(--shadow-md);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all var(--transition-base);
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-toggle[aria-expanded="true"] .hamburger {
        background: transparent;
    }

    .nav-toggle[aria-expanded="true"] .hamburger::before {
        top: 0;
        transform: rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] .hamburger::after {
        bottom: 0;
        transform: rotate(-45deg);
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-sage) 0%, var(--primary-dark) 100%);
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(92, 107, 84, 0.7);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    max-width: 900px;
}

.hero-title {
    color: var(--white);
    margin-bottom: var(--space-lg);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: var(--body-large);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--space-2xl);
    color: var(--off-white);
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--white);
    font-size: var(--body-small);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ============================================
   CHI SONO SECTION
   ============================================ */

.section-chi-sono {
    background: var(--white);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-3xl);
    align-items: center;
}

.profile-img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.text-content p {
    font-size: var(--body-large);
    line-height: var(--lh-relaxed);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.feature-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--off-white);
    border-radius: var(--radius-sm);
}

.feature-icon {
    color: var(--primary-sage);
}

.feature-box p {
    margin: 0;
    font-size: var(--body-small);
    font-weight: var(--fw-medium);
}

@media (max-width: 768px) {
    .two-col {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
}

/* ============================================
   METODO SECTION
   ============================================ */

.section-metodo {
    background: var(--off-white);
}

.metodo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.metodo-card {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.metodo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.metodo-icon {
    width: 64px;
    height: 64px;
    background: var(--secondary-sand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.metodo-icon svg {
    color: var(--primary-dark);
}

.metodo-card h3 {
    color: var(--primary-dark);
    margin-bottom: var(--space-md);
}

.metodo-card p {
    margin: 0;
    line-height: var(--lh-relaxed);
}

/* ============================================
   BENEFICI SECTION
   ============================================ */

.section-benefici {
    background: var(--white);
}

.benefici-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-3xl);
}

.beneficio-item {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.check-icon {
    flex-shrink: 0;
    color: var(--success);
    margin-top: 2px;
}

.beneficio-item p {
    margin: 0;
    font-size: var(--body-base);
    line-height: var(--lh-relaxed);
}

.target-audience {
    background: var(--off-white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-sage);
}

.target-audience h3 {
    color: var(--primary-dark);
    margin-bottom: var(--space-md);
}

.audience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--white);
    border: 2px solid var(--primary-sage);
    border-radius: 2rem;
    font-size: var(--body-small);
    font-weight: var(--fw-medium);
    color: var(--primary-dark);
}

/* ============================================
   PERCORSI SECTION
   ============================================ */

.section-percorsi {
    background: var(--off-white);
}

.percorsi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.percorso-card {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.percorso-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.percorso-card-wide {
    grid-column: 1 / -1;
}

.percorso-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.percorso-header svg {
    color: var(--primary-sage);
    flex-shrink: 0;
}

.percorso-header h3 {
    margin: 0;
    color: var(--primary-dark);
}

.percorso-card p {
    margin: 0;
    line-height: var(--lh-relaxed);
}

.percorsi-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.percorsi-list li {
    padding-left: var(--space-md);
    position: relative;
}

.percorsi-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-terracotta);
    font-size: 1.5rem;
    line-height: 1;
}

.percorsi-note {
    background: var(--secondary-sand);
    padding: var(--space-lg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xl);
}

.percorsi-note p {
    margin: 0;
}

.percorsi-note p:not(:last-child) {
    margin-bottom: var(--space-sm);
}

.placeholder-text {
    font-style: italic;
    color: var(--gray-medium);
    font-size: var(--body-small);
}

@media (max-width: 768px) {
    .percorsi-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CERTIFICAZIONI SECTION
   ============================================ */

.section-certificazioni {
    background: var(--white);
}

.certificazioni-list {
    max-width: 800px;
    margin: 0 auto var(--space-3xl);
}

.cert-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--gray-light);
}

.cert-item:last-child {
    border-bottom: none;
}

.cert-item svg {
    flex-shrink: 0;
    color: var(--primary-sage);
    margin-top: 2px;
}

.cert-item p {
    margin: 0;
    line-height: var(--lh-relaxed);
}

.cert-item small {
    display: block;
    color: var(--gray-medium);
    margin-top: var(--space-xs);
}

.formazione-continua {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.formazione-continua h3 {
    margin-bottom: var(--space-md);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.tag-ongoing {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    background: var(--accent-terracotta);
    color: var(--white);
    border-radius: 2rem;
    font-size: var(--body-small);
    font-weight: var(--fw-medium);
}

.certificati-gallery h3 {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.gallery-grid img {
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    cursor: pointer;
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* ============================================
   FAQ SECTION
   ============================================ */

.section-faq {
    background: var(--off-white);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    transition: background var(--transition-base);
}

.faq-question:hover {
    background: var(--off-white);
}

.faq-question h4 {
    margin: 0;
    font-size: var(--body-large);
    font-weight: var(--fw-medium);
    color: var(--gray-dark);
}

.faq-icon {
    flex-shrink: 0;
    color: var(--primary-sage);
    transition: transform var(--transition-base);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}

.faq-question[aria-expanded="true"] + .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 var(--space-lg) var(--space-lg);
    margin: 0;
    line-height: var(--lh-relaxed);
    color: var(--gray-medium);
}

/* ============================================
   CONTATTI SECTION
   ============================================ */

.section-contatti {
    background: var(--white);
}

.contatti-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-3xl);
    align-items: start;
}

.contatti-info h3 {
    margin-bottom: var(--space-xl);
}

.contact-item {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.contact-item svg {
    flex-shrink: 0;
    color: var(--primary-sage);
    margin-top: 2px;
}

.contact-item strong {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--gray-dark);
}

.contact-item a {
    color: var(--accent-terracotta);
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Form */
.contact-form {
    background: var(--off-white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: var(--fw-medium);
    color: var(--gray-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--body-base);
    transition: border-color var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-sage);
    box-shadow: 0 0 0 3px rgba(139, 157, 131, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    font-size: var(--body-small);
    cursor: pointer;
}

.form-message {
    margin-top: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    display: none;
}

.form-message.success {
    display: block;
    background: var(--success);
    color: var(--white);
}

.form-message.error {
    display: block;
    background: var(--error);
    color: var(--white);
}

@media (max-width: 768px) {
    .contatti-wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--gray-dark);
    color: var(--white);
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: var(--space-md);
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: var(--space-md);
}

.footer-col p,
.footer-col a {
    color: var(--gray-light);
    line-height: var(--lh-relaxed);
}

.footer-col a:hover {
    color: var(--white);
}

.footer-col ul li {
    margin-bottom: var(--space-sm);
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-bottom p {
    margin: 0;
    color: var(--gray-light);
    font-size: var(--body-small);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-links a {
    color: var(--gray-light);
    font-size: var(--body-small);
}

.footer-links a:hover {
    color: var(--white);
}

@media (max-width: 640px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    background: var(--primary-sage);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

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

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 640px) {
    :root {
        --section-padding-y: 3rem;
    }

    .hero-subtitle br {
        display: none;
    }

    .metodo-grid {
        grid-template-columns: 1fr;
    }

    .benefici-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .navbar,
    .hero-scroll,
    .back-to-top,
    .contact-form {
        display: none;
    }

    .section {
        page-break-inside: avoid;
    }
}
