/* ==========================================================================
   Filename: style/portofolio.css
   Description: Modern, High-Performance, Mobile-Optimized Portfolio Styling
   Theme: Surau Ritel (Industrial Red & Dark/White Clean Design)
   ========================================================================== */

/* --- 1. GLOBAL WRAPPER & VARIABLES --- */
.surau-portfolio-page {
    background-color: #F9FAFB;
    min-height: 100vh;
    color: #1F2937;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
}

/* --- 2. HERO SECTION (PERFECTLY CENTERED & JUSTIFIED) --- */
.portfolio-hero {
    background: linear-gradient(135deg, #111827 0%, #1F2937 60%, #374151 100%);
    color: #FFFFFF;
    padding: calc(var(--header-height) + 80px) 20px 85px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(230, 0, 2, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 214, 0, 0.08) 0%, transparent 40%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    pointer-events: none;
}

.portfolio-hero .surau-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
}

.hero-badge-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(230, 0, 2, 0.2);
    border: 1px solid rgba(230, 0, 2, 0.4);
    color: #FF6B6B;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 50px;
    margin: 0 auto 20px auto;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
}

.portfolio-hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 auto 16px auto;
    background: linear-gradient(135deg, #FFFFFF 30%, #E5E7EB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    text-align: center;
    width: 100%;
}

.portfolio-hero-subtitle {
    font-size: 1.15rem;
    color: #9CA3AF;
    max-width: 720px;
    margin: 0 auto 36px auto;
    line-height: 1.6;
    text-align: center;
}

/* Trust Stats Bar */
.portfolio-stats-bar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    padding: 12px 32px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: left;
}

.stat-icon {
    font-size: 1.4rem;
    color: var(--surau-yellow, #FFD600);
}

.stat-text strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.1;
}

.stat-text span {
    font-size: 0.75rem;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
}

/* --- 3. CONTROLS & SEARCH BAR --- */
.portfolio-controls-section {
    position: relative;
    margin-top: -30px;
    z-index: 10;
    padding: 0 20px;
}

.portfolio-controls-section .surau-container {
    max-width: 1200px;
    margin: 0 auto;
}

.controls-inner {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
    border: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box-wrapper {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.search-box-wrapper .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 1rem;
    pointer-events: none;
}

.portfolio-search-input {
    width: 100%;
    padding: 12px 42px 12px 44px;
    background: #F3F4F6;
    border: 1.5px solid transparent;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #111827;
    transition: all 0.25s ease;
    outline: none;
    box-sizing: border-box;
}

.portfolio-search-input:focus {
    background: #FFFFFF;
    border-color: var(--surau-red, #E60002);
    box-shadow: 0 0 0 4px rgba(230, 0, 2, 0.1);
}

.clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 6px;
    font-size: 0.9rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.clear-btn:hover {
    color: #EF4444;
}

.portfolio-status-info {
    display: flex;
    align-items: center;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #F3F4F6;
    color: #4B5563;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid #E5E7EB;
}

.count-badge i {
    color: var(--surau-red, #E60002);
}

/* --- 4. PORTFOLIO GRID SECTION --- */
.portfolio-grid-section {
    padding: 50px 20px 70px;
}

.portfolio-grid-section .surau-container {
    max-width: 1200px;
    margin: 0 auto;
}

.surau-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* --- 5. PORTFOLIO CARD DESIGN --- */
.portfolio-card {
    background: #FFFFFF;
    border-radius: 18px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: cardEntrance 0.5s ease forwards;
}

@keyframes cardEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #D1D5DB;
}

/* Card Media / Image */
.portfolio-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #1F2937, #111827);
    overflow: hidden;
}

.portfolio-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    display: block;
}

.portfolio-card:hover .portfolio-card-img {
    transform: scale(1.07);
}

.portfolio-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    background: linear-gradient(135deg, #374151 0%, #1F2937 100%);
    gap: 8px;
}

