/* ============================================
   SapCod - Program Development Page Styles
   Ultra Premium Design with Animations
   ============================================ */

/* ===== Hero Section ===== */
.pd-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 150px 0 80px;
    background: #fafbfc;
    overflow: hidden;
    isolation: isolate;
}
[data-theme="dark"] .pd-hero { background: #060610; }

.pd-hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
#pdCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.pd-hero-orb {
    position: absolute; border-radius: 50%; filter: blur(120px);
    opacity: 0.06; animation: pdOrbFloat 12s ease-in-out infinite;
}
.pd-hero-orb.pd-orb-1 { width: 500px; height: 500px; background: #339966; top: -150px; right: -100px; }
.pd-hero-orb.pd-orb-2 { width: 400px; height: 400px; background: #0066ff; bottom: -100px; left: -80px; animation-delay: 5s; }

@keyframes pdOrbFloat {
    0%,100%{transform:translate(0,0)scale(1)}
    50%{transform:translate(40px,-30px)scale(1.1)}
}

.pd-hero-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(0,102,255,0.04) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0,102,255,0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at 50% 40%, black 35%, transparent 70%);
}

/* Code rain effect */
.pd-code-rain {
    position: absolute; inset: 0; opacity: 0.03; overflow: hidden;
}
.pd-code-rain::before {
    content: '{ } ( ) => [ ] .then( ) async await function class interface';
    position: absolute; font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem; color: #0066ff;
    writing-mode: vertical-lr; animation: codeRain 8s linear infinite;
}
@keyframes codeRain {
    0%{transform:translateY(-100%)}
    100%{transform:translateY(100%)}
}

.pd-hero-content {
    position: relative; z-index: 1; text-align: center; max-width: 850px; margin: 0 auto;
}
.pd-hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 20px; background: #fff; border: 1px solid #e2e8f0;
    border-radius: 50px; margin-bottom: 24px;
    font-size: 0.8rem; font-weight: 600; color: #339966;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    animation: pdfadeUp 0.6s ease both;
}
[data-theme="dark"] .pd-hero-badge { background: #1a1a2e; border-color: #2a2a4a; }

.badge-pulse {
    width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
    animation: pdPulse 2s infinite;
}
@keyframes pdPulse {
    0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,0.4)}
    50%{box-shadow:0 0 0 12px rgba(34,197,94,0)}
}

