/* Services page styles */

.services-hero {
    padding: 3.2rem 1rem;
    /* reduced vertical padding */
    text-align: center;
    margin-top: 100px;
    /* pull hero closer to top for tighter layout */
}

.services-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: .6rem;
    font-family: 'Orbitron', sans-serif;
}

.services-hero-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 1rem;
}

.services-hero-inner p {
    max-width: 760px;
    margin: 0 auto 1rem auto;
    color: #334155;
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Button specific to services hero */
.services-hero-inner .btn-primary {
    display: inline-block;
    margin-top: 0.6rem;
}

.services-main {
    padding: 2rem 0 3.2rem 0;
    margin: 20px;
    /* reduce outer padding and let content stretch */
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    /* tighter grid gap */
    max-width: 1100px;
    margin: 0 auto;
}

.service-card {
    background: white;
    border-radius: 10px;
    padding: 1.15rem;
    /* smaller card padding */
    box-shadow: 0 6px 22px rgba(16, 24, 40, 0.06);
    transition: transform .22s ease, box-shadow .22s ease;
}

.service-card h3 {
    margin-bottom: .6rem;
}

.service-card p {
    color: #4b5563;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(16, 24, 40, 0.08);
}

.services-cta {
    text-align: center;
    margin-top: 3.25rem;
}

/* CTA paragraph — separate from button styles */
.services-cta p {
    margin: 0 0 0.6rem 0;
    /* space below paragraph before button */
    color: #334155;
    font-size: 1rem;
}

/* Page-specific adjustments for primary CTA inside services section */
.services-cta .btn-primary {
    display: inline-block;
    margin: 0;
    /* reset global margins */
    margin-top: 0.25rem;
    /* small gap above button if needed */
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.9rem;
    }
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .services-hero {
        padding: 2rem 1rem;
        /* compact on small screens */
        margin-top: 28px;
    }

    .service-card {
        padding: 1rem;
        /* slightly reduce card padding on small screens */
    }
}

/* Extra gallery and case studies */
.services-extra {
    padding: 2.2rem 1rem 3rem 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(250, 250, 250, 1));
}

.services-extra .container {
    max-width: 1100px;
    margin: 0 auto;
}

.extra-header {
    text-align: center;
    margin-bottom: 1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
}

.gallery-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.gallery-item img:hover {
    transform: scale(1.04);
}

.case-studies {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1.2rem;
}

.case {
    display: flex;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(16, 24, 40, 0.06);
}

.case-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.case-media {
    flex: 1 1 50%;
    min-height: 160px;
}

.case-body {
    flex: 1 1 50%;
    padding: 1.05rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.case-body h3 {
    margin-bottom: 0.5rem;
}

.case-body p {
    color: #475569;
    margin-bottom: 0.8rem;
}

.info-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.25rem;
}

.info {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(16, 24, 40, 0.04);
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .case-studies {
        grid-template-columns: 1fr;
    }

    .info-blocks {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .gallery-item img {
        height: 120px;
    }

    .case {
        flex-direction: column;
    }

    .case-media {
        min-height: 140px;
    }

    .case-body {
        padding: .9rem;
    }
}

/* Project Modal Gallery Styles */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    width: 900px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalEnter 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes modalEnter {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.modal-header {
    padding: 20px 24px 16px 24px;
    background: linear-gradient(180deg, #fff, #fafafa);
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.modal-description {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
}

.modal-gallery {
    position: relative;
    background: #f9fafb;
    height: 400px;
    display: flex;
    align-items: center;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.9);
}

.gallery-prev {
    left: 16px;
}

.gallery-next {
    right: 16px;
}

.gallery-viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.gallery-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-image.active {
    opacity: 1;
}

.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px 20px 24px;
    background: white;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #d1d5db;
    cursor: pointer;
    transition: background 0.2s ease;
}

.gallery-dot.active {
    background: #6366f1;
}

.gallery-dot:hover {
    background: #9ca3af;
}

.gallery-dot.active:hover {
    background: #4f46e5;
}

/* Mobile responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95vw;
        max-height: 95vh;
    }

    .modal-gallery {
        height: 300px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .gallery-prev {
        left: 12px;
    }

    .gallery-next {
        right: 12px;
    }

    .modal-header {
        padding: 16px 20px 12px 20px;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    .gallery-indicators {
        padding: 12px 20px 16px 20px;
    }
}


/* Section layout */
.feature-cards {
    position: relative;
    padding: 48px 16px;
    overflow: visible;
    background: transparent;
}

.feature-cards-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    z-index: 2;
    /* sit above decorative bg */
}

/* Horizontal card appearance (stacked vertically) */
.h-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(9, 30, 66, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.h-card .card-content h3 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
}

.h-card .card-content p {
    margin: 0;
    color: #444;
}

/* Decorative background element */
.feature-cards .decorative-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 10% 20%, rgba(255, 209, 102, 0.14), transparent 8%),
        radial-gradient(circle at 85% 80%, rgba(99, 179, 237, 0.08), transparent 12%);
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 800px) {
    .h-card {
        flex-direction: column;
        text-align: left;
    }
}