/* ==========================================================================
   Portfolio Modern Styling - UP Agenzia Web
   ========================================================================== */

.flat-portfolio-modern {
    padding: 70px 0 100px;
    background: #ffffff;
    position: relative;
}

/* Header */
.flat-portfolio-modern .heading-section {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
}

.flat-portfolio-modern .badge-pill-sub {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(255, 87, 34, 0.08);
    border: 1px solid rgba(255, 87, 34, 0.2);
    border-radius: 50px;
    color: #ff5722;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 18px;
}

.flat-portfolio-modern .heading-section h2 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.25;
    color: #120a21;
    margin-bottom: 16px;
}

.flat-portfolio-modern .heading-section p {
    font-size: 16px;
    line-height: 1.65;
    color: #64748b;
    margin: 0 auto;
}

/* Stats Strip */
.portfolio-stats-strip {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px 20px;
    margin-bottom: 50px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.portfolio-stat-item {
    text-align: center;
    padding: 0 15px;
}

.portfolio-stat-num {
    font-size: 36px;
    font-weight: 800;
    color: #ff5722;
    line-height: 1;
    margin-bottom: 6px;
}

.portfolio-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modern Filter Buttons */
.portfolio-filter-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 45px;
}

.portfolio-filter-btn {
    padding: 10px 22px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.portfolio-filter-btn:hover {
    border-color: #ff5722;
    color: #ff5722;
    background: #fff8f5;
}

.portfolio-filter-btn.active {
    background: #120a21;
    color: #ffffff;
    border-color: #120a21;
    box-shadow: 0 4px 15px rgba(18, 10, 33, 0.18);
}

.portfolio-filter-btn .count-badge {
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    transition: all 0.25s ease;
}

.portfolio-filter-btn.active .count-badge {
    background: #ff5722;
    color: #ffffff;
}

/* Grid & Cards */
.portfolio-grid-modern {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.portfolio-col {
    padding: 0 15px;
    margin-bottom: 35px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card-modern {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(18, 10, 33, 0.04);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.portfolio-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(18, 10, 33, 0.1);
    border-color: #cbd5e1;
}

/* Visual Mockup Box */
.portfolio-thumb-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 250px;
    background: #f1f5f9;
}

.portfolio-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.portfolio-card-modern:hover .portfolio-thumb-wrap img {
    transform: scale(1.06);
}

/* Badges on image */
.badge-device {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(18, 10, 33, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 30px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-metric {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #ff5722;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 30px;
    z-index: 3;
    box-shadow: 0 4px 10px rgba(255, 87, 34, 0.35);
}

/* Overlay Hover */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 10, 33, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 4;
}

.portfolio-card-modern:hover .portfolio-overlay {
    opacity: 1;
    visibility: visible;
}

.portfolio-overlay .overlay-btn {
    background: #ffffff;
    color: #120a21;
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
}

.portfolio-overlay .overlay-btn:hover {
    background: #ff5722;
    color: #ffffff;
    transform: scale(1.05);
}

/* Card Body */
.portfolio-card-body {
    padding: 24px 24px 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.portfolio-category-label {
    font-size: 12px;
    font-weight: 700;
    color: #ff5722;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.portfolio-project-title {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.35;
    color: #120a21;
    margin-bottom: 10px;
    transition: color 0.25s ease;
}

.portfolio-project-title a {
    color: inherit;
    text-decoration: none;
}

.portfolio-project-title a:hover {
    color: #ff5722;
}

.portfolio-project-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 18px;
}

/* Tech pills */
.portfolio-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 22px;
}

.tech-pill {
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Card Footer Link */
.portfolio-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.portfolio-card-link {
    font-size: 14px;
    font-weight: 700;
    color: #120a21;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.25s ease;
}

.portfolio-card-modern:hover .portfolio-card-link {
    color: #ff5722;
}

.portfolio-card-link i {
    transition: transform 0.25s ease;
}

.portfolio-card-modern:hover .portfolio-card-link i {
    transform: translateX(4px);
}

/* Featured Showcase Banner (Hero Card) */
.portfolio-featured-banner {
    background: linear-gradient(135deg, #120a21 0%, #1e123a 100%);
    border-radius: 28px;
    overflow: hidden;
    color: #ffffff;
    margin-bottom: 60px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(18, 10, 33, 0.18);
}

.featured-content-col {
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 87, 34, 0.18);
    color: #ff5722;
    border: 1px solid rgba(255, 87, 34, 0.35);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 18px;
    width: fit-content;
}

.featured-content-col h3 {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 16px;
}

.featured-content-col p {
    font-size: 15px;
    line-height: 1.65;
    color: #cbd5e1;
    margin-bottom: 25px;
}

.featured-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-item-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
}

.meta-item-val {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    margin-top: 2px;
}

.featured-img-col {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.featured-img-col img {
    max-height: 440px;
    width: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* Process Section */
.flat-portfolio-process {
    padding: 85px 0 90px;
    background: #fafbfc;
    border-top: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
}

.process-step-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 32px 24px;
    height: 100%;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.process-step-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
}

.process-step-number {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 32px;
    font-weight: 800;
    color: #f1f5f9;
}

.process-step-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(255, 87, 34, 0.1);
    color: #ff5722;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 20px;
}

.process-step-box h4 {
    font-size: 19px;
    font-weight: 800;
    color: #120a21;
    margin-bottom: 10px;
}

.process-step-box p {
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
    margin: 0;
}

/* Bottom CTA */
.portfolio-bottom-cta {
    background: linear-gradient(135deg, #120a21 0%, #1e123a 100%);
    border-radius: 24px;
    padding: 60px 45px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(18, 10, 33, 0.2);
    margin-top: 60px;
}

.portfolio-bottom-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 87, 34, 0.25) 0%, rgba(255, 87, 34, 0) 70%);
    pointer-events: none;
}

