/* --- Codebiztech Service Page Theme --- */
:root {
    --primary: #0052a9;
    --primary-glow: #0066d1;
    --secondary: #3b5058;
    --accent: #1a2a3a;

    --bg-main: #f8f9fa;
    --bg-darker: #f0f2f5;
    --bg-surface: rgba(255, 255, 255, 0.7);

    --text-main: #1a1c1e;
    --text-muted: #495057;

    --glass-border: rgba(0, 81, 165, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    /* smooth scroll handled by Lenis */
}

[id] {
    scroll-margin-top: 100px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.7;
    margin: 0;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-main);
}

p {
    color: var(--text-muted);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Header & Logo Section --- */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.logo img {
    height: 70px;
    /* Slim & professional on first load */
    width: auto;
    transition: height var(--transition), opacity var(--transition);
    display: block;
}

/* --- Header Layout & Background --- */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-main);
    /* Makes it solid immediately */
    box-shadow: var(--glass-shadow);
    /* Adds a nice subtle shadow */
    z-index: 1000;
    /* Keeps it above the hero image and other content */
    transition: all var(--transition);
}

/* Optional: If you want a slight transparency blur instead of solid color */
#header {
    background-color: var(--bg-main);
    box-shadow: var(--glass-shadow);
    z-index: 1000;
    transition: all var(--transition);
}

#header.scrolled .logo img {
    height: 54px;
    /* Slightly smaller after scroll */
}

.logo:hover {
    opacity: 0.85;
}

/* --- Service Hero --- */
.service-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 120px;
    padding-bottom: 60px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.service-hero::before {
    display: none;
    /* Removed the dark shadow to show original image */
}

.service-hero .container {
    position: relative;
    z-index: 2;
}

.service-hero .container>div {
    max-width: 800px;
}

.service-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--text-main);
}

.service-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    color: var(--text-muted);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-glow);
    font-weight: 600;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.back-link:hover {
    transform: translateX(-5px);
    color: var(--text-main);
}

/* --- Details Section --- */
.service-details {
    padding: 100px 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.features-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.features-list li {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: var(--transition);
}

.features-list li:nth-child(even) {
    animation-delay: 1s;
}

.features-list li:hover {
    border-color: var(--primary-glow);
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 102, 209, 0.15);
}

.features-list i {
    font-size: 1.5rem;
    color: var(--primary-glow);
    background: rgba(0, 168, 232, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.features-list h4 {
    margin-bottom: 10px;
    font-size: 1.25rem;
}

/* --- Tech Grid --- */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.tech-tag {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.tech-tag:nth-child(3n) { animation-delay: 0.5s; }
.tech-tag:nth-child(3n+1) { animation-delay: 1.2s; }

.tech-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary-glow);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 102, 209, 0.3);
}

.tech-tag i {
    color: var(--primary-glow);
}

.tech-tag:hover i {
    color: white;
}

/* --- Process Section --- */
.process-section {
    padding: 100px 0;
    background: var(--bg-darker);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.process-card {
    background: var(--bg-surface);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    position: relative;
    transition: all 0.5s ease;
    z-index: 1;
    overflow: hidden;
}

.process-card::before,
.process-card::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    background: transparent;
    border: 2px solid transparent;
    transition: all 0.5s ease;
    border-radius: 20px;
    z-index: -1;
}

.process-card::before {
    top: 0;
    left: 0;
}

.process-card::after {
    bottom: 0;
    right: 0;
}

.process-card:hover::before {
    width: 100%;
    height: 100%;
    border-top-color: var(--primary-glow);
    border-right-color: var(--primary-glow);
}

.process-card:hover::after {
    width: 100%;
    height: 100%;
    border-bottom-color: var(--primary-glow);
    border-left-color: var(--primary-glow);
}

.process-card {
    position: relative;
    padding: 40px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: var(--transition);
    overflow: visible;
}

