/* 
   THE CLARITY GRID 
   PREMIUM LIGHT EDITORIAL SERVICES 
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --service-font-display: 'Outfit', sans-serif;
    --service-font-body: 'Inter', sans-serif;
    
    --service-navy: #0F172A;
    --service-blue: #2563EB;
    --service-indigo: #4F46E5;
    --service-pink: #EC4899;
    --service-white: #FFFFFF;
    --service-grey-50: #F8FAFC;
    --service-grey-100: #F1F5F9;
    --service-grey-200: #E2E8F0;
    --service-grey-600: #475569;
    --service-grey-900: #0F172A;
    
    --gradient-brand: linear-gradient(135deg, #4f46e5 0%, #ec4899 100%);
}

.services-redesign-wrapper {
    background: #FFFFFF;
    font-family: var(--service-font-body);
    color: var(--service-navy);
    padding: 140px 0 0px; /* Stripped bottom padding */
    min-height: 100vh;
    overflow-x: hidden;
}

/* Hero Section (About Us Style) */
.services-hero-modern {
    width: 100%;
    max-width: 100%;
    padding: 0 5%;
    margin-bottom: 0px;
}

.editorial-header-pro {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.editorial-tag-pro {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #4f46e5;
    margin-bottom: 5px;
}

.editorial-title-pro {
    font-size: clamp(3.5rem, 6vw, 4.5rem);
    font-weight: 900;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.04em;
    font-family: var(--service-font-display);
}

.editorial-accent-pro {
    width: 60px;
    height: 6px;
    background: var(--gradient-brand);
    border-radius: 4px;
}

/* Clarity Grid (Full Size) */
.services-container {
    width: 100%;
    padding: 40px 5% 60px; /* Reduced top padding for more immediate flow */
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Enforced 2 in a row */
    gap: 40px;
    margin-bottom: 60px;
    position: relative;
    background: #FFFFFF;
    background-image: 
        radial-gradient(var(--service-grey-200) 1px, transparent 1px);
    background-size: 40px 40px; /* Subtle Grid Pattern */
}


.service-card-modern {
    background: var(--service-grey-50);
    border-radius: 20px;
    padding: 80px 48px 48px; /* Increased top padding for the stuck header */
    border: 1px solid var(--service-grey-200);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: relative;
    margin-top: 20px;
    overflow: hidden; /* Back to hidden for internal watermarks */
}

/* Base Watermark Style */
.service-card-modern::before {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 240px;
    height: 240px;
    opacity: 0.01; /* Ultra-subtle for absolute readability */
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 0;
    filter: grayscale(1);
    transition: all 0.6s ease;
}

.service-card-modern:hover::before {
    opacity: 0.03; /* Minimal hover visibility */
    transform: scale(1.1) rotate(-10deg);
}

.service-card-modern:hover {
    transform: translateY(-8px);
    background: white;
    border-color: var(--service-indigo);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.05);
}

.service-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    width: 100%;
}

.service-card-header .icon-box-modern {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.service-title-group {
    display: flex;
    flex-direction: column;
}

.icon-box-modern {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.service-card-modern:hover .icon-box-modern {
    transform: scale(1.1) rotate(-5deg);
}

.icon-box-modern svg {
    width: 32px;
    height: 32px;
}

.service-title-modern {
    font-family: var(--service-font-display);
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    color: var(--service-navy);
    line-height: 1.2;
}

.service-subtitle-modern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0;
    color: white;
    padding: 0;
    height: 50px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}

/* Base style for icon block */
.service-subtitle-modern i {
    width: 80px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.5s ease; /* For hover effect */
}

/* Base style for text block */
.service-subtitle-modern span {
    padding-left: 24px;
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    background: var(--service-indigo); /* Consistent Indigo for text area */
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); /* For hover effect */
}

/* Hover effects triggered by card hover */
.service-card-modern:hover .service-subtitle-modern span {
    background: #1E1B4B; /* Modern Deep Midnight Blue */
    padding-left: 36px; /* Strategic lateral slide */
    letter-spacing: 0.1em;
}

.service-card-modern:hover .service-subtitle-modern i {
    background: #4F46E5; /* Bright Indigo Accent */
    transform: scale(1.1);
}

