/* ============================================================
   OUR WORKS SECTION — Tabbed Project Gallery
   ============================================================ */
.our-works-section {
    position: relative;
}

/* ---- Filter Tabs ---- */
.works-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.works-tab {
    padding: 10px 22px;
    border-radius: 50px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.works-tab:hover {
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
    background: rgba(34, 197, 94, 0.06);
}

.works-tab.active {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    border-color: var(--green);
    color: #fff;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

/* ---- Works Grid ---- */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    min-height: 200px;
}

/* ---- Work Item Card ---- */
.work-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeInDown 0.6s ease forwards;
    position: relative;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.work-item.hidden {
    display: none;
}

.work-item.filtering {
    opacity: 0;
    transform: scale(0.95);
}

.work-card-inner {
    background: rgba(8, 13, 20, 0.95);
    border: 1px solid rgba(34, 197, 94, 0.12);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.3s ease;
    /* Height adapts to image natural size */
    height: auto;
    width: 100%;
}

.work-card-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 10;
}

.work-item:hover .work-card-inner {
    transform: translateY(-8px);
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 20px 50px rgba(34, 197, 94, 0.12), 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Items with red category tag get red hover on inner card */
.work-item:has(.red-tag):hover .work-card-inner {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 20px 50px rgba(239, 68, 68, 0.1), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.work-item:has(.red-tag) .work-card-inner::before {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, transparent 60%);
}

.work-item-img {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: block;
}

.work-item-img img {
    width: 100%;
    /* Fill the card width */
    height: auto;
    /* Height = natural image aspect ratio — no cropping */
    display: block;
    transition: transform 0.5s ease;
}

.work-item:hover .work-item-img img {
    transform: scale(1.03);
}

/* Overlay gradient on image */
.work-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(3, 8, 6, 0.5) 0%, transparent 100%);
    pointer-events: none;
}

.work-item-info {
    padding: 0 8px;
    /* Slight indent inside the column */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.work-item-tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.work-item-info h4 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.work-item-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 14px;
}

.work-item-result {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #22c55e;
    max-width: fit-content;
}

.work-item:has(.red-tag) .work-item-result {
    background: rgba(239, 68, 68, 0.08);
    /* Red tinted */
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.work-item-result::before {
    content: '↑';
    font-size: 14px;
    flex-shrink: 0;
}

/* Demo Button Styles */
.btn-demo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-demo:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.work-item:has(.green-tag) .btn-demo:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.4);
    color: var(--green);
}

.work-item:has(.red-tag) .btn-demo:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--red);
}

/* ---- Empty State (Coming Soon) ---- */
.works-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    animation: fadeInDown 0.5s ease forwards;
}

.empty-state-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.08);
    border: 1.5px solid rgba(34, 197, 94, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--green);
    animation: float 3s ease-in-out infinite;
}

.works-empty-state h3 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.works-empty-state p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.45);
    max-width: 420px;
    line-height: 1.7;
}

/* ============================================================
   RESPONSIVE — Full overhaul for all screens
   ============================================================ */

/* ---- Tablet (≤ 1024px) ---- */
@media (max-width: 1024px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Hero */
    .hero-title {
        font-size: clamp(2.8rem, 7vw, 5rem);
    }

    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 3D objects: hide on tablet to avoid clutter */
    .cube-3d,
    .pyramid-3d {
        display: none;
    }
}

/* ---- Mobile (≤ 768px) ---- */
@media (max-width: 768px) {

    /* Hero */
    .hero-content {
        padding: 0 16px;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }

    .hero-desc {
        font-size: 15px;
    }

    .hero-btns {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        max-width: 300px;
        margin-inline: auto;
    }

    /* 3D elements: fade on mobile instead of hiding */
    .hero-3d {
        opacity: 0.3;
    }

    /* Sections */
    .section {
        padding: 70px 0;
    }

    .container {
        padding: 0 20px;
    }

    .section-title {
        font-size: clamp(1.8rem, 6vw, 2.4rem);
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Works tabs */
    .works-tabs {
        gap: 8px;
    }

    .works-tab {
        padding: 8px 14px;
        font-size: 12px;
    }

    /* Works grid */
    .works-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    /* Work card inner — no fixed height, image defines it */
    .work-card-inner {
        width: 100%;
    }

    /* Work slider */
    .work-slide-inner {
        flex-direction: column;
    }

    .work-img-wrap {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        height: 200px;
    }

    .work-info {
        padding: 20px;
    }

    /* KPI & testimonials */
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    /* Why grid */
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Contact cards */
    .contact-cards {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-socials {
        justify-content: center;
    }

    /* CTA */
    .cta-btns {
        flex-direction: column;
        align-items: stretch;
        max-width: 280px;
        margin-inline: auto;
    }
}

/* ---- Small Mobile (≤ 480px) ---- */
@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2rem, 11vw, 3rem);
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .about-stats-grid {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .works-tab {
        padding: 7px 12px;
        font-size: 11px;
    }

    .logo-verona {
        font-size: 14px;
    }

    .logo-design {
        font-size: 10px;
    }

    .nav-inner {
        padding: 0 16px;
    }
}