.process-card:nth-child(2) { }
.process-card:nth-child(3) { }

.process-card:hover {
    transform: translateY(-12px) scale(1.03);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 45px rgba(0, 168, 232, 0.25);
    border-color: var(--primary-glow);
}

.process-num {
    font-size: 3rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px var(--primary-glow);
    opacity: 0.3;
    position: absolute;
    top: 20px;
    right: 20px;
}

.process-card h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* --- CTA Box --- */
.cta-box {
    background: linear-gradient(135deg, #f8faff 0%, #eef4fb 100%);
    padding: 60px;
    border: 1px solid rgba(0, 82, 169, 0.1);
    border-radius: 24px;
    text-align: center;
    margin-top: 80px;
    color: var(--text-main);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.cta-box:hover {
    transform: translateY(-8px);
    border-color: var(--primary-glow);
    box-shadow: 0 0 0 3px rgba(0, 102, 209, 0.1), 0 30px 60px rgba(0, 82, 169, 0.08);
}

.cta-box h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.cta-box p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.cta-box .btn {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-box .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.4);
    transition: transform 0.6s ease;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    z-index: -1;
}

.cta-box .btn:hover::before {
    transform: translate(-50%, -50%) scale(1);
    border-radius: 8px; /* Match button border radius */
}

.cta-box:hover .btn {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 82, 169, 0.3);
}

.cta-box .btn i {
    transition: transform 0.3s ease;
}

.cta-box .btn:hover i {
    transform: translateX(5px);
}

/* --- Utils --- */
.image-placeholder {
    width: 100%;
    aspect-ratio: 16/10;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--primary-glow);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.image-placeholder:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-glow);
    box-shadow: 0 0 0 3px rgba(0, 102, 209, 0.2), 0 20px 40px rgba(0, 102, 209, 0.3);
}

.image-placeholder i,
.image-placeholder img {
    transition: var(--transition);
}

.image-placeholder:hover i,
.image-placeholder:hover img {
    filter: drop-shadow(0 0 15px var(--primary-glow));
    transform: scale(1.1);
}

.image-placeholder::before,
.image-placeholder::after,
.cta-box::before,
.cta-box::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    background: transparent;
    border: 2px solid transparent;
    transition: all 0.6s ease;
    border-radius: 24px;
    z-index: 1;
    pointer-events: none;
}

.image-placeholder::before,
.cta-box::before {
    top: -1px;
    left: -1px;
}

.image-placeholder::after,
.cta-box::after {
    bottom: -1px;
    right: -1px;
}

.image-placeholder:hover::before,
.cta-box:hover::before {
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    border-top-color: var(--primary-glow);
    border-right-color: var(--primary-glow);
}

.image-placeholder:hover::after,
.cta-box:hover::after {
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    border-bottom-color: var(--primary-glow);
    border-left-color: var(--primary-glow);
}

.image-placeholder {
    /* Adding the radial gradient glow as a background layer to avoid pseudo-element conflict */
    background-image: radial-gradient(circle at 50% 50%, rgba(0, 82, 169, 0.05) 0%, transparent 70%), 
                      linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
}

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

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

.floating {
    animation: float 6s ease-in-out infinite;
}

/* --- Icon Effects --- */
i[class*="fa-"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Gentle pulse for icons */
.features-list i, 
.tech-tag i, 
.process-card i,
.image-placeholder i {
    /* constant animations removed for performance */
}

/* Special hover state for icons when their parent container is hovered */
.features-list li:hover i,
.tech-tag:hover i,
.process-card:hover i,
.image-placeholder:hover i,
i[class*="fa-"]:hover {
    transform: scale(1.2) rotate(12deg) !important;
    filter: drop-shadow(0 0 15px var(--primary-glow)) !important;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 1s ease;
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 1s ease;
}

.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translate(0);
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .service-hero {
        height: auto;
        padding: 120px 0 60px;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .cta-box {
        padding: 40px 20px;
    }
}