/* DESIGN SYSTEM */
:root {
    --color-bg: #1A1A1A;
    --color-text: #F0F0F0;
    --color-accent: #E8350A; /* Red */
    --color-secondary: #2C5F8A; /* Blue */
    --color-card-bg: #242424;
    --color-accent-hover: #D12E08;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4.5rem;

    --container-max: 1100px;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: #1A1A1A;
    display: flex;
    align-items: center;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.25rem;
    color: #F0F0F0;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 3rem;
}

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

.nav-links a {
    font-family: var(--font-body);
    font-weight: 400;
    color: #F0F0F0;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-accent);
}

.nav-btn {
    background-color: #E8350A;
    color: #FFF;
    padding: 10px 20px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-btn:hover {
    transform: scale(1.05);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #F0F0F0;
    transition: 0.3s;
}

/* RESPONSIVE NAVBAR */
@media (max-width: 900px) {
    .navbar {
        height: 56px;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 56px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 56px);
        background-color: #1A1A1A;
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: var(--spacing-lg);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-family: var(--font-heading);
        font-weight: 800;
    }
    
    .nav-btn {
        width: 100%;
        text-align: center;
        font-size: 1.1rem;
        padding: 1rem;
    }
}

/* SECTIONS PADDING ADJ */
body {
    padding-top: 64px;
}

@media (max-width: 900px) {
    body {
        padding-top: 56px;
    }
}

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

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

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

html {
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1; /* Slightly tighter */
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

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

strong {
    color: var(--color-accent);
}

/* 1. TYPOGRAPHY & HYPHENS — Prevent long titles from breaking layout */
h1, h2, h3 {
    hyphens: auto;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* UTILITIES */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.center {
    text-align: center;
}

.text-accent {
    color: var(--color-accent);
}

.lg {
    padding: 1.25rem 2.5rem !important;
    font-size: 1.1rem !important;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: normal; /* Added to allow wrapping of long text */
    word-wrap: break-word;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #FFF;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(232, 53, 10, 0.3);
}

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

.btn-secondary:hover {
    background-color: var(--color-text);
    color: var(--color-bg);
    transform: translateY(-3px);
}

/* SECTIONS */
section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.section-subtitle {
    font-size: 1.15rem;
    color: #CCC;
    max-width: 800px;
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.center .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 70% 30%, rgba(232, 53, 10, 0.1) 0%, rgba(26, 26, 26, 1) 100%);
    position: relative;
}

.hero-subtitle {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-sm);
}

.hero-title {
    font-size: clamp(2rem, 8vw, 3.8rem);
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
}

