.services-container {
    display: grid;
    /* make outer boxes smaller and increase spacing between them */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 24px;
    max-width: 1024px;
    margin: 0 auto;
    padding: 12px;
    color: #333;
}

.service-column {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.service-column .modern-card-media {
    background: #f5f7fb;
    padding: 6px;
}

.service-column .modern-card-media img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.28s ease;
    transform-origin: center center;
    border-radius: 8px;
}

.service-column .modern-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 12px;
    flex: 1 1 auto;
}

.service-column .modern-card-body h2 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.35;
    color: var(--primary-color);
    font-weight: 700;
}

.service-column .modern-card-copy {
    color: #2f3640;
    font-size: 0.96rem;
    line-height: 1.7;
}

.service-column .modern-card-copy > :first-child {
    margin-top: 0;
}

.service-column .modern-card-copy p,
.service-column .modern-card-copy li {
    margin-top: 0;
}

div#detail-one-stop {
    display: flex;
    flex-direction: column;
}

div#detail-one-stop img {
    width: 500px;
    height: 500px;
}

@media (max-width: 1024px) {
    .services-container {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 18px;
        padding: 16px;
    }

    .service-column .modern-card-body {
        padding: 16px 18px 20px;
    }

    .service-column .modern-card-body h2 {
        font-size: 1.05rem;
    }

    .service-column .modern-card-copy {
        font-size: 0.93rem;
    }

    .service-column .modern-card-media {
        padding: 12px;
    }

    .service-column .service-media-grid {
        gap: 8px;
    }

    div#detail-one-stop img {
        width: 100%;
        height: auto;
    }
}

@media (hover: hover) and (pointer: fine) {
    .service-column:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
        border-color: rgba(0, 0, 0, 0.1);
    }

    .service-column:hover .modern-card-media img {
        transform: scale(1.03);
    }
}

/* Services Hero */
.services-hero {
    position: relative;
    padding: 100px 24px 80px;
    background: linear-gradient(135deg, #001760 0%, #0a2a8a 100%);
    overflow: hidden;
}

.services-hero-bg {
    position: absolute;
    inset: 0;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.03) 0%, transparent 50%);
}

.services-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.services-hero-content h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #ffffff;
    margin: 0 0 16px;
    line-height: 1.2;
}

.services-hero-content > p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

/* Services Overview */
.services-overview {
    padding: 60px 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin: 0 0 16px;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #1a3fa4);
    border-radius: 2px;
    margin: 0 auto;
}

.services-intro {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #475569;
    text-align: center;
}

/* Services Grid */
.services-grid-section {
    padding: 40px 24px 80px;
}

.services-grid {
    display: grid;
    /* make outer boxes smaller and increase spacing between them */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 24px;
}

.service-card-modern {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 12px -6px rgba(0, 23, 96, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(14px);
    animation: cardFadeIn 0.45s ease-out forwards;
}

.service-card-modern:nth-child(1) { animation-delay: 0.1s; }
.service-card-modern:nth-child(2) { animation-delay: 0.2s; }
.service-card-modern:nth-child(3) { animation-delay: 0.3s; }

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 32px -8px rgba(0, 23, 96, 0.15);
    border-color: transparent;
}

.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.service-icon-wrapper {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 10px;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.service-number {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(0, 23, 96, 0.2);
}

.service-card-media {
    padding: 8px;
    background: #f8fafc;
}

.service-media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.service-media-grid.service-media-grid-3 img:last-child {
    grid-column: span 2;
}

.media-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
}

.media-item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    object-position: bottom center;
    border-radius: 8px;
    transition: transform 0.28s ease;
    display: block;
}

.media-item img.center {
    object-position: center center;
}

.service-card-modern:hover .media-item:not(.has-more) img {
    transform: scale(1.05);
}

/* Zoom icon styling */
.zoom-icon {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    pointer-events: none; /* Let clicks pass through to image */
}

.media-item:not(.has-more):hover .zoom-icon {
    opacity: 1;
    transform: scale(1.1);
}

.media-item.has-more .zoom-icon {
    display: none; /* Hide if the "Show More" overlay is present */
}

/* 4 Images Layout inside the Show More button */
.media-item.has-more .more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.media-item.has-more .more-images-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    border-radius: 8px;
    overflow: hidden;
    padding: 4px;
    background: #f8fafc;
}

.media-item.has-more .more-images-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    border-radius: 8px;
}