/* Category Specific Icon Backgrounds */
.sub-management { background: var(--service-indigo); }
.sub-management i { background: #4338CA; } /* Royal */

.sub-improvement { background: var(--service-indigo); }
.sub-improvement i { background: #4338CA; } /* Royal */

.sub-setup { background: var(--service-indigo); }
.sub-setup i { background: #4338CA; } /* Royal */

.sub-it { background: var(--service-indigo); }
.sub-it i { background: #4338CA; } /* Royal */

.sub-preschool { background: var(--service-indigo); }
.sub-preschool i { background: #4338CA; } /* Royal */

.sub-recruitment { background: var(--service-indigo); }
.sub-recruitment i { background: #4338CA; } /* Royal */

.service-subtitle-modern::before {
    display: none; /* Removed dot in favor of category icons */
}

.service-description-modern {
    font-size: 19px; /* Increased from 17px */
    line-height: 1.8;
    color: var(--service-grey-600);
    margin-bottom: 48px;
    flex: 1;
}

.service-link-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    background: #4F46E5; /* Modern Indigo */
    text-decoration: none;
    font-size: 0.85rem;
    padding: 12px 32px;
    border-radius: 100px;
    transition: all 0.4s ease;
    width: fit-content;
    position: relative;
    border: none;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
    overflow: hidden;
    z-index: 1;
}

.service-link-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #EC4899; /* Modern Pink Hover */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: -1;
}

.service-link-modern:hover {
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.3);
    text-decoration: none; /* Explicitly removed */
}

.service-link-modern:hover::after {
    transform: scaleX(1);
}

.service-link-modern span {
    position: relative;
    z-index: 2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Consultancy Transition (Quantum Design) */
.services-footer-pattern {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #F1F5F9 0%, #E0E7FF 100%); /* Modern Light Theme */
    position: relative;
    overflow: hidden;
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(79, 70, 229, 0.1);
}

/* The Global Editorial Horizon (Moving World Image) */
.services-footer-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Using the High-Resolution Image we generated */
    background-image: url('./assets/world-map-dots.png');
    background-size: 1000px auto;
    background-position: center;
    background-repeat: repeat-x;
    pointer-events: none;
    opacity: 0.15; /* Increased opacity slightly for visibility */
    animation: mapDrift 60s linear infinite;
    mix-blend-mode: multiply; /* Helps the dots blend into the background cleanly */
}

@keyframes mapDrift {
    from { background-position: 0 center; }
    to { background-position: -1200px center; }
}

.nebula-icon {
    position: absolute;
    color: var(--service-indigo); /* Deeper for light theme */
    transition: all 0.5s ease;
    filter: drop-shadow(0 0 10px rgba(79, 70, 229, 0.1));
    animation: floatIcon 6s infinite ease-in-out;
}

.nebula-icon:hover {
    color: var(--service-pink);
    filter: drop-shadow(0 0 20px var(--service-pink));
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.n-icon-1 { top: 20%; left: 10%; animation-delay: 0s; }
.n-icon-2 { bottom: 25%; left: 20%; animation-delay: 1s; }
.n-icon-3 { top: 15%; right: 15%; animation-delay: 2s; }
.n-icon-4 { bottom: 20%; right: 10%; animation-delay: 3s; }
.n-icon-5 { top: 40%; left: 5%; animation-delay: 4s; }

.innovation-message {
    position: relative;
    z-index: 5;
    text-align: center;
}

.innovation-message h3 {
    font-family: var(--service-font-display);
    font-size: 2.2rem; /* Slightly larger for the typing effect visibility */
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    letter-spacing: -0.01em;
    display: inline-block;
}

/* Typing Reveal Effect (Infinite Loop) */
.typing-reveal {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--service-pink);
    width: 0;
    animation: 
        typingLoop 7s steps(30, end) infinite,
        blink-caret 0.75s step-end infinite;
}

@keyframes typingLoop {
    0%, 10% { width: 0; }
    40%, 60% { width: 100%; } /* Stay typed out for a moment */
    90%, 100% { width: 0; } /* Rewind */
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--service-pink); }
}

.innovation-message p {
    color: var(--service-navy);
    opacity: 0.6;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.3em; /* Normalized for light theme */
    margin-top: 10px;
    font-weight: 700;
    /* Static for looping context */
    animation: none; 
    opacity: 1;
}

/* Educational Themed Background Icons */
.edu-icon-1 { top: 15%; left: 8%; animation: floatEdu 8s infinite ease-in-out; opacity: 0.15; }
.edu-icon-2 { bottom: 20%; left: 15%; animation: floatEdu 10s infinite ease-in-out 1s; opacity: 0.12; }
.edu-icon-3 { top: 10%; right: 12%; animation: floatEdu 12s infinite ease-in-out 2s; opacity: 0.14; }
.edu-icon-4 { bottom: 15%; right: 18%; animation: floatEdu 9s infinite ease-in-out 3s; opacity: 0.18; }
.edu-icon-5 { top: 45%; left: 3%; animation: floatEdu 11s infinite ease-in-out 0.5s; opacity: 0.1; }
.edu-icon-6 { top: 35%; right: 5%; animation: floatEdu 13s infinite ease-in-out 1.5s; opacity: 0.13; }

/* Kinetic Atmospheric Particles (Smaller, Faster) */
.edu-particle-1 { top: 10%; left: 30%; width: 14px; opacity: 0.08; animation: driftEdu 7s infinite linear; }
.edu-particle-2 { bottom: 15%; left: 40%; width: 12px; opacity: 0.1; animation: driftEdu 9s infinite linear reverse; }
.edu-particle-3 { top: 25%; right: 35%; width: 16px; opacity: 0.06; animation: driftEdu 11s infinite linear; }
.edu-particle-4 { bottom: 40%; right: 25%; width: 14px; opacity: 0.09; animation: driftEdu 8s infinite linear reverse; }

@keyframes driftEdu {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(40px, -40px) rotate(360deg); }
}

