/* --- Subpage Styling System --- */
.subpage-hero {
    position: relative;
    padding: 12rem 0 6rem;
    background: radial-gradient(circle at 10% 20%, rgba(10, 14, 27, 0.95) 0%, rgba(22, 28, 49, 0.9) 100%);
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
    text-align: center;
}

.subpage-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 80% 20%, rgba(227, 6, 19, 0.15), transparent 50%),
                radial-gradient(ellipse at 20% 80%, rgba(0, 210, 255, 0.15), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.subpage-hero .container {
    position: relative;
    z-index: 1;
}

.subpage-hero h1 {
    font-size: 4rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.breadcrumbs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 1rem;
    font-weight: 500;
}

.breadcrumbs a {
    color: var(--text-dim);
    transition: 0.3s;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs span.current {
    color: var(--accent-red);
}

/* --- Content Layouts --- */
.subpage-content {
    padding: 8rem 0;
    background-color: var(--bg-dark);
}

.subpage-card {
    background: rgba(15, 20, 35, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 210, 255, 0.2);
    padding: 3rem;
    border-radius: 12px;
    height: 100%;
    transition: all 0.4s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.subpage-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(0,210,255,0.5), rgba(227,6,19,0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.2;
    transition: 0.4s ease;
    pointer-events: none;
}

.subpage-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: transparent;
    box-shadow: 0 10px 40px rgba(0, 210, 255, 0.15), 0 0 20px rgba(227, 6, 19, 0.1);
}

.subpage-card:hover::before {
    opacity: 1;
}

/* Neon variations for the grid items to match the infographic */
.services-grid > .subpage-card:nth-child(4n+1)::before {
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
}
.services-grid > .subpage-card:nth-child(4n+2)::before {
    background: linear-gradient(135deg, #ff0844, #ffb199);
}
.services-grid > .subpage-card:nth-child(4n+3)::before {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
}
.services-grid > .subpage-card:nth-child(4n+4)::before {
    background: linear-gradient(135deg, #b06ab3, #4568dc);
}

.subpage-card .card-icon {
    font-size: 2.5rem;
    color: var(--accent-red);
    margin-bottom: 1.5rem;
}

.subpage-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.subpage-card p {
    color: var(--text-dim);
    line-height: 1.7;
}

/* --- Isometric Services Grid --- */
.isometric-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.iso-card {
    position: relative;
    background: rgba(15, 20, 35, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2.5rem;
    padding-top: 8rem;
    transition: all 0.4s ease;
    overflow: visible;
    text-align: center;
}

.iso-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 20px var(--neon-color);
    border-color: var(--neon-color);
}

.iso-cube {
    position: absolute;
    top: 4rem;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(60deg) rotateZ(-45deg);
    width: 80px;
    height: 80px;
    transform-style: preserve-3d;
    transition: all 0.4s ease;
}

.iso-card:hover .iso-cube {
    transform: translate(-50%, -60%) rotateX(60deg) rotateZ(-45deg) scale(1.1);
}

.cube-top, .cube-left, .cube-right {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(15, 20, 35, 0.8);
    border: 2px solid var(--neon-color);
    box-shadow: inset 0 0 15px var(--neon-color);
}

.cube-top {
    transform: translateZ(40px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cube-top i {
    transform: rotateZ(45deg) rotateX(-60deg);
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 0 0 10px var(--neon-color);
}

.cube-right {
    transform: rotateX(90deg) translateZ(40px);
}

.cube-left {
    transform: rotateY(-90deg) translateZ(40px);
}

.iso-text {
    position: relative;
    z-index: 2;
}

.iso-text h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #fff;
}

.iso-text p {
    color: var(--text-dim);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* --- Legal / Policy Layout --- */
.policy-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 4rem;
    border-radius: 4px;
    color: var(--text-dim);
}

.policy-box h2 {
    color: var(--text-main);
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.policy-box h2:first-of-type {
    margin-top: 0;
}

.policy-box p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.policy-box ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    list-style-type: square;
}

.policy-box ul li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

/* --- Contact Page Specific --- */
.contact-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 4rem;
}

.contact-map {
    height: 350px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
    border-radius: 4px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: invert(90%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

/* --- Responsive Adaptations --- */
@media (max-width: 991px) {
    .subpage-hero {
        padding: 9rem 0 4rem;
    }
    .subpage-hero h1 {
        font-size: 3rem;
    }
    .subpage-content {
        padding: 5rem 0;
    }
    .contact-grid-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 3rem;
    }
    .policy-box {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .subpage-hero h1 {
        font-size: 2.2rem;
    }
    .policy-box h2 {
        font-size: 1.4rem;
    }
}