.pd-hero-content h1 {
    font-size: 3.5rem; font-weight: 900; line-height: 1.12;
    color: #0f172a; margin-bottom: 18px; letter-spacing: -1.5px;
    animation: pdfadeUp 0.6s ease 0.1s both;
}
[data-theme="dark"] .pd-hero-content h1 { color: #f1f5f9; }

.pd-gradient {
    background: linear-gradient(90deg, #339966, #0066ff, #8b5cf6, #339966);
    background-size: 300% 100%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pdGradientFlow 3s ease infinite;
}
@keyframes pdGradientFlow {
    0%,100%{background-position:0% 50%}
    50%{background-position:100% 50%}
}

.pd-hero-content p {
    font-size: 1.1rem; color: #64748b; line-height: 1.7;
    max-width: 600px; margin: 0 auto 30px;
    animation: pdfadeUp 0.6s ease 0.2s both;
}
[data-theme="dark"] .pd-hero-content p { color: #94a3b8; }

.pd-hero-actions {
    display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
    animation: pdfadeUp 0.6s ease 0.3s both;
}

.pd-btn-primary {
    padding: 16px 32px; background: #339966; color: #fff;
    border-radius: 14px; text-decoration: none; font-weight: 700;
    display: inline-flex; align-items: center; gap: 10px;
    transition: all 0.3s; box-shadow: 0 8px 30px rgba(51,153,102,0.25);
}
.pd-btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(51,153,102,0.4); }

.pd-btn-outline {
    padding: 16px 30px; background: #fff; color: #339966;
    border: 2px solid #e2e8f0; border-radius: 14px;
    text-decoration: none; font-weight: 600;
    display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s;
}
[data-theme="dark"] .pd-btn-outline { background: #1a1a2e; border-color: #2a2a4a; color: #34d399; }
.pd-btn-outline:hover { border-color: #339966; }

.pd-hero-stats {
    display: flex; gap: 30px; justify-content: center; margin-top: 40px;
    animation: pdfadeUp 0.6s ease 0.4s both;
}
.pd-stat { text-align: center; }
.pd-stat-icon { font-size: 1.5rem; margin-bottom: 4px; }
.pd-stat-val { font-size: 1.6rem; font-weight: 800; color: #339966; }
.pd-stat-lbl { font-size: 0.75rem; color: #94a3b8; font-weight: 500; }

@keyframes pdfadeUp {
    from{opacity:0;transform:translateY(25px)}
    to{opacity:1;transform:translateY(0)}
}

/* ===== Sections Common ===== */
.pd-services, .pd-tech, .pd-process, .pd-benefits, .pd-cta { padding: 100px 0; }
.pd-services, .pd-process { background: #fff; }
[data-theme="dark"] .pd-services, [data-theme="dark"] .pd-process { background: #0a0a1a; }
.pd-tech, .pd-benefits { background: #f8fafc; }
[data-theme="dark"] .pd-tech, [data-theme="dark"] .pd-benefits { background: #0e0e22; }

.pd-section-header { text-align: center; margin-bottom: 60px; }

.pd-chip {
    display: inline-block; padding: 8px 18px;
    background: rgba(51,153,102,0.06); border: 1px solid rgba(51,153,102,0.12);
    border-radius: 50px; font-size: 0.78rem; font-weight: 700;
    color: #339966; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 18px;
}
.pd-section-header h2 { font-size: 2.6rem; font-weight: 800; color: #0f172a; margin-bottom: 10px; }
[data-theme="dark"] .pd-section-header h2 { color: #e8e8f0; }
.pd-section-header h2 .highlight { color: #339966; }
.pd-section-header p { color: #888; font-size: 1rem; }

/* ===== Services Showcase ===== */
.pd-services-showcase { display: flex; flex-direction: column; gap: 80px; }

.pd-service-block {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.pd-service-block.reverse { direction: rtl; }
.pd-service-block.reverse .pd-service-info { direction: ltr; }

.pd-service-visual { position: relative; display: flex; justify-content: center; }

/* Desktop Mockup */
.pd-desktop-mockup {
    width: 100%; max-width: 460px; background: #fff;
    border-radius: 14px; overflow: hidden;
    border: 1px solid #e2e8f0; box-shadow: 0 20px 60px rgba(0,0,0,0.06);
    animation: pdFloat 5s ease-in-out infinite;
}
[data-theme="dark"] .pd-desktop-mockup { background: #1a1a30; border-color: #2a2a4a; }
@keyframes pdFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

.desktop-titlebar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; background: #1e293b; color: #fff; font-size: 0.78rem;
}
.desktop-logo { font-size: 1rem; }
.desktop-title { flex: 1; font-weight: 600; }
.desktop-controls { display: flex; gap: 6px; }
.desk-ctrl {
    width: 22px; height: 22px; border-radius: 4px; display: flex;
    align-items: center; justify-content: center; font-size: 0.7rem; cursor: default;
}
.desk-ctrl.min{background:#f59e0b}.desk-ctrl.max{background:#22c55e}.desk-ctrl.close{background:#ef4444}

.desktop-toolbar {
    display: flex; gap: 0; padding: 0 10px; background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}
[data-theme="dark"] .desktop-toolbar { background: #1e293b; border-color: #334155; }
.toolbar-item {
    padding: 8px 14px; font-size: 0.72rem; color: #64748b; font-weight: 500;
    border-bottom: 2px solid transparent; transition: all 0.2s;
}
.toolbar-item.active { color: #339966; border-bottom-color: #339966; }

.desktop-content { display: flex; min-height: 200px; }
.desktop-sidebar {
    width: 45px; background: #f8fafc; padding: 10px 8px;
    display: flex; flex-direction: column; gap: 6px; border-right: 1px solid #e2e8f0;
}
.d-sidebar-item { height: 8px; background: #e2e8f0; border-radius: 4px; }
.d-sidebar-item.active { background: #339966; }
.desktop-main { flex: 1; padding: 12px; display: flex; flex-direction: column; }
.d-data-grid { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.d-data-row { display: flex; gap: 6px; }
.d-data-row.header .d-cell { background: #e2e8f0; height: 8px; border-radius: 3px; flex: 1; }
.d-data-row .d-cell { background: #f1f5f9; height: 10px; border-radius: 3px; flex: 1; }
.d-statusbar {
    display: flex; justify-content: space-between;
    padding: 6px 0 0; border-top: 1px solid #e2e8f0;
    font-size: 0.6rem; color: #94a3b8;
}

/* Cloud Mockup */
.pd-cloud-mockup {
    width: 100%; max-width: 420px; background: #fff;
    border-radius: 16px; overflow: hidden;
    border: 1px solid #e2e8f0; box-shadow: 0 20px 60px rgba(0,0,0,0.06);
    animation: pdFloat 5s ease-in-out infinite 1s;
}
[data-theme="dark"] .pd-cloud-mockup { background: #1a1a30; border-color: #2a2a4a; }
.cloud-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; background: #f1f5f9; border-bottom: 1px solid #e2e8f0;
    font-weight: 600; font-size: 0.85rem; color: #0f172a;
}
.cloud-status.online { color: #22c55e; font-size: 0.72rem; }
.cloud-servers { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cloud-server {
    display: flex; align-items: center; gap: 10px; padding: 10px;
    background: #f8fafc; border-radius: 10px;
}
.server-icon { font-size: 1.3rem; }
.server-info { flex: 1; }
.server-name { font-size: 0.78rem; font-weight: 600; color: #0f172a; margin-bottom: 4px; }
.server-bar { height: 4px; background: #e2e8f0; border-radius: 2px; }
.server-fill { height: 100%; background: #339966; border-radius: 2px; }
.server-status { font-size: 0.65rem; font-weight: 700; }
.server-status.up { color: #22c55e; }

/* API Mockup */
.pd-api-mockup {
    width: 100%; max-width: 440px; background: #1e293b;
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: pdFloat 5s ease-in-out infinite 2s;
}
.api-header {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; background: #0f172a;
    font-family: 'JetBrains Mono', monospace; font-size: 0.75rem;
}
.api-method { padding: 4px 8px; border-radius: 4px; font-weight: 700; }
.api-method.get { background: rgba(34,197,94,0.2); color: #22c55e; }
.api-endpoint { color: #e2e8f0; flex: 1; }
.api-status { color: #22c55e; }
.api-body { padding: 16px; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; line-height: 1.8; }
.api-code { margin-bottom: 10px; }
.api-line { color: #94a3b8; }
.api-line.indent { padding-left: 16px; }
.api-line.indent2 { padding-left: 32px; }
.api-key { color: #60a5fa; }
.api-string { color: #34d399; }
.api-num { color: #f59e0b; }
.api-response-time { color: #94a3b8; font-size: 0.68rem; padding-top: 8px; border-top: 1px solid #334155; }

/* Database Mockup */
.pd-database-mockup {
    width: 100%; max-width: 500px; background: #fff;
    border-radius: 16px; overflow: hidden;
    border: 1px solid #e2e8f0; box-shadow: 0 20px 60px rgba(0,0,0,0.06);
    animation: pdFloat 5s ease-in-out infinite 0.5s;
}
[data-theme="dark"] .pd-database-mockup { background: #1a1a30; border-color: #2a2a4a; }
.db-header {
    padding: 14px 16px; background: #f1f5f9; border-bottom: 1px solid #e2e8f0;
    font-weight: 600; font-size: 0.85rem; color: #0f172a;
}
.db-diagram {
    display: flex; align-items: center; gap: 8px; padding: 16px;
    overflow-x: auto;
}
.db-table {
    background: #f8fafc; border-radius: 8px; overflow: hidden;
    border: 1px solid #e2e8f0; min-width: 90px;
}
.db-table-header {
    padding: 8px 10px; background: #339966; color: #fff;
    font-size: 0.65rem; font-weight: 700; text-align: center;
}
.db-table-row {
    padding: 5px 10px; font-size: 0.6rem; color: #64748b;
    border-bottom: 1px solid #f1f5f9;
}
.db-relation { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.db-rel-line { width: 20px; height: 1px; background: #94a3b8; }
.db-relation span { font-size: 0.6rem; color: #94a3b8; }

/* Floating Tags */
.pd-float-tag {
    position: absolute; padding: 8px 16px; background: #fff;
    border-radius: 10px; font-size: 0.72rem; font-weight: 700;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06); animation: pdTagFloat 3s ease-in-out infinite;
}
[data-theme="dark"] .pd-float-tag { background: #1e293b; color: #e0e0e0; }
.pd-float-tag.tag-top { top: -10px; right: -10px; color: #339966; }
.pd-float-tag.tag-bottom { bottom: -10px; left: -10px; color: #0066ff; animation-delay: 1.5s; }
.pd-float-tag.green-tag { color: #339966; }
.pd-float-tag.purple-tag { color: #8b5cf6; }
@keyframes pdTagFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

/* Service Info */
.pd-service-icon {
    width: 56px; height: 56px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 16px;
}
.icon-blue{background:rgba(0,102,255,0.08);color:#0066ff}
.icon-green{background:rgba(51,153,102,0.08);color:#339966}
.icon-purple{background:rgba(139,92,246,0.08);color:#8b5cf6}
.icon-orange{background:rgba(245,158,11,0.08);color:#f59e0b}

.pd-service-info h3 { font-size: 1.4rem; font-weight: 800; color: #0f172a; margin-bottom: 10px; }
[data-theme="dark"] .pd-service-info h3 { color: #e0e0e0; }
.pd-service-info p { font-size: 0.95rem; color: #64748b; line-height: 1.7; margin-bottom: 16px; }
[data-theme="dark"] .pd-service-info p { color: #94a3b8; }

.pd-feature-list { list-style: none; padding: 0; }
.pd-feature-list li {
    font-size: 0.88rem; color: #475569; padding: 6px 0;
    display: flex; align-items: flex-start; gap: 10px;
}
[data-theme="dark"] .pd-feature-list li { color: #94a3b8; }
.pd-feature-list li i { color: #22c55e; margin-top: 3px; font-size: 0.75rem; }

/* ===== Tech Showcase ===== */
.pd-tech-showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.pd-tech-category {
    background: #fff; border-radius: 20px; padding: 35px 24px;
    text-align: center; border: 1px solid #e2e8f0; transition: all 0.3s;
}
[data-theme="dark"] .pd-tech-category { background: #1a1a30; border-color: #2a2a4a; }
.pd-tech-category:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.06); }

.pd-tech-icon-wrap {
    width: 60px; height: 60px; border-radius: 50%;
    background: rgba(51,153,102,0.06); color: #339966;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin: 0 auto 16px;
}
.pd-tech-category h4 { font-size: 1.1rem; font-weight: 700; color: #0f172a; margin-bottom: 20px; }

.pd-tech-orbit { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tech-bubble {
    padding: 8px 16px; background: #f1f5f9; border-radius: 20px;
    font-size: 0.8rem; font-weight: 600; color: #475569;
    transition: all 0.3s; animation: pdBubbleFloat 3s ease infinite;
    animation-delay: calc(var(--i) * 0.3s);
}
[data-theme="dark"] .tech-bubble { background: #0f0f23; color: #94a3b8; }
.tech-bubble:hover { background: #339966; color: #fff; transform: scale(1.05); }
@keyframes pdBubbleFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }

/* ===== Process ===== */
.pd-process-flow {
    display: flex; align-items: flex-start; justify-content: center;
    gap: 0; max-width: 1000px; margin: 0 auto; flex-wrap: wrap;
}
.pd-process-card {
    text-align: center; width: 180px; padding: 25px 15px;
    background: #fff; border-radius: 20px; border: 1px solid #e2e8f0;
    transition: all 0.3s; position: relative;
}
[data-theme="dark"] .pd-process-card { background: #1a1a30; border-color: #2a2a4a; }
.pd-process-card:hover { transform: translateY(-8px); box-shadow: 0 15px 40px rgba(0,0,0,0.06); }

.pd-process-num {
    font-size: 2.5rem; font-weight: 900; color: rgba(51,153,102,0.08);
    position: absolute; top: 10px; left: 15px; line-height: 1;
}
.pd-process-icon-wrap {
    width: 50px; height: 50px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; margin: 0 auto 12px;
}
.pp-blue{background:rgba(0,102,255,0.1);color:#0066ff}
.pp-green{background:rgba(51,153,102,0.1);color:#339966}
.pp-purple{background:rgba(139,92,246,0.1);color:#8b5cf6}
.pp-orange{background:rgba(245,158,11,0.1);color:#f59e0b}

.pd-process-card h4 { font-size: 1rem; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.pd-process-card p { font-size: 0.8rem; color: #64748b; line-height: 1.5; margin-bottom: 8px; }
.pd-process-tag {
    font-size: 0.65rem; padding: 4px 10px; background: #f1f5f9;
    border-radius: 6px; color: #339966; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
}
.pd-process-connector { display: flex; flex-direction: column; align-items: center; padding: 0 10px; margin-top: 50px; }
.pdc-line { width: 40px; height: 2px; background: linear-gradient(90deg, #339966, #0066ff); opacity: 0.3; }
.pdc-arrow { color: #339966; font-size: 0.7rem; margin-top: 2px; }

/* ===== Benefits ===== */
.pd-benefits-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.pd-benefit-card {
    background: #fff; border-radius: 18px; padding: 30px 24px;
    text-align: center; border: 1px solid #e2e8f0;
    transition: all 0.3s;
}
[data-theme="dark"] .pd-benefit-card { background: #1a1a30; border-color: #2a2a4a; }
.pd-benefit-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,0.06); }

.pd-benefit-icon {
    width: 55px; height: 55px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin: 0 auto 14px;
}
.b-blue{background:rgba(0,102,255,0.08);color:#0066ff}
.b-green{background:rgba(51,153,102,0.08);color:#339966}
.b-purple{background:rgba(139,92,246,0.08);color:#8b5cf6}
.b-orange{background:rgba(245,158,11,0.08);color:#f59e0b}
.b-teal{background:rgba(20,184,166,0.08);color:#14b8a6}
.b-rose{background:rgba(244,63,94,0.08);color:#f43f5e}

.pd-benefit-card h4 { font-size: 1.05rem; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.pd-benefit-card p { font-size: 0.85rem; color: #64748b; line-height: 1.6; }

/* ===== CTA ===== */
.pd-cta-wrapper {
    background: linear-gradient(135deg, #339966, #267d52);
    border-radius: 28px; padding: 60px 40px; text-align: center;
    color: #fff; position: relative; overflow: hidden;
}
.pd-cta-glow {
    position: absolute; width: 300px; height: 300px;
    background: rgba(255,255,255,0.05); border-radius: 50%;
    top: -50px; right: -50px; filter: blur(50px);
}
.pd-cta-wrapper h2 { font-size: 2.4rem; font-weight: 800; margin-bottom: 10px; position: relative; }
.pd-cta-wrapper p { font-size: 1rem; opacity: 0.9; margin-bottom: 28px; position: relative; }
.pd-cta-wrapper .pd-gradient {
    background: linear-gradient(90deg, #fff, #cbd5e1);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.pd-cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }
.pd-btn-white {
    padding: 16px 30px; background: #fff; color: #339966;
    border-radius: 14px; text-decoration: none; font-weight: 700;
    display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s;
}
.pd-btn-white:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .pd-service-block, .pd-service-block.reverse { grid-template-columns: 1fr; direction: ltr; gap: 40px; }
    .pd-service-visual { order: -1; max-width: 400px; margin: 0 auto; }
    .pd-tech-showcase { grid-template-columns: repeat(2, 1fr); }
    .pd-benefits-grid { grid-template-columns: repeat(2, 1fr); }
    .pd-hero-content h1 { font-size: 2.6rem; }
}

@media (max-width: 768px) {
    .pd-hero-content h1 { font-size: 2rem; }
    .pd-tech-showcase, .pd-benefits-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .pd-process-flow { flex-direction: column; align-items: center; gap: 20px; }
    .pd-process-card { width: 100%; max-width: 280px; }
    .pd-process-connector { display: none; }
    .pd-hero-stats { gap: 20px; flex-wrap: wrap; }
    .pd-float-tag { display: none; }
    .pd-section-header h2 { font-size: 2rem; }
    .pd-cta-wrapper { padding: 40px 20px; }
    .pd-cta-wrapper h2 { font-size: 1.6rem; }
    .db-diagram { flex-direction: column; align-items: center; }
    .db-relation { transform: rotate(90deg); }
}

@media (max-width: 480px) {
    .pd-hero-content h1 { font-size: 1.7rem; }
    .pd-hero-actions { flex-direction: column; align-items: center; }
    .pd-btn-primary, .pd-btn-outline { width: 100%; justify-content: center; }
}