/* ================================================
   css/services.css - THE COSMIC GRID
   With original background + dark constellation
================================================= */

/* --- THE ENVIRONMENT --- */
.services-section {
    position: relative;
    padding: 8rem 0;
    min-height: 100vh;
    background-color: #111;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* --- DARK OVERLAY --- */
.services-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
    pointer-events: none;
}

/* --- DARK CONSTELLATION CANVAS --- */
.services-constellation {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    opacity: 0.70;
}

/* --- SUBTLE YELLOW GLOW --- */
.services-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(
        circle,
        rgba(236, 246, 116, 0.04) 0%,
        rgba(236, 246, 116, 0.02) 30%,
        transparent 60%
    );
    z-index: 4;
    pointer-events: none;
}

/* TOP FADE */
.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 250px;
    background: linear-gradient(to bottom, #000 10%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}

/* BOTTOM FADE */
.services-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    background: linear-gradient(to top, #000 10%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}

/* --- CONTENT WRAPPER --- */
.services-content {
    position: relative;
    z-index: 10;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- THE 2x2 GRID --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
}

/* --- THE COSMIC GLASS CARD --- */
.holo-card {
    position: relative;
    height: 100%;
    background: rgba(10, 10, 18, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cardFloat 6s ease-in-out infinite;
}

/* STAGGER FLOAT */
.holo-card:nth-child(1) { animation-delay: 0s; }
.holo-card:nth-child(2) { animation-delay: 1.5s; }
.holo-card:nth-child(3) { animation-delay: 0.5s; }
.holo-card:nth-child(4) { animation-delay: 2s; }

/* --- GEOMETRIC CORNER ACCENTS --- */
.card-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    transition: all 0.4s ease;
}

.card-corner::before,
.card-corner::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.4s ease;
}

/* Top-left */
.card-corner.tl { top: 8px; left: 8px; }
.card-corner.tl::before { width: 12px; height: 1px; top: 0; left: 0; }
.card-corner.tl::after { width: 1px; height: 12px; top: 0; left: 0; }

/* Top-right */
.card-corner.tr { top: 8px; right: 8px; }
.card-corner.tr::before { width: 12px; height: 1px; top: 0; right: 0; }
.card-corner.tr::after { width: 1px; height: 12px; top: 0; right: 0; }

/* Bottom-left */
.card-corner.bl { bottom: 8px; left: 8px; }
.card-corner.bl::before { width: 12px; height: 1px; bottom: 0; left: 0; }
.card-corner.bl::after { width: 1px; height: 12px; bottom: 0; left: 0; }

/* Bottom-right */
.card-corner.br { bottom: 8px; right: 8px; }
.card-corner.br::before { width: 12px; height: 1px; bottom: 0; right: 0; }
.card-corner.br::after { width: 1px; height: 12px; bottom: 0; right: 0; }

/* HOVER: Corners light up yellow */
.holo-card:hover .card-corner::before,
.holo-card:hover .card-corner::after {
    background: var(--primary);
    box-shadow: 0 0 8px rgba(236, 246, 116, 0.5);
}

/* Expand corners on hover */
.holo-card:hover .card-corner::before { width: 20px; }
.holo-card:hover .card-corner::after { height: 20px; }

/* --- SCANNER BEAM --- */
.holo-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(236, 246, 116, 0.04),
        transparent
    );
    transform: skewY(-10deg);
    animation: scanSweep 8s linear infinite;
    pointer-events: none;
}

.holo-card:nth-child(1)::before { animation-delay: 0s; }
.holo-card:nth-child(2)::before { animation-delay: 4s; }
.holo-card:nth-child(3)::before { animation-delay: 2s; }
.holo-card:nth-child(4)::before { animation-delay: 6s; }

/* --- HOVER STATE --- */
.holo-card:hover {
    animation-play-state: paused;
    transform: translateY(-10px);
    background: rgba(15, 15, 28, 0.85);
    border-color: rgba(236, 246, 116, 0.25);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(236, 246, 116, 0.05);
}

/* --- ICON --- */
.card-icon {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: iconIdle 20s linear infinite;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-icon i {
    animation: iconCounterIdle 20s linear infinite;
}

.holo-card:hover .card-icon {
    color: #000;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(236, 246, 116, 0.6);
    animation: none;
    transform: rotate(225deg);
}

.holo-card:hover .card-icon i {
    animation: none;
    transform: rotate(-225deg);
}

/* --- TYPOGRAPHY --- */
.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-subtitle {
    font-family: monospace;
    color: var(--primary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    display: block;
    opacity: 0.8;
}

/* --- LIST --- */
.card-list {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.2rem;
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.card-list li {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.5rem;
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.card-list li::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--primary);
    transform: rotate(45deg);
    opacity: 0.4;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.holo-card:hover .card-list li {
    color: rgba(255, 255, 255, 0.9);
}

.holo-card:hover .card-list li::before {
    opacity: 1;
    box-shadow: 0 0 6px var(--primary);
}

/* --- ANIMATIONS --- */
@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes scanSweep {
    0% { top: -50%; opacity: 0; }
    30% { opacity: 1; }
    60% { top: 150%; opacity: 0; }
    100% { top: 150%; opacity: 0; }
}

@keyframes iconIdle {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

@keyframes iconCounterIdle {
    from { transform: rotate(-45deg); }
    to { transform: rotate(-405deg); }
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    .services-section {
        padding: 5rem 0;
        background-attachment: scroll;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .services-glow {
        width: 400px;
        height: 400px;
    }

    .holo-card {
        padding: 1.5rem;
    }
}