/* ============================================
   PORTFOLIO.CSS - Pagina Progetti Tecnici
   Design Coerente con Home2
   ============================================ */

/* Inherit root variables from home2.css */
:root {
    --primary: #FF6200;
    --secondary: #28a745;
    --dark: #1a1a1a;
    --darker: #0d0d0d;
    --light: #f8f9fa;
    --text-light: #e0e0e0;
    --text-dark: #333;
    --danger: #dc3545;
}

/* ============================================
   HERO PORTFOLIO
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    padding: 8rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 98, 0, 0.03) 2px,
            rgba(255, 98, 0, 0.03) 4px
        );
    pointer-events: none;
}

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

.hero-section .hero-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.hero-section .hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-section .hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-light);
    font-weight: 300;
}

/* ============================================
   SEZIONI PROGETTO
   ============================================ */
.project-section {
    padding: 5rem 0;
}

.dark-section {
    background: var(--dark);
    color: var(--text-light);
}

.light-section {
    background: var(--light);
    color: var(--text-dark);
}

/* Project Header */
.project-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.project-number {
    font-size: 8rem;
    font-weight: 900;
    opacity: 0.05;
    position: absolute;
    top: -3rem;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1;
    pointer-events: none;
}

.dark-section .project-number {
    color: white;
}

.light-section .project-number {
    color: var(--text-dark);
}

.project-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    position: relative;
}

.project-tagline {
    font-size: clamp(1rem, 2vw, 1.3rem);
    opacity: 0.8;
    font-weight: 400;
}

/* ============================================
   PROJECT DESCRIPTION
   ============================================ */
.project-description h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.project-description p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.feature-list li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: start;
    gap: 1rem;
    font-size: 1rem;
}

.light-section .feature-list li {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li i {
    color: var(--primary);
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.feature-list li strong {
    color: var(--primary);
}

/* ============================================
   METRICS CARD
   ============================================ */
.metrics-card {
    background: rgba(255, 98, 0, 0.08);
    border: 2px solid rgba(255, 98, 0, 0.2);
    border-radius: 15px;
    padding: 2.5rem;
}

.light-section .metrics-card {
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.metrics-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.dark-section .metrics-card h3 {
    color: white;
}

.light-section .metrics-card h3 {
    color: var(--text-dark);
}

.metric-item {
    text-align: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 98, 0, 0.2);
}

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

.metric-value {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* ============================================
   CASE STUDY & CARDS
   ============================================ */
.case-study-card {
    background: rgba(255, 98, 0, 0.05);
    border: 2px solid rgba(255, 98, 0, 0.2);
    border-radius: 15px;
    padding: 3rem;
    margin-top: 3rem;
}

.light-section .case-study-card {
    background: linear-gradient(135deg, rgba(255, 98, 0, 0.08) 0%, rgba(255, 98, 0, 0.02) 100%);
}

.case-study-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dark-section .case-study-card h3 {
    color: white;
}

.light-section .case-study-card h3 {
    color: var(--text-dark);
}

.case-study-card h3 i {
    color: var(--primary);
    font-size: 2rem;
}

.case-study-card p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.case-study-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid var(--primary);
    transition: all 0.3s ease;
}

.case-study-card a:hover {
    color: #ff7a1f;
    border-bottom-color: #ff7a1f;
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tech-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ============================================
   ARCHITECTURE & MODULE CARDS
   ============================================ */
.architecture-card,
.use-cases-card,
.generation-card,
.service-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2.5rem;
    margin-top: 3rem;
}

.light-section .architecture-card,
.light-section .use-cases-card,
.light-section .generation-card,
.light-section .service-card {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.architecture-card h3,
.use-cases-card h3,
.generation-card h3,
.service-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark-section .architecture-card h3,
.dark-section .use-cases-card h3,
.dark-section .generation-card h3,
.dark-section .service-card h3 {
    color: white;
}

.light-section .architecture-card h3,
.light-section .use-cases-card h3,
.light-section .generation-card h3,
.light-section .service-card h3 {
    color: var(--text-dark);
}

.architecture-card h3 i,
.generation-card h3 i {
    color: var(--primary);
}

/* Module Box */
.module-box,
.generated-box {
    background: rgba(255, 98, 0, 0.05);
    border: 1px solid rgba(255, 98, 0, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.light-section .module-box,
.light-section .generated-box {
    background: rgba(255, 98, 0, 0.03);
}

.module-box:hover,
.generated-box:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    background: rgba(255, 98, 0, 0.1);
}

.module-box h4,
.generated-box h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.dark-section .module-box h4,
.dark-section .generated-box h4 {
    color: white;
}

.light-section .module-box h4,
.light-section .generated-box h4 {
    color: var(--text-dark);
}

.generated-box i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.module-box p,
.generated-box p {
    font-size: 0.95rem;
    opacity: 0.85;
    margin: 0;
}

/* Use Case List */
.use-case-list {
    list-style: none;
    padding: 0;
}

.use-case-list li {
    padding: 0.75rem 0;
    display: flex;
    align-items: start;
    gap: 0.75rem;
    font-size: 1rem;
}

.use-case-list i {
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

/* Service List */
.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 1rem;
}

.service-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.service-card .lead {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.service-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark-section .service-card h4 {
    color: white;
}

.light-section .service-card h4 {
    color: var(--text-dark);
}

.service-card h4 i {
    color: var(--primary);
}

/* ============================================
   COMPARISON TABLE
   ============================================ */
.comparison-table-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2.5rem;
    margin-top: 3rem;
}

.comparison-table-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: white;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table thead {
    background: rgba(255, 98, 0, 0.1);
}

.comparison-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 2px solid rgba(255, 98, 0, 0.3);
    color: white;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
}

.comparison-table td:first-child {
    font-weight: 600;
}

.comparison-table .bad {
    color: var(--danger);
    font-weight: 600;
}

.comparison-table .good {
    color: var(--secondary);
    font-weight: 600;
}

/* Refinement Badge */
.refinement-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, #ff7a1f 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    margin: 1rem 0;
}

.refinement-badge i {
    font-size: 1.5rem;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, #ff7a1f 100%);
    color: white;
    padding: 5rem 0;
}

.cta-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn-upwork,
.btn-fiverr {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 3px solid white;
}

.btn-upwork {
    background: white;
    color: #14a800;
}

.btn-upwork:hover {
    background: #14a800;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-fiverr {
    background: white;
    color: #1dbf73;
}

.btn-fiverr:hover {
    background: #1dbf73;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cta-note {
    font-size: 1.1rem;
    opacity: 0.9;
}

.cta-note a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.cta-note a:hover {
    opacity: 0.8;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        padding: 5rem 0 3rem;
    }
    
    .project-section {
        padding: 3rem 0;
    }
    
    .project-number {
        font-size: 5rem;
        top: -2rem;
    }
    
    .metrics-card,
    .case-study-card,
    .architecture-card,
    .use-cases-card,
    .generation-card,
    .service-card,
    .comparison-table-card {
        padding: 1.5rem;
    }
    
    .metric-value {
        font-size: 2.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-upwork,
    .btn-fiverr {
        width: 100%;
        justify-content: center;
    }
    
    .comparison-table {
        font-size: 0.85rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-section .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }
    
    .feature-list li {
        font-size: 0.95rem;
    }
    
    .tech-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    .module-box,
    .generated-box {
        padding: 1rem;
    }
    
    .refinement-badge {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }
}
