/* ==========================================================================
   CSS DESIGN SYSTEM & STYLESHEET - DANIELE STEVOLI LANDING PAGE
   ========================================================================== */

/* 1. INITIAL RESET & CUSTOM PROPERTIES */
:root {
    /* Color Palette */
    --color-navy: #0e1e38;
    --color-navy-light: #162a4a;
    --color-primary: #1d63b8;
    --color-primary-hover: #154a8a;
    --color-accent: #0084ff;
    --color-light-bg: #f8fafc;
    --color-border: #e2e8f0;
    --color-text-main: #334155;
    --color-text-muted: #64748b;
    --color-white: #ffffff;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(14, 30, 56, 0.08), 0 4px 6px -2px rgba(14, 30, 56, 0.04);
    --shadow-premium: 0 20px 25px -5px rgba(14, 30, 56, 0.12), 0 10px 10px -5px rgba(14, 30, 56, 0.04);

    /* Fonts */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--color-white);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 2. REUSABLE UTILITIES */
.container {
    width: 100%;
    max-width: 1400px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 24px;
    padding-left: 24px;
}

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

.section-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 2.5rem;
    line-height: 1.25;
}

.section-title.text-center::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--color-primary);
    margin: 1rem auto 0 auto;
    border-radius: 2px;
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition-smooth);
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: 1px solid var(--color-primary);
    box-shadow: 0 4px 6px rgba(29, 99, 184, 0.2);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(29, 99, 184, 0.3);
}

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

.btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-navy);
    transform: translateY(-2px);
}

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

.btn-outline-navy:hover {
    background-color: var(--color-navy);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-cta {
    background-color: #0084ff;
    color: var(--color-white);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 132, 255, 0.3);
    padding: 16px 32px;
    font-size: 1.05rem;
}

.btn-cta:hover {
    background-color: #006cd4;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 132, 255, 0.4);
}

/* ==========================================================================
   3. SECTIONS STYLING
   ========================================================================== */

/* HERO SECTION */
.hero-section {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?auto=format&fit=crop&q=80&w=1600');
    background-size: cover;
    background-position: center;
    padding: 140px 0 120px 0;
    color: var(--color-white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(14, 30, 56, 0.95) 0%, rgba(14, 30, 56, 0.75) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* STATS SECTION */
.stats-section {
    background-color: var(--color-light-bg);
    padding: 60px 0;
    border-bottom: 1px solid var(--color-border);
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.stat-card {
    background-color: transparent;
    padding: 16px 8px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: var(--transition-smooth);
    flex: 0 1 calc(20% - 24px);
    min-width: 220px;
}

.stat-icon-wrapper {
    background-color: rgba(29, 99, 184, 0.08);
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-bottom: 16px;
    transition: var(--transition-smooth);
}

.stat-icon {
    width: 24px;
    height: 24px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

/* PROBLEM SECTION */
.problem-section {
    padding: 100px 0;
}

.problem-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.problem-image {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-smooth);
}

.problem-image-wrapper:hover .problem-image {
    transform: scale(1.03);
}

.problem-content {
    padding-left: 20px;
}

.problem-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--color-text-main);
}

.problem-text p:last-child {
    margin-bottom: 0;
}

/* TIMELINE/METHOD SECTION */
.method-section {
    background-color: var(--color-light-bg);
    padding: 100px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.timeline-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-top: 50px;
    position: relative;
    flex-wrap: nowrap;
    gap: 8px;
}

.timeline-step {
    flex: 1 1 0;
    min-width: 0;
    background-color: transparent;
    padding: 24px 8px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    text-align: center;
    position: relative;
    transition: var(--transition-smooth);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.step-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-navy);
    color: var(--color-white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid var(--color-white);
}

.step-icon-box {
    color: var(--color-primary);
    margin: 10px 0 16px 0;
    display: flex;
    justify-content: center;
}

.step-icon {
    width: 36px;
    height: 36px;
}

.step-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-navy);
    line-height: 1.4;
}

.timeline-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex-shrink: 0;
    width: 20px;
    color: var(--color-text-muted);
    opacity: 0.6;
}

.arrow-svg {
    width: 20px;
    height: 20px;
}

/* SPECIALIZATION SECTION */
.specialization-section {
    padding: 100px 0;
}

