/* =============================================
   MOLD & TOOLING PAGE — Custom Styles
   ============================================= */

/* ===== MOLD HERO ===== */
.mold-hero {
    padding: var(--hero-y) var(--section-x) clamp(80px, 6vw, 130px);
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 40%, #e8f4fd 100%);
    position: relative;
    overflow: hidden;
}

.mold-hero > .breadcrumb {
    position: absolute;
    top: 24px;
    left: var(--section-x);
    margin: 0;
    z-index: 2;
    font-size: 0.9rem;
    color: var(--text-muted);
}

html[dir="rtl"] .mold-hero > .breadcrumb {
    left: auto;
    right: var(--section-x);
}

.mold-hero > .breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.mold-hero > .breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.mold-hero-bg {
    position: absolute;
    top: -100px;
    right: -200px;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 119, 182, 0.05) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.mold-hero-content {
    max-width: var(--page-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: clamp(64px, 5vw, 120px);
    width: 100%;
    padding-top: 8px;
}

.mold-hero-text {
    flex: 1;
}

.mold-hero-text h1 {
    font-size: clamp(2.2rem, 4vw, 5rem);
    margin-bottom: 20px;
    line-height: 1.1;
}

.mold-hero-text p {
    font-size: clamp(1.05rem, 1vw, 1.24rem);
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 25px;
    max-width: var(--readable-max);
}

.mold-hero-visual {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== MOLD SHOWCASE RING ===== */
.mold-showcase-ring {
    width: 100%;
    max-width: clamp(500px, 30vw, 680px);
    position: relative;
}

.showcase-orbit {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    background: #fff;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.orbit-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.orbit-img.active {
    opacity: 1;
    transform: scale(1);
}

.showcase-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-light);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.dot:hover {
    background: var(--primary-dark);
}

/* ===== CAPABILITIES STRIP ===== */
.capabilities-strip {
    background: var(--secondary);
    padding: 30px 8%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 100%;
}

.cap-item {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #fff;
}

.cap-item i {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--accent);
    flex-shrink: 0;
}

.cap-item strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
}

.cap-item span {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== GALLERY SECTION ===== */
.mold-gallery-section {
    padding-top: 80px;
    padding-bottom: 80px;
    background: var(--bg-light);
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 50px;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 8%;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #fff;
    border: 1.5px solid var(--border-light);
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 0.68rem;
    background: var(--bg-section);
    border-radius: 20px;
    font-weight: 800;
}

/* ===== MOLD GRID ===== */
.mold-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 8%;
}

/* ===== MOLD CARDS ===== */
.mold-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease,
                opacity 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
}

.mold-card.show {
    opacity: 1;
    transform: translateY(0);
}

.mold-card.hidden {
    display: none;
}

.mold-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 119, 182, 0.12);
    border-color: var(--primary);
}

.mold-card-img {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f8fafc;
    overflow: hidden;
}

.mold-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mold-card:hover .mold-card-img img {
    transform: scale(1.06);
}

.mold-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 37, 64, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.mold-card:hover .mold-card-overlay {
    opacity: 1;
}

.zoom-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    color: var(--primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.zoom-btn:hover {
    transform: scale(1.15);
}

.mold-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: var(--primary);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 6px;
    z-index: 2;
}

.mold-badge.badge-bowl {
    background: #10b981;
}

.mold-badge.badge-jelly {
    background: #8b5cf6;
}

.mold-badge.badge-component {
    background: var(--accent);
}

.mold-card-info {
    padding: 18px 20px 22px;
}

.mold-card-info h3 {
    font-size: 1rem;
    color: var(--secondary);
    margin: 0 0 4px;
    font-family: var(--font-heading);
    font-weight: 800;
}

.mold-variant {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== CTA SECTION ===== */
.mold-cta-section {
    background: linear-gradient(135deg, var(--secondary) 0%, #0a2540 50%, #003d66 100%);
    padding: 100px 8%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mold-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 119, 182, 0.15), transparent 65%);
    border-radius: 50%;
}

.mold-cta-section::after {
    content: '';
    position: absolute;
    bottom: -40%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08), transparent 65%);
    border-radius: 50%;
}

.mold-cta-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.mold-cta-content h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.mold-cta-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 35px;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 37, 64, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 85vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
    text-align: center;
    margin-top: 20px;
}

.lightbox-caption h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.lightbox-caption span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-close {
    top: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .mold-hero-content {
        gap: 50px;
    }
    .mold-showcase-ring {
        max-width: 400px;
    }
}

@media (max-width: 992px) {
    .mold-hero {
        padding-top: 120px;
        min-height: auto;
    }
    .mold-hero-content {
        flex-direction: column;
        gap: 40px;
    }
    .mold-hero-visual {
        width: 100%;
    }
    .mold-showcase-ring {
        max-width: 380px;
    }
    .capabilities-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .mold-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mold-hero {
        padding: 110px 5% 60px;
    }
    .mold-hero-text h1 {
        font-size: 2rem;
    }
    .capabilities-strip {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .mold-grid {
        grid-template-columns: 1fr;
        padding: 0 5%;
    }
    .filter-bar {
        padding: 0 5%;
    }
    .mold-cta-content h2 {
        font-size: 1.8rem;
    }
    .lightbox-prev {
        left: 10px;
    }
    .lightbox-next {
        right: 10px;
    }
    .lightbox-close {
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .mold-showcase-ring {
        max-width: 300px;
    }
    .filter-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
    }
}

/* ===== GALLERY PAGINATION ===== */
.gallery-pagination {
    display: flex;
    justify-content: center;
    padding: 50px 8% 10px;
    max-width: 1600px;
    margin: 0 auto;
}

.pagination-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: 480px;
}

.pagination-progress {
    width: 100%;
    text-align: center;
}

.progress-text {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.progress-text strong {
    color: var(--primary);
    font-weight: 800;
}

.progress-bar-track {
    width: 100%;
    height: 5px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #38bdf8);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--primary), #0284c7);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 119, 182, 0.25),
                0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.load-more-btn:hover::before {
    left: 100%;
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 119, 182, 0.35),
                0 2px 6px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #0284c7, var(--primary));
}

.load-more-btn:active {
    transform: translateY(-1px);
}

.load-more-btn .btn-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.load-more-btn .btn-content i {
    font-size: 1.05rem;
    transition: transform 0.3s ease;
}

.load-more-btn:hover .btn-content i {
    transform: rotate(90deg);
}

.load-more-btn .btn-remaining {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

@media (max-width: 768px) {
    .pagination-inner {
        max-width: 100%;
    }
    .load-more-btn {
        padding: 14px 30px;
        font-size: 0.85rem;
    }
}