.hero-description {
    font-size: 1.15rem;
    max-width: 650px;
    margin-bottom: var(--spacing-lg);
    color: #CCC;
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* SOCIAL PROOF */
.social-proof {
    background-color: #111;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 1.5rem 0;
}

.proof-items {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.proof-item {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: #888;
}

.proof-number {
    color: var(--color-text);
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* PROBLEM */
.problem {
    background-color: #000;
}

.problem .section-inner {
    max-width: 800px;
    margin: 0 auto;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: var(--spacing-lg);
}

.problem-card h3 {
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
}

.problem-card p {
    font-size: 1.1rem;
    color: #AAA;
}

/* ABOUT */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-image img {
    border-radius: 8px;
    border-left: 5px solid var(--color-accent);
}

.about-content h2 {
    margin-bottom: var(--spacing-sm);
}

.about-content p {
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.credentials {
    border-top: 1px solid #333;
    padding-top: var(--spacing-md);
}

.credentials li {
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.credentials li::before {
    content: "→";
    color: var(--color-accent);
    margin-right: 1rem;
}

/* OFFERS */
.offer-wrapper {
    background: var(--color-card-bg);
    padding: var(--spacing-lg);
    border-radius: 12px;
    overflow: hidden; /* Added to contain any flying elements */
}

.offer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.offer-content h3 {
    font-size: 2.2rem;
    margin-bottom: var(--spacing-sm);
}

.offer-content .bullet-list {
    margin: var(--spacing-md) 0 var(--spacing-lg);
}

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

.bullet-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 900;
}

.offer-visual img {
    border-radius: 8px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.offer-wrapper.reversed .offer-grid {
    grid-template-columns: 1fr 1.2fr;
}

.exclusivity {
    background: rgba(44, 95, 138, 0.15);
    padding: 1rem;
    border-left: 4px solid var(--color-secondary);
    margin-bottom: var(--spacing-md);
}

.visual-placeholder {
    height: 400px;
    background: linear-gradient(135deg, #111 0%, #222 100%);
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden; /* Essential for text-overlay */
}

.text-overlay {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 6vw, 1.8rem);
    opacity: 0.15;
    transform: rotate(-15deg);
    white-space: nowrap;
    pointer-events: none;
}

/* TESTIMONIALS */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: var(--spacing-lg);
}

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

.testimonial-card {
    background: #222;
    padding: var(--spacing-md);
    border-radius: 8px;
    border-bottom: 3px solid #333;
    transition: border-color 0.3s ease;
}

.testimonial-card:hover {
    border-color: var(--color-accent);
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.testimonial-card cite {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-style: normal;
    color: var(--color-secondary);
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

details {
    padding: 1.5rem 0;
    border-bottom: 1px solid #333;
}

summary {
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 2rem;
    text-transform: uppercase;
    font-size: 1.1rem;
}

summary::after {
    content: "+";
    position: absolute;
    right: 0;
    color: var(--color-accent);
}

details[open] summary::after {
    content: "-";
}

details p {
    padding-top: 1rem;
    color: #AAA;
}

/* FINAL CTA */
.final-cta {
    background: #000;
    border-top: 1px solid #222;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: var(--spacing-md) 0;
    flex-wrap: wrap;
}

.urgency {
    color: var(--color-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* FOOTER */
.footer {
    padding: var(--spacing-lg) 0;
    background: #050505;
    border-top: 1px solid #111;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--color-accent);
}

.footer-links a, .footer-legal a {
    display: block;
    margin-bottom: 0.5rem;
    color: #888;
}

.footer-links a:hover, .footer-legal a:hover {
    color: var(--color-text);
}

.footer-bottom {
    text-align: center;
    color: #444;
    font-size: 0.8rem;
    border-top: 1px solid #111;
    padding-top: 2rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .about-grid, 
    .offer-grid, 
    .offer-wrapper.reversed .offer-grid,
    .problem-grid,
    .testimonial-grid,
    .footer-grid {
        display: block !important;
        width: 100% !important;
    }

    .about-grid > *, 
    .offer-grid > *, 
    .offer-wrapper.reversed .offer-grid > *,
    .problem-grid > *,
    .testimonial-grid > *,
    .footer-grid > * {
        width: 100% !important;
        margin-bottom: 2rem;
    }

    .offer-wrapper {
        width: 100% !important;
        padding: 1rem !important;
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }

    .offer-visual {
        order: -1;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* REVEAL ANIMATIONS */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 600px) {
    .hero-ctas, .cta-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .proof-items {
        justify-content: center;
        text-align: center;
    }
}

/* 390px MOBILE OPTIMIZATIONS (and others) */
@media (max-width: 600px) {
    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2.2rem !important; /* Adjusted slightly */
        letter-spacing: -0.5px;
    }

    .section-title {
        font-size: 1.8rem !important;
        line-height: 1.2;
    }

    .offer-wrapper {
        padding: 1.2rem;
    }

    .offer-content h2, 
    .offer-content h3 {
        font-size: 1.4rem !important; /* Even smaller to be safe */
        margin-bottom: 0.75rem;
    }

    .problem-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .problem-card h3 {
        font-size: 1.2rem;
    }

    .bullet-list li {
        font-size: 0.95rem;
        line-height: 1.4;
        padding-left: 1.5rem;
    }

    .btn {
        font-size: 0.9rem !important;
        padding: 0.8rem 1rem !important;
        letter-spacing: 0.5px;
    }

    .hero-subtitle {
        letter-spacing: 2px;
        font-size: 0.8rem;
    }

    .visual-placeholder {
        height: 250px;
    }
}

@media (max-width: 390px) {
    /* Extreme mobile optimizations */
    .hero-title { 
        font-size: 1.9rem !important; 
    }
    
    .section-title { 
        font-size: 1.5rem !important; 
    }

    /* 5. HOMEPAGE — Stats */
    .proof-items { 
        flex-direction: column !important; 
        align-items: center !important; 
        gap: 16px !important; 
        text-align: center;
    }

    .proof-item {
        font-size: 0.85rem;
    }
}

/* 10. IMMAGINI MANCANTI (CSS Placeholder) */
img[alt="Anteprima Corso"], 
img[alt="Gennaro Borriello Portrait"] {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #242424;
    color: #888;
    text-align: center;
    min-height: 300px;
    width: 100%;
    position: relative;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
}

img[alt="Anteprima Corso"]::before,
img[alt="Gennaro Borriello Portrait"]::before {
    content: "[ Foto di Gennaro Borriello ]";
    display: block;
    width: 100%;
    padding: 20px;
    color: #888888;
}

/* 11. STUDENT COUNTER — LIVE SOCIAL PROOF */
.student-counter-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem 0 0.25rem;
}

.student-counter-live .live-dot {
  width: 7px;
  height: 7px;
  background: #E8350A;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(232, 53, 10, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 5px rgba(232, 53, 10, 0); }
}

.student-counter-live .counter-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1rem;
  color: #E8350A;
  letter-spacing: 0.5px;
}

.student-counter-live .counter-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #888;
  font-weight: 500;
}

/* Live dot inside proof bar */
.proof-item-live {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.proof-item-live .live-dot,
.student-counter-live .live-dot {
  width: 7px;
  height: 7px;
  background: #E8350A;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}