.specialization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.spec-card {
    background-color: var(--color-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.spec-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.spec-image-box {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.spec-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.spec-card:hover .spec-image {
    transform: scale(1.05);
}

.spec-card-title {
    padding: 20px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-navy);
    text-align: center;
    margin: 0;
    border-top: 1px solid var(--color-border);
    background-color: var(--color-white);
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CASES & INSIGHTS DYNAMIC CARDS */
.cases-section {
    background-color: var(--color-light-bg);
    padding: 100px 0;
    border-top: 1px solid var(--color-border);
}

.insights-section {
    padding: 100px 0;
    border-bottom: 1px solid var(--color-border);
}

.cases-grid, .insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 0;
    color: var(--color-text-muted);
    font-style: italic;
    font-size: 1.1rem;
}

/* Standard WP Dynamic Post Card styling */
.wp-card {
    background-color: var(--color-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.wp-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.wp-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.wp-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.wp-card:hover .wp-image {
    transform: scale(1.04);
}

.wp-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.wp-badge-contrast {
    background-color: #e53e3e;
}

.wp-badge.before-after-badge {
    background-color: #2d3748;
}

.wp-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.wp-card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.35;
    margin-bottom: 16px;
    min-height: 50px;
}

.wp-card-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.wp-card-link:hover {
    color: var(--color-primary-hover);
}

.wp-card-link svg {
    margin-left: 5px;
    transition: var(--transition-smooth);
}

.wp-card-link:hover svg {
    transform: translateX(3px);
}

.archive-action {
    margin-top: 50px;
}

/* MAP & REGIONS SECTION */
.regions-section {
    background-color: var(--color-light-bg);
    padding: 100px 0;
    border-bottom: 1px solid var(--color-border);
}

.grid-2-map {
    display: grid;
    grid-template-columns: 4.5fr 7.5fr;
    gap: 40px;
    align-items: center;
}

.map-wrapper {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

#italy-map-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.05));
}

.regions-content {
    padding-left: 20px;
}

.regions-lead-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 24px;
}

.regions-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.regions-list {
    list-style: none;
}

.regions-list li {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-weight: 500;
    color: var(--color-text-main);
}

.region-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-primary);
    margin-right: 12px;
    display: inline-block;
    flex-shrink: 0;
}

.regions-footer-text {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    border-left: 3px solid var(--color-border);
    padding-left: 15px;
    line-height: 1.6;
}

/* BIOGRAPHY SECTION */
.bio-section {
    padding: 100px 0;
}

.grid-2-bio {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 60px;
    align-items: center;
}

.bio-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4 / 3;
}

.bio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.bio-image-wrapper:hover .bio-image {
    transform: scale(1.02);
}

.bio-lead {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-navy);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.bio-text p {
    margin-bottom: 1.25rem;
    color: var(--color-text-main);
}

.bio-text p:last-child {
    margin-bottom: 2rem;
}

.badges-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 30px;
    border-top: 1px solid var(--color-border);
    padding-top: 24px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-icon {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.badge-item span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-navy);
}

/* CTA BANNER SECTION */
.cta-banner-section {
    background-color: var(--color-navy);
    padding: 80px 0;
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.cta-banner-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(29, 99, 184, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.cta-banner-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.cta-banner-content {
    max-width: 750px;
}

.cta-banner-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.cta-banner-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    font-weight: 300;
}

.cta-banner-action {
    flex-shrink: 0;
}

/* ==========================================================================
   4. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Large Tablets & Desktops (under 1024px) */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .grid-2, .grid-2-map, .grid-2-bio {
        gap: 30px;
    }
    
    .stat-card {
        flex: 0 1 calc(33.333% - 20px);
    }
    
    .timeline-container {
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .timeline-arrow {
        display: none; /* Hide arrows on tablets to wrap items vertically/horizontally */
    }
    
    .timeline-step {
        flex: 0 1 calc(33.333% - 15px);
        margin-bottom: 25px;
    }
}

/* Small Tablets (under 768px) */
@media (max-width: 768px) {
    .container {
        padding-right: 20px;
        padding-left: 20px;
    }
    
    .hero-section {
        padding: 100px 0 80px 0;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .grid-2, .grid-2-map, .grid-2-bio {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .problem-content {
        padding-left: 0;
    }
    
    .stat-card {
        flex: 0 1 calc(50% - 15px);
    }
    
    .timeline-step {
        flex: 0 1 calc(50% - 15px);
    }
    
    .regions-content {
        padding-left: 0;
    }
    
    .regions-list-grid {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }
    
    .bio-image-wrapper {
        max-width: 480px;
        margin: 0 auto;
    }
    
    .bio-text {
        text-align: left;
    }
    
    .badges-grid {
        text-align: left;
    }
    
    .cta-banner-container {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .cta-banner-subtitle {
        font-size: 1.05rem;
    }
}

/* Mobile Phones (under 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.85rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .timeline-step {
        flex: 1 1 100%;
        margin-bottom: 30px;
    }
    
    .regions-list-grid {
        grid-template-columns: 1fr;
    }
    
    .badges-grid {
        grid-template-columns: 1fr;
    }
    
    .badge-item {
        grid-column: span 1 !important;
    }
    
    .stat-card {
        flex: 1 1 100%;
    }
}
