/* Page Detail Styles - Modern Overhaul */

/* --- Keyframes & Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-left {
    opacity: 0;
}

.fade-in-left.visible {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.fade-in-right {
    opacity: 0;
}

.fade-in-right.visible {
    animation: fadeInRight 0.8s ease-out forwards;
}

/* Background Placeholder Helper */
.bg-group-placeholder {
    position: relative;
    background: url('../../../public/group.png') center/cover no-repeat !important;
    color: white;
}

.bg-group-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 42, 54, 0.9);
    /* Dark Brand Blue Overlay */
    z-index: 1;
}

.bg-group-placeholder>* {
    position: relative;
    z-index: 2;
}

/* Split Layout Generic Helper */
.content-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.content-split .image-container img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .content-split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- Global Section Styles --- */
.back-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #17c1bc;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 24px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.back-nav:hover {
    color: #1de782;
    transform: translateX(-5px);
}

.content-section {
    padding: 80px 0;
    transition: background-color 0.3s ease;
}

.content-section.alt-bg {
    background: #f4f7f6;
    /* Subtle mint-gray tint */
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.content-section h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a2a36;
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

.content-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #1de782 0%, #17c1bc 100%);
    margin-top: 12px;
    border-radius: 2px;
}

.content-section p {
    font-size: 1.15rem;
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 28px;
    max-width: 800px;
}

/* --- Hero Section --- */
.page-hero {
    background: linear-gradient(135deg, #0f1c25 0%, #1a2a36 100%);
    color: #fff;
    padding: 100px 0 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Decorative background glow */
.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(29, 231, 130, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.page-hero .container {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

.page-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #ffffff 0%, #b2e9d6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: #d1fae5;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
}

/* --- Benefit Lists --- */
.benefit-list {
    list-style: none;
    padding: 0;
    margin: 40px 0;
    display: grid;
    gap: 20px;
}

.benefit-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    font-size: 1.1rem;
    color: #2d3748;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.benefit-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.benefit-list li .check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231de782' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    margin-top: 3px;
}

/* --- Modern Grid Layout --- */
.modern-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 50px;
}

.modern-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    text-align: left;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modern-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: #1de782;
    transition: width 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.modern-card:hover::after {
    width: 100%;
}

.modern-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a2a36;
    margin-bottom: 12px;
}

.modern-card p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Highlight style for Modern Card */
.modern-card.highlight {
    background: #1a2a36;
    border-color: #1a2a36;
}

.modern-card.highlight h3 {
    color: #1de782;
}

.modern-card.highlight p {
    color: rgba(255, 255, 255, 0.8);
}

.modern-card.highlight::after {
    background: #1de782;
    width: 0%;
    /* Disable hover effect */
}

.modern-card.large {
    grid-column: 3;
    grid-row: span 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}

.modern-card.large h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.modern-card.large p {
    font-size: 1.2rem;
}

@media (max-width: 992px) {
    .modern-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .modern-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Floating Circle Layout (Retained for reference if needed, but unused) --- */
.circle-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    margin-top: 50px;
    padding: 20px;
}

.circle-item {
    width: 200px;
    height: 200px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 4px solid transparent;
    transition: all 0.3s ease;
    animation: float 4s ease-in-out infinite;
}

.circle-item:hover {
    border-color: #1de782;
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(29, 231, 130, 0.2);
    animation-play-state: paused;
}

.circle-item:nth-child(2n) {
    animation-delay: 1s;
}

.circle-item:nth-child(3n) {
    animation-delay: 2s;
}

.circle-item:nth-child(4n) {
    animation-delay: 0.5s;
}

.circle-item.highlight {
    background: linear-gradient(135deg, #1de782 0%, #17c1bc 100%);
    color: white;
    border: none;
    box-shadow: 0 10px 30px rgba(29, 231, 130, 0.4);
}

.circle-item.highlight h3,
.circle-item.highlight p {
    color: white;
}

.circle-item.highlight:hover {
    box-shadow: 0 15px 45px rgba(29, 231, 130, 0.6);
}

.circle-item h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a2a36;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.circle-item p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .circle-grid {
        gap: 20px;
    }

    .circle-item {
        width: 150px;
        height: 150px;
        padding: 15px;
    }

    .circle-item h3 {
        font-size: 0.95rem;
    }

    .circle-item p {
        font-size: 0.8rem;
    }
}

/* --- Feature Cards (Legacy/Other) --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 50px;
}

.feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-top: 4px solid transparent;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-top-color: #1de782;
}

.feature-card.highlight {
    background: linear-gradient(135deg, #1de782 0%, #17c1bc 100%);
    color: white;
    border-top: none;
    box-shadow: 0 10px 30px rgba(29, 231, 130, 0.3);
}

.feature-card.highlight h3,
.feature-card.highlight p {
    color: white;
}

.feature-card.highlight:hover {
    box-shadow: 0 15px 45px rgba(29, 231, 130, 0.5);
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a2a36;
    margin-bottom: 16px;
}

.feature-card p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
    max-width: none;
}

/* --- Process Steps (Timeline Style) --- */
.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 50px;
    position: relative;
}

.step {
    background: #fff;
    border-radius: 16px;
    padding: 32px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 1;
    /* Above timeline */
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.step-number {
    width: 48px;
    height: 48px;
    background: #fff;
    border: 3px solid #1de782;
    color: #1a2a36;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 20px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8);
    /* Gap effect */
}

.step h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
}

.step p {
    font-size: 0.95rem;
    color: #718096;
}

