/* ========================================
   PROGETTO FORENSE - MAIN STYLES
   Cormorant Garamond Edition
   ======================================== */

/* CSS Variables */
:root {
    --color-primary: #2d2d3a;
    --color-secondary: #3d3d4a;
    --color-accent: #4a4a5a;
    --color-white: #ffffff;
    --color-gray-light: #f8f9fa;
    --color-gray: #6b7280;
    --color-gray-medium: #e5e7eb;
    --color-gray-dark: #374151;
    --color-gray-darker: #2d2d3a;
    --color-overlay: rgba(30, 30, 40, 0.75);
    --color-overlay-light: rgba(50, 50, 60, 0.6);
    
    /* Course card colors */
    --color-blue: #667eea;
    --color-purple: #a855f7;
    --color-teal: #14b8a6;
    --color-gold: #f59e0b;
    --color-rose: #f43f5e;
    --color-emerald: #10b981;
    
    /* Glass effect */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    --font-main: "Montserrat", sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-weight: 400;
    font-style: normal;
    line-height: 1.7;
    color: var(--color-primary);
    background: var(--color-white);
    overflow-x: hidden;
}

/* ========================================
   SPLASH SCREEN
   ======================================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(160deg, #0a0a0f 0%, #141418 25%, #1e1e24 50%, #28282f 75%, #2d2d3a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-logo {
    max-width: 280px;
    width: 80%;
    opacity: 0;
    animation: splashFadeIn 0.6s ease forwards;
}

@keyframes splashFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.main-content.visible {
    opacity: 1;
}

.main-content.hidden {
    opacity: 0;
}

/* ========================================
   FADE ANIMATIONS
   ======================================== */
.fade-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Staggered delays */
.fade-element:nth-child(1) { transition-delay: 0.1s; }
.fade-element:nth-child(2) { transition-delay: 0.2s; }
.fade-element:nth-child(3) { transition-delay: 0.3s; }
.fade-element:nth-child(4) { transition-delay: 0.4s; }
.fade-element:nth-child(5) { transition-delay: 0.5s; }
.fade-element:nth-child(6) { transition-delay: 0.6s; }
.fade-element:nth-child(7) { transition-delay: 0.7s; }
.fade-element:nth-child(8) { transition-delay: 0.8s; }

/* ========================================
   SECTION 1: HERO
   ======================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay);
    z-index: -1;
}

/* Header */
.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    position: relative;
    z-index: 10;
}

.header-left {
    flex: 1;
}

.greeting-text {
    color: var(--color-white);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-logo {
    max-width: 180px;
    height: auto;
    filter: brightness(1.1);
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.header-cta {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: transparent;
    color: var(--color-white);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    border: 2px solid var(--color-white);
    border-radius: 4px;
    transition: var(--transition-smooth);
    letter-spacing: 1px;
}

.header-cta:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

/* Hero Content */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: var(--color-white);
    line-height: 1.3;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-family: var(--font-main);
    font-weight: 400;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
}

/* ========================================
   SECTION 2: COURSES - GLASS STYLE
   ======================================== */
.courses-section {
    background: linear-gradient(180deg, #3d3d4a 0%, #4a4a5a 50%, #5a5a6a 100%);
    padding: 8rem 2rem;
    position: relative;
    overflow: hidden;
}

.courses-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.courses-container {
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--color-white);
    text-align: center;
    margin-bottom: 4rem;
    letter-spacing: 1px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
}

/* Glass Card */
.glass-card {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.glass-card:hover .card-glow {
    opacity: 1;
}

/* Card color glow effects */
.blue-glow {
    background: radial-gradient(circle at center, rgba(102, 126, 234, 0.2) 0%, transparent 50%);
}

.purple-glow {
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.2) 0%, transparent 50%);
}

.teal-glow {
    background: radial-gradient(circle at center, rgba(20, 184, 166, 0.2) 0%, transparent 50%);
}

.gold-glow {
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.2) 0%, transparent 50%);
}