.portfolio-no-img i {
    font-size: 2.2rem;
    color: var(--surau-yellow, #FFD600);
}

.portfolio-no-img span {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.portfolio-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(8px);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

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

/* 2. Nama Klien (<H3>) */
.portfolio-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.portfolio-card:hover .portfolio-card-title {
    color: var(--surau-red, #E60002);
}

/* 3. Ikon GPS + Alamat (<p>) */
.portfolio-card-location {
    margin: 0 0 16px 0;
    font-size: 0.88rem;
    line-height: 1.45;
}

.portfolio-gmaps-link {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    color: #2563EB;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 5px 10px;
    background: #EFF6FF;
    border: 1px solid #DBEAFE;
    border-radius: 8px;
}

.portfolio-gmaps-link:hover {
    background: #DBEAFE;
    color: #1D4ED8;
    transform: translateY(-1px);
}

.portfolio-gmaps-link .gps-icon {
    color: var(--surau-red, #E60002);
    font-size: 0.95rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.portfolio-gmaps-link .ext-icon {
    font-size: 0.7rem;
    margin-left: 2px;
    opacity: 0.7;
    margin-top: 3px;
    flex-shrink: 0;
}

.portfolio-plain-location {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    color: #4B5563;
    font-weight: 500;
    padding: 5px 10px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.portfolio-plain-location .gps-icon {
    color: #EF4444;
    font-size: 0.95rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* 4. Deskripsi */
.portfolio-card-desc {
    font-size: 0.92rem;
    color: #4B5563;
    line-height: 1.6;
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid #F3F4F6;
    flex-grow: 1;
    word-break: break-word;
}

/* --- 6. SKELETON LOADER ANIMATION --- */
.portfolio-skeleton-card {
    background: #FFFFFF;
    border-radius: 18px;
    border: 1px solid #E5E7EB;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #E5E7EB;
    position: relative;
    overflow: hidden;
}

.skeleton-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line {
    background: #E5E7EB;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.skeleton-title {
    width: 75%;
    height: 22px;
}

.skeleton-addr {
    width: 90%;
    height: 18px;
}

.skeleton-desc {
    width: 100%;
    height: 16px;
    margin-top: 8px;
}

.skeleton-desc-short {
    width: 60%;
    height: 16px;
}

.skeleton-img::after,
.skeleton-line::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: shimmer 1.5s infinite;
}

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

/* --- 7. EMPTY & ERROR STATES --- */
.portfolio-empty-state {
    text-align: center;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 60px 30px;
    border: 1px dashed #D1D5DB;
    max-width: 540px;
    margin: 20px auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
}

.empty-icon-box {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #FEF2F2;
    color: var(--surau-red, #E60002);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.portfolio-empty-state h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.portfolio-empty-state p {
    font-size: 0.95rem;
    color: #6B7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* --- 8. CALL TO ACTION (CTA) BANNER --- */
.portfolio-cta-section {
    padding: 0 20px 80px;
}

.portfolio-cta-section .surau-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cta-banner-card {
    background: linear-gradient(135deg, #111827 0%, #1F2937 60%, #991B1B 100%);
    border-radius: 24px;
    padding: 50px 45px;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    box-shadow: 0 20px 40px -15px rgba(230, 0, 2, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.cta-banner-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(230, 0, 2, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cta-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--surau-yellow, #FFD600);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.cta-title {
    font-size: 2rem;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 0 12px 0;
    line-height: 1.25;
}

.cta-desc {
    font-size: 1.05rem;
    color: #D1D5DB;
    margin: 0;
    line-height: 1.6;
    max-width: 600px;
}

.cta-actions {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.cta-btn {
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-outline-white {
    background: transparent;
    color: #FFFFFF;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #FFFFFF;
    transform: translateY(-2px);
}

/* --- 9. RESPONSIVE DESIGN (DESKTOP, TABLET, MOBILE) --- */

/* Tablet (Max-Width 1024px) */
@media (max-width: 1024px) {
    .surau-portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .portfolio-hero-title {
        font-size: 2.3rem;
    }

    .cta-banner-card {
        flex-direction: column;
        text-align: center;
        padding: 40px 30px;
    }

    .cta-desc {
        margin: 0 auto;
    }

    .cta-actions {
        justify-content: center;
    }
}

/* Mobile Devices (Max-Width 768px) */
@media (max-width: 768px) {
    .portfolio-hero {
        padding: calc(var(--header-height) + 50px) 16px 65px;
    }

    .portfolio-hero-title {
        font-size: 1.85rem;
    }

    .portfolio-hero-subtitle {
        font-size: 0.98rem;
        margin-bottom: 25px;
    }

    .portfolio-stats-bar {
        padding: 12px 18px;
        gap: 15px;
        width: 100%;
        max-width: 360px;
        box-sizing: border-box;
        border-radius: 16px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .stat-divider {
        display: none;
    }

    .stat-item {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .portfolio-controls-section {
        margin-top: -20px;
        padding: 0 16px;
    }

    .controls-inner {
        padding: 14px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-box-wrapper {
        min-width: 100%;
    }

    .portfolio-status-info {
        justify-content: center;
    }

    .surau-portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .portfolio-grid-section {
        padding: 35px 16px 50px;
    }

    .portfolio-card-body {
        padding: 18px;
    }

    .portfolio-card-title {
        font-size: 1.15rem;
    }

    .portfolio-cta-section {
        padding: 0 16px 60px;
    }

    .cta-banner-card {
        padding: 30px 20px;
        border-radius: 18px;
    }

    .cta-title {
        font-size: 1.45rem;
    }

    .cta-desc {
        font-size: 0.92rem;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .cta-btn {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
}

/* Small Mobile (Max-Width 480px) */
@media (max-width: 480px) {
    .portfolio-hero-title {
        font-size: 1.6rem;
    }

    .hero-badge-pill {
        font-size: 0.75rem;
        padding: 5px 14px;
    }

    .portfolio-search-input {
        font-size: 0.88rem;
        padding: 10px 36px 10px 38px;
    }

    .portfolio-card-title {
        font-size: 1.1rem;
    }

    .portfolio-card-desc {
        font-size: 0.88rem;
    }

    .portfolio-gmaps-link,
    .portfolio-plain-location {
        font-size: 0.82rem;
        padding: 4px 8px;
    }
}