/* --- CTA Section --- */
.cta-section {
    background: linear-gradient(135deg, #1de782 0%, #15aabf 100%);
    padding: 80px 0;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Subtle pattern for CTA */
.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    pointer-events: none;
}

.cta-section h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cta-section h2::after {
    display: none;
    /* remove standard divider */
}

.cta-section p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: #fff;
    color: #0f766e;
    padding: 16px 42px;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    background: #f0fdfa;
}

/* --- Service Detail Images --- */
.service-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.service-image {
    border-radius: 20px;
    overflow: hidden;
    /* box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); */
    transform: rotate(2deg);
    /* border: 4px solid #fff; */
    transition: transform 0.5s ease;
}

.service-image:hover {
    transform: rotate(0deg) scale(1.02);
}

.service-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .page-hero h1 {
        font-size: 2.8rem;
    }

    .process-steps::before {
        display: none;
    }

    /* Hide timeline line on tablet */
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .service-overview {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .service-image {
        transform: none;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .content-section {
        padding: 50px 0;
    }

    .page-hero {
        padding: 60px 20px 40px;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .feature-grid,
    .process-steps {
        grid-template-columns: 1fr;
    }

    .cta-section h2 {
        font-size: 2rem;
    }

    .benefit-list {
        grid-template-columns: 1fr;
    }
}

/* --- Layout Variations for Diversity --- */

/* Variation 1: Left-Aligned Hero (Advisory Services) - REMOVED */

/* Variation 2: Vertical Steps (Alternating Timeline) */
.process-steps.vertical {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    /* Override grid */
    max-width: 900px;
    margin: 60px auto 0;
    gap: 0;
    position: relative;
}

/* Central Timeline Line */
.process-steps.vertical::before {
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    height: 100%;
    background: #e2e8f0;
}

.process-steps.vertical .step {
    width: 45%;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 20px 0;
    position: relative;
}

/* Odd Steps: Align Left (Text Right) */
.process-steps.vertical .step:nth-child(odd) {
    align-self: flex-start;
    text-align: right;
    padding-right: 60px;
}

/* Even Steps: Align Right (Text Left) */
.process-steps.vertical .step:nth-child(even) {
    align-self: flex-end;
    text-align: left;
    padding-left: 60px;
    margin-top: -40px;
    /* Slight overlap for tighter flow */
}

.process-steps.vertical .step:first-child {
    margin-top: 0;
}

/* Number Positioning on Center Line */
.process-steps.vertical .step-number {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    z-index: 2;
    margin: 0;
    left: auto;
    right: auto;
}

.process-steps.vertical .step:nth-child(odd) .step-number {
    right: -84px;
    /* 60px padding + 24px (half width) */
}

.process-steps.vertical .step:nth-child(even) .step-number {
    left: -84px;
    /* 60px padding + 24px (half width) */
}

/* Mobile Adjustments for Timeline */
@media (max-width: 768px) {
    .process-steps.vertical::before {
        left: 30px;
    }

    .process-steps.vertical .step {
        width: 100%;
        align-self: flex-start !important;
        text-align: left !important;
        padding: 0 0 40px 80px !important;
        margin-top: 0 !important;
    }

    .process-steps.vertical .step-number {
        left: 6px !important;
        right: auto !important;
    }
}

/* Variation 3: Dense Technical List (Defensive Services) */
.benefit-list.technical {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.benefit-list.technical li {
    padding: 16px;
    font-size: 1rem;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #1de782;
    border-radius: 8px;
    background: #f8fafc;
}

.benefit-list.technical li:hover {
    border-color: #17c1bc;
    background: #fff;
}

.benefit-list.technical li .check {
    width: 20px;
    height: 20px;
}

/* --- Unique Layout Variations (Discover & Get Started) --- */

/* Split Hero (Side-by-Side) */
.page-hero.split {
    text-align: left;
    padding: 0;
    display: flex;
    min-height: 550px;
    align-items: stretch;
}

.page-hero.split .hero-content {
    flex: 1;
    padding: 100px 8%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #0f1c25 0%, #1a2a36 100%);
    position: relative;
    z-index: 2;
}


/* Narrative Split (Asymmetric) */
.narrative-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    overflow: hidden;
    min-height: 780px;
}

.narrative-split.reverse {
    grid-template-columns: 1fr 1fr;
}

.narrative-text {
    padding: 100px 8%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.narrative-image {
    min-height: 500px;
    background: url('../../../public/group.png') center/cover no-repeat;
    position: relative;
}

.narrative-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(29, 231, 130, 0.05);
    /* Very subtle brand tint */
}

/* Glass Overlay Section */
.glass-overlay-section {
    position: relative;
    padding: 140px 0;
    background: url('../../../public/group.png') center/cover no-repeat fixed;
    text-align: center;
}

.glass-overlay-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 28, 37, 0.8);
}

.glass-card {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 80px 60px;
    max-width: 1000px;
    margin: 0 auto;
    color: white;
}

.glass-card h2 {
    color: white !important;
    font-size: 2.8rem;
}

.glass-card p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.3rem;
    margin-bottom: 0;
    max-width: 100%;
}

.glass-card h2::after {
    background: #1de782;
    margin: 20px auto 0;
}

@media (max-width: 992px) {
    .page-hero.split {
        flex-direction: column;
        min-height: auto;
    }

    .narrative-split,
    .narrative-split.reverse {
        grid-template-columns: 1fr;
    }

    .narrative-image {
        min-height: 300px;
        order: -1;
    }

    .narrative-text {
        padding: 60px 5%;
    }

    .glass-card {
        padding: 40px 20px;
        margin: 0 20px;
    }
}