.rose-glow {
    background: radial-gradient(circle at center, rgba(244, 63, 94, 0.2) 0%, transparent 50%);
}

.emerald-glow {
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.2) 0%, transparent 50%);
}

/* Card color border accents */
.course-blue {
    border-color: rgba(102, 126, 234, 0.3);
}

.course-purple {
    border-color: rgba(168, 85, 247, 0.3);
}

.course-teal {
    border-color: rgba(20, 184, 166, 0.3);
}

.course-gold {
    border-color: rgba(245, 158, 11, 0.3);
}

.course-rose {
    border-color: rgba(244, 63, 94, 0.3);
}

.course-emerald {
    border-color: rgba(16, 185, 129, 0.3);
}

.card-content {
    position: relative;
    padding: 2.5rem;
    z-index: 1;
}


.course-number {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-family: var(--font-main);
    font-size: 4rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.08);
    line-height: 1;
}

.glass-card .course-title {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--color-white);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.glass-card .course-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

/* ========================================
   SECTION 3: FEATURES - PREMIUM CARD
   ======================================== */
.features-section {
    background: var(--color-gray-light);
    padding: 8rem 2rem;
}

.features-container {
    max-width: 900px;
    margin: 0 auto;
}

.features-card-premium {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 4rem;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.12),
        0 10px 30px rgba(0, 0, 0, 0.08);
}

.features-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--color-beginner), var(--color-intermediate), var(--color-advanced));
}

.features-card-inner {
    background: var(--color-white);
    padding: 3.5rem;
}

.features-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.features-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
}

.features-icon svg {
    width: 32px;
    height: 32px;
}

.features-title {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1.8rem;
    color: var(--color-primary);
    line-height: 1.4;
    flex: 1;
}

.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.1rem;
    color: var(--color-gray-dark);
    line-height: 1.7;
}

.feature-bullet {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 50%;
    margin-top: 0.6rem;
}

/* Testimonial */
.testimonial {
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
}

.quote-mark {
    font-family: var(--font-main);
    font-size: 6rem;
    font-weight: 700;
    color: var(--color-primary);
    opacity: 0.1;
    line-height: 1;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial p {
    font-family: var(--font-main);
    font-style: italic;
    font-size: 1.35rem;
    color: var(--color-gray-dark);
    line-height: 1.9;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.testimonial cite {
    font-family: var(--font-main);
    font-style: normal;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* ========================================
   SECTION 4: LOGIN CTA - STATIC & TALL
   ======================================== */
.login-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('/static/sezione5.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay);
}

.login-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 4rem 2rem;
}

.login-title {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--color-white);
    margin-bottom: 3rem;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.login-cta {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    background: var(--color-white);
    color: var(--color-primary);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1.2rem;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.login-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    background: var(--color-gray-light);
}

/* ========================================
   SECTION 5: WHY CHOOSE US - DARK GRAY
   ======================================== */
.why-section {
    background: var(--color-gray-darker);
    padding: 8rem 2rem;
}

.why-container {
    max-width: 900px;
    margin: 0 auto;
}

.why-title {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    color: var(--color-white);
    text-align: center;
    margin-bottom: 4rem;
}

.why-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.why-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.why-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.check-icon-simple {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--color-beginner);
    margin-top: 2px;
}

.check-icon-simple svg {
    width: 100%;
    height: 100%;
}

.why-item span:last-child {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 3rem 2rem;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-company {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.footer-addresses {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-legal {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

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

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .hero-header {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem 2rem;
    }
    
    .header-left, .header-center, .header-right {
        flex: none;
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .header-left {
        order: 2;
    }
    
    .header-center {
        order: 1;
    }
    
    .header-right {
        order: 3;
    }
    
    .header-logo {
        max-width: 150px;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .features-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .features-card-inner {
        padding: 2rem 1.5rem;
    }
    
    .footer-content {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .glass-card .course-title {
        font-size: 1.4rem;
    }
    
    .features-title {
        font-size: 1.4rem;
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}