@keyframes floatEdu {
    0%, 100% { transform: translateY(0) rotate(0) scale(1); }
    33% { transform: translateY(-20px) rotate(3deg) scale(1.05); }
    66% { transform: translateY(10px) rotate(-3deg) scale(0.95); }
}

@keyframes revealTitle {
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes revealSub {
    to { 
        opacity: 1; 
        letter-spacing: 0.3em; /* Settle into professional width */
    }
}

/* Responsive */
@media (max-width: 768px) {
    .services-redesign-wrapper {
        padding-top: 40px; /* Reduce top whitespace on mobile */
    }
    .services-container {
        grid-template-columns: 1fr;
    }
    .service-card-modern {
        padding: 90px 24px 32px; /* Ensure top padding clears the potentially taller wrapping banner */
    }
    .service-subtitle-modern {
        height: auto;
        min-height: 50px;
        align-items: stretch; /* Allow children to stretch and fill background equally */
    }
    .service-subtitle-modern span {
        height: auto;
        padding: 12px 16px 12px 24px;
        line-height: 1.4;
    }
    .service-subtitle-modern i {
        height: auto;
    }
    .services-main-title { font-size: 2.5rem; }
}
/* Bespoke Secondary Watermarks (Precisely Matched to Titles) */
.service-card-modern:has(.icon-management)::before {
    /* Process/Management - Clipboard with Line */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1'%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M9 12h6'/%3E%3Cpath d='M9 16h6'/%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3C/svg%3E");
}

.service-card-modern:has(.icon-improvement)::before {
    /* Improvement - Chart with Trending Up */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m19 9-5 5-4-4-3 3'/%3E%3C/svg%3E");
}

.service-card-modern:has(.icon-setup)::before {
    /* Setup - The Strategic Key to Launch */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1'%3E%3Cpath d='m21 2-2 2'/%3E%3Ccircle cx='7' cy='17' r='5'/%3E%3Cpath d='M11 13 21 3'/%3E%3Cpath d='m21 3-5 5'/%3E%3Cpath d='m18 6-5 5'/%3E%3C/svg%3E");
}

.service-card-modern:has(.icon-it)::before {
    /* IT Solutions - Network/Connectivity */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1'%3E%3Crect x='2' y='2' width='20' height='8' rx='2'/%3E%3Crect x='2' y='14' width='20' height='8' rx='2'/%3E%3Cline x1='6' y1='10' x2='6' y2='14'/%3E%3Cline x1='18' y1='10' x2='18' y2='14'/%3E%3C/svg%3E");
}

.service-card-modern:has(.icon-preschool)::before {
    /* Preschool - The Sun of Early Growth */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3C/svg%3E");
}

.service-card-modern:has(.icon-recruitment)::before {
    /* Medal/Success for Recruitment */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1'%3E%3Cpath d='M8.21 13.89L7 23l5-3 5 3-1.21-9.11'/%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3C/svg%3E");
}