@keyframes pulseMore {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.media-item.has-more .more-overlay span {
    display: inline-block;
    /*animation: pulseMore 2s infinite ease-in-out;*/
    transition: transform 0.3s ease;
    z-index: 2;
    text-shadow: 0 0 8px rgba(0,0,0,0.8);
}

.media-item.has-more:hover .more-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.media-item.has-more:hover .more-overlay span {
    animation-play-state: paused;
    transform: scale(1.15);
}

.service-card-body {
    padding: 12px;
}

div.service-card-modern li,
div.service-card-modern p {
    font-size: 18px;
}

.service-card-body h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 12px;
    line-height: 1.3;
}

.service-card-copy {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.7;
}

.service-card-copy p {
    margin: 0 0 12px;
}

.service-card-copy p:last-child {
    margin-bottom: 0;
}

.service-card-footer {
    padding: 0 24px 24px;
}

.service-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.service-cta:hover {
    background: #0e3aa9;
    transform: translateX(4px);
}

/* Lightbox Modal CSS */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 20000; /* Ensure it stays above everything, including sticky header */
    padding-top: 120px; /* Increased padding to stay under the sticky header */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Black w/ opacity */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: lightboxZoomIn 0.3s ease;
    object-fit: contain; /* Ensure the image scales proportionally and fits within its box */
}

.lightbox-content {
    /* Allow transform animations and smoother dragging */
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-y;
}

.lightbox-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(90vw, calc(100vw - 80px));
    height: calc(var(--vh, 1vh) * 100 - 180px);
    max-width: 100%;
    overflow: hidden; /* This was causing the clipping if the image was too tall */
    touch-action: none;
    pointer-events: none;
}

.lightbox-preview-image {
    position: absolute;
    left: 50%;
    top: 50%;
    display: none;
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    opacity: 0;
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
    pointer-events: none;
    z-index: 1;
    object-fit: contain;
}

.lightbox-stage .lightbox-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 2;
    pointer-events: auto;
    touch-action: none;
    border-radius: 12px;
    transform-origin: center center;
}

@keyframes zoomIn {
    from {transform:scale(0.9); opacity:0;}
    to {transform:scale(1); opacity:1;}
}

@keyframes zoomOut {
    from {transform:scale(1); opacity:1;}
    to {transform:scale(0.9); opacity:0;}
}

@keyframes lightboxZoomIn {
    from {transform: translate(-50%, -50%) scale(0.9); opacity:0;}
    to {transform: translate(-50%, -50%) scale(1); opacity:1;}
}

@keyframes lightboxZoomOut {
    from {transform: translate(-50%, -50%) scale(1); opacity:1;}
    to {transform: translate(-50%, -50%) scale(0.9); opacity:0;}
}

.lightbox-close {
    position: absolute;
    top: 120px; /* Moved down to align with image inside the container below header */
    right: 35px;
    color: #f1f1f1;
    font-size: 30px;
    /*font-weight: bold;*/
    transition: 0.3s;
    cursor: pointer;
    z-index: 20001; /* Ensure button is clickable above image */
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Lightbox Navigation Arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    border: none;
    color: #f1f1f1;
    font-size: 24px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20001;
}

.lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Lightbox Counter */
.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: #f1f1f1;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20001;
}

/* Show Less Button */
.show-less-container {
    animation: zoomIn 0.3s ease forwards;
}

.show-less-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-less-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

/* CTA Section */
.services-cta {
    padding: 60px 24px 80px;
    background: #ffffff;
}

.cta-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 48px;
    background: linear-gradient(135deg, var(--primary-color), #1a3fa4);
    border-radius: 24px;
    gap: 32px;
}

.cta-content h2 {
    font-size: 1.75rem;
    color: #ffffff;
    margin: 0 0 12px;
}

.cta-content p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    max-width: 500px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-outline {
    padding: 16px 32px;
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #ffffff;
}

/* Responsive */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .cta-card {
        flex-direction: column;
        text-align: center;
    }

    .cta-content p {
        max-width: 100%;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .services-hero {
        padding: 80px 16px 60px;
    }

    .services-overview,
    .services-grid-section,
    .services-cta {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cta-card {
        padding: 32px 24px;
    }

    .lightbox-close {
        top: 100px; /* Adjusted for mobile header space */
        right: 20px;
    }

    .lightbox-nav {
        padding: 10px 12px;
        font-size: 18px;
    }

    .lightbox-content {
        max-width: 95%;
        /* slightly smaller subtraction on mobile to allow for header/close button */
        max-height: calc(var(--vh, 1vh) * 100 - 120px);
    }

    .lightbox-stage {
        width: min(95vw, calc(100vw - 24px));
        height: calc(var(--vh, 1vh) * 100 - 150px);
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-counter {
        font-size: 12px;
        padding: 6px 12px;
        bottom: 20px;
    }
}