.portfolio-bottom-cta h3 {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
}

.portfolio-bottom-cta p {
    font-size: 16px;
    line-height: 1.6;
    color: #cbd5e1;
    max-width: 620px;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .featured-content-col {
        padding: 40px 25px 25px;
    }
    .featured-img-col {
        padding: 0 25px 35px;
    }
    .featured-meta-grid {
        grid-template-columns: 1fr 1fr;
    }
    .portfolio-bottom-cta {
        padding: 40px 25px;
        text-align: center;
    }
    .portfolio-bottom-cta .cta-actions {
        margin-top: 25px;
        justify-content: center;
    }
    .portfolio-bottom-cta p {
        margin: 0 auto;
    }
}

/* --------------------------------------------------------------------------
   Modern Newsletter Section (from Home)
   -------------------------------------------------------------------------- */
.home-newsletter-widget {
    padding: 80px 0;
    background: #f8fafc;
}

.newsletter-card-inner {
    background: linear-gradient(135deg, #120a21 0%, #1e1335 100%);
    border-radius: 24px;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(18, 10, 33, 0.1);
}

.newsletter-card-inner::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(255, 87, 34, 0.18) 0%, rgba(255, 87, 34, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.newsletter-title-col h2 {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 12px;
}

.newsletter-title-col p {
    font-size: 15px;
    line-height: 1.6;
    color: #94a3b8;
    margin: 0;
}

.newsletter-form-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.newsletter-form-col form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.newsletter-input-field {
    flex: 1;
    min-width: 250px;
    padding: 14px 22px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50px !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 14px !important;
    outline: none !important;
    transition: all 0.25s ease !important;
}

.newsletter-input-field::placeholder,
.newsletter-input-field::-webkit-input-placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1 !important;
}

.newsletter-input-field:focus {
    border-color: #ff5722 !important;
    background: rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 0 15px rgba(255, 87, 34, 0.3) !important;
}

.newsletter-btn-submit {
    padding: 14px 30px;
    background: #ff5722 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
}

.newsletter-btn-submit:hover {
    background: #f4511e !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 87, 34, 0.4) !important;
}

.newsletter-privacy-note {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 10px;
}

.newsletter-feedback {
    display: none;
    margin-top: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    animation: fadeInNewsletter 0.3s ease;
}

.newsletter-feedback.success {
    display: block !important;
    background: #e8fff1 !important;
    color: #0f5132 !important;
    border: 1px solid #c3e6cb !important;
}

.newsletter-feedback.error {
    display: block !important;
    background: #fff0f0 !important;
    color: #842029 !important;
    border: 1px solid #f5c2c7 !important;
}

@keyframes fadeInNewsletter {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 991px) {
    .newsletter-card-inner {
        padding: 40px 30px;
    }
    .newsletter-title-col {
        margin-bottom: 25px;
        text-align: center;
    }
}

@media (max-width: 767px) {
    .newsletter-title-col h2 {
        font-size: 26px;
    }
    .newsletter-form-col form {
        flex-direction: column;
    }
    .newsletter-btn-submit {
        width: 100%;
        justify-content: center;
    }
}

