/* ============================================
   SERVICES.CSS - VALORA INC
   FIXED: Mobile scrolling issue resolved
   ============================================ */

/* --- GLOBAL VARS --- */
:root {
    --primary: #111827;
    --accent: #2563EB;
    --bg-light: #F8FAFC;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --valora-primary: #4F46E5;
    --valora-secondary: #06B6D4;
}

body {
    background-color: #ffffff;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

* {
    max-width: 100%;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 { 
    letter-spacing: -0.03em;
}

/* --- HERO SECTION --- */
.hero-section {
    padding: 10rem 1.5rem 4rem;
    background: var(--bg-light);
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

@media (min-width: 768px) {
    .hero-section {
        padding: 12rem 2rem 6rem;
    }
}

/* Animated badge iznad naslova */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border: 1px solid rgba(79, 70, 229, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--valora-primary);
    margin-bottom: 1.5rem;
    animation: badge-float 3s ease-in-out infinite;
    position: relative;
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.15);
}

@keyframes badge-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.hero-badge i {
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.hero-badge::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, 
        rgba(79, 70, 229, 0.3), 
        rgba(6, 182, 212, 0.3)
    );
    border-radius: 2rem;
    z-index: -1;
    opacity: 0.5;
    filter: blur(8px);
    animation: badgeGlow 3s ease-in-out infinite;
}

@keyframes badgeGlow {
    0%, 100% { opacity: 0.3; transform: scale(0.95); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    animation: scrollPulse 2s ease-in-out infinite;
}

@media (max-width: 768px) {
    .scroll-indicator {
        display: none;
    }
}

@keyframes scrollPulse {
    0%, 100% { 
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    50% { 
        transform: translateX(-50%) translateY(10px);
        opacity: 0.7;
    }
}

.scroll-indicator i {
    font-size: 1.5rem;
}

/* ============================================
   MOBILNI SERVICE FILTER - FIXED VERSION
   ============================================ */

.mobile-service-filter {
    display: block !important;
    position: sticky;
    top: 70px;
    z-index: 40;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 0;
    margin: 0;
    width: 100%;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 0 0 1px rgba(79, 70, 229, 0.05);
}

@media (min-width: 1024px) {
    .mobile-service-filter {
        display: none !important;
    }
}

.mobile-filter-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    padding: 0 1rem;
    /* FIXED: Allow vertical page scrolling */
    touch-action: pan-y;
}

.mobile-filter-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 0;
    /* FIXED: Only allow horizontal scrolling in filter */
    touch-action: pan-x;
}

.mobile-filter-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-filter-item {
    flex: 0 0 auto;
    padding: 0.625rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

.mobile-filter-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(79, 70, 229, 0.05) 0%, 
        rgba(6, 182, 212, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-filter-item:hover::before {
    opacity: 1;
}

.mobile-filter-item:active {
    transform: scale(0.95);
}

.mobile-filter-item.active {
    background: linear-gradient(135deg, 
        var(--valora-primary) 0%, 
        #6366F1 100%
    );
    border-color: var(--valora-primary);
    color: white;
    box-shadow: 
        0 4px 12px rgba(79, 70, 229, 0.4),
        0 0 20px rgba(79, 70, 229, 0.2);
}

/* Scroll indicators */
.filter-scroll-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.filter-scroll-indicator.visible {
    opacity: 1;
    pointer-events: auto;
}

.filter-scroll-indicator:active {
    transform: translateY(-50%) scale(0.9);
    background: #f8fafc;
}

.filter-scroll-left {
    left: 0.5rem;
}

.filter-scroll-right {
    right: 0.5rem;
}

.filter-scroll-indicator i {
    color: var(--valora-primary);
    font-size: 0.875rem;
}

/* --- SERVICES LAYOUT --- */
.services-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1rem;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .services-layout {
        grid-template-columns: 280px 1fr;
        gap: 4rem;
        padding: 6rem 2rem;
    }
}

/* --- STICKY NAV (SIDEBAR) --- */
.sticky-nav {
    display: none;
}

@media (min-width: 1024px) {
    .sticky-nav {
        display: block;
        position: sticky;
        top: 140px;
        height: max-content;
        padding-right: 2rem;
        border-right: 1px solid #e2e8f0;
    }
}

.nav-link-item {
    display: block;
    padding: 1rem 0;
    color: var(--text-muted);
    font-weight: 600;
    transition: all 0.3s;
    border-right: 3px solid transparent;
    margin-right: -2px;
    text-decoration: none;
}

.nav-link-item:hover { 
    color: var(--valora-primary);
    text-shadow: 0 0 12px rgba(79, 70, 229, 0.3);
    transform: translateX(5px);
}

.nav-link-item.active {
    color: var(--accent);
    border-right-color: var(--accent);
    text-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

/* --- SERVICE CARDS --- */
.content-col {
    width: 100%;
    box-sizing: border-box;
}

.service-block {
    margin-bottom: 3rem;
    scroll-margin-top: 180px;
}

@media (min-width: 768px) {
    .service-block {
        margin-bottom: 6rem;
        scroll-margin-top: 140px;
    }
}

.service-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    overflow: visible;
    display: grid;
    grid-template-columns: 1fr;
    transition: all 0.3s;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

@media (min-width: 768px) { 
    .service-card { 
        grid-template-columns: 1fr 1fr; 
    } 
}

.service-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1.5rem;
    padding: 2px;
    background: linear-gradient(135deg, 
        rgba(79, 70, 229, 0) 0%, 
        rgba(79, 70, 229, 0.3) 50%, 
        rgba(6, 182, 212, 0.3) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        background: linear-gradient(135deg, 
            rgba(79, 70, 229, 0.4) 0%, 
            rgba(6, 182, 212, 0.4) 50%, 
            rgba(79, 70, 229, 0.4) 100%
        );
    }
    50% {
        background: linear-gradient(135deg, 
            rgba(6, 182, 212, 0.6) 0%, 
            rgba(79, 70, 229, 0.6) 50%, 
            rgba(6, 182, 212, 0.6) 100%
        );
    }
}

.service-card:hover {
    box-shadow: 
        0 0 0 1px rgba(79, 70, 229, 0.1),
        0 10px 40px -10px rgba(79, 70, 229, 0.3),
        0 0 60px -20px rgba(6, 182, 212, 0.2);
    transform: translateY(-5px);
    border-color: var(--accent);
}

.card-content { 
    padding: 2rem;
    display: flex; 
    flex-direction: column; 
    justify-content: center;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .card-content {
        padding: 3rem;
    }
}

/* Shimmer effect for badges */
.service-card .card-content > span:first-child {
    position: relative;
    overflow: hidden;
}

.service-card .card-content > span:first-child::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.card-image {
    background: var(--bg-light);
    min-height: 250px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

@media (min-width: 768px) {
    .card-image {
        min-height: 300px;
    }
}

.card-image img {
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    transition: transform 0.5s;
}

.card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(79, 70, 229, 0.1) 0%, 
        rgba(6, 182, 212, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.5s;
}

.service-card:hover .card-image img { 
    transform: scale(1.05); 
}

.service-card:hover .card-image::after {
    opacity: 1;
}

/* --- FEATURES GRID --- */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

.feature-item { 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    font-size: 0.95rem; 
    font-weight: 500;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(5px);
    color: var(--valora-primary);
}

.feature-item:hover .feature-icon {
    transform: scale(1.2) rotate(360deg);
    transition: transform 0.6s ease;
}

.feature-icon { 
    color: var(--accent); 
    flex-shrink: 0;
}

/* --- PROCESS STEPS --- */
.steps-wrapper {
    background: var(--primary);
    color: white;
    padding: 4rem 1rem;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .steps-wrapper {
        padding: 6rem 2rem;
    }
}

.step-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 1rem;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.step-number { 
    font-size: 3rem;
    font-weight: 900; 
    color: rgba(255,255,255,0.1); 
    line-height: 1; 
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .step-number {
        font-size: 4rem;
    }
}

.step-card:hover .step-number {
    color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    transition: all 0.4s;
}

/* --- FAQ SECTION --- */
.faq-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 1rem;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .faq-section {
        padding: 6rem 2rem;
    }
}

.faq-header-title {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-header-title h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
}

@media (min-width: 768px) {
    .faq-header-title h2 {
        font-size: 3rem;
    }
}

.faq-header-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.faq-list {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
}

.faq-item { 
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item:hover {
    background: linear-gradient(135deg, 
        rgba(79, 70, 229, 0.02) 0%, 
        rgba(6, 182, 212, 0.02) 100%
    );
    border-left: 3px solid var(--valora-primary);
    padding-left: 1rem;
}

.faq-item.active {
    background: linear-gradient(135deg, 
        rgba(79, 70, 229, 0.05) 0%, 
        rgba(6, 182, 212, 0.05) 100%
    );
}

.faq-question {
    padding: 1.25rem 1rem;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    cursor: pointer; 
    font-weight: 700; 
    font-size: 1rem;
    transition: background 0.2s;
    user-select: none;
}

@media (min-width: 768px) {
    .faq-question {
        padding: 1.5rem 2rem;
        font-size: 1.1rem;
    }
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-answer { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.4s ease, padding 0.4s ease;
    color: var(--text-muted);
    padding: 0 1rem;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .faq-answer {
        padding: 0 2rem;
    }
}

.faq-icon { 
    transition: transform 0.3s;
    color: var(--accent);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.faq-item.active .faq-icon { 
    transform: rotate(180deg); 
}

.faq-item.active .faq-answer { 
    max-height: 500px;
    padding-top: 0;
    padding-bottom: 1.5rem;
}

/* --- CTA BOX --- */
.cta-box {
    background: linear-gradient(135deg, 
        var(--accent) 0%, 
        #6366F1 50%,
        var(--valora-primary) 100%
    );
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    color: white;
    border-radius: 1.5rem;
    padding: 3rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@media (min-width: 768px) {
    .cta-box {
        border-radius: 2rem;
        padding: 4rem 2rem;
    }
}

.cta-pattern {
    position: absolute; 
    inset: 0; 
    opacity: 0.1;
    background-image: radial-gradient(white 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ============================================
   FAB BUTTONS (Floating Action Buttons)
   ============================================ */
.fab-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .fab-container {
        bottom: 2rem;
        right: 2rem;
        gap: 1rem;
    }
}

.fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
}

@media (min-width: 768px) {
    .fab-btn {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }
}

.fab-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.3) 0%, 
        transparent 70%
    );
    transform: scale(0);
    opacity: 0;
    transition: all 0.5s;
}

.fab-btn:active::before {
    transform: scale(2);
    opacity: 1;
    transition: 0s;
}

.fab-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.fab-btn:active {
    transform: scale(0.95);
}

/* WhatsApp - Zelena */
.fab-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.fab-whatsapp:hover {
    background: linear-gradient(135deg, #1ebe57 0%, #0e6b5f 100%);
    box-shadow: 
        0 6px 20px rgba(37, 211, 102, 0.4),
        0 0 30px rgba(37, 211, 102, 0.3);
}

/* Phone - Plava (Valora boja) */
.fab-phone {
    background: linear-gradient(135deg, var(--valora-primary) 0%, var(--accent) 100%);
    animation: fab-pulse 2s infinite;
}

.fab-phone:hover {
    background: linear-gradient(135deg, #4338ca 0%, #1d4ed8 100%);
    box-shadow: 
        0 6px 20px rgba(79, 70, 229, 0.4),
        0 0 30px rgba(79, 70, 229, 0.3);
}

@keyframes fab-pulse {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4), 0 0 0 8px rgba(79, 70, 229, 0.1);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Tooltip - hidden */
.fab-tooltip {
    display: none !important;
}

/* --- ANIMATIONS --- */
.reveal { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: all 0.6s ease;
}

.reveal.visible { 
    opacity: 1; 
    transform: translateY(0);
}

/* --- MAINTENANCE CARD SPECIAL GLOW --- */
#maintenance .bg-slate-900 {
    position: relative;
    overflow: hidden;
}

#maintenance .bg-slate-900::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(79, 70, 229, 0.1) 0%, 
        transparent 50%
    );
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- RESPONSIVE FIXES --- */
@media (max-width: 768px) {
    .service-card::before {
        display: none;
    }
    
    .service-card:hover {
        box-shadow: 0 15px 40px -15px rgba(79, 70, 229, 0.3);
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero-section {
        padding-top: 8rem;
    }
}

@media (max-width: 640px) {
    .mobile-filter-item {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }
}

/* --- SMOOTH SCROLLBAR (Chrome/Safari) --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        var(--valora-primary), 
        var(--valora-secondary)
    );
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        #4338ca, 
        #0891b2
    );
}

/* Dodatna sigurnost protiv horizontal scrolla */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* FIXED: iOS bounce scroll prevention */
body {
    overscroll-behavior-y: contain;
}

.mobile-filter-scroll {
    overscroll-behavior-x: contain;
}

/* ===============================
   MOBILE FILTER – CLICK FIX
   =============================== */

.mobile-service-filter {
    isolation: isolate;
}

.mobile-filter-scroll {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.mobile-filter-item {
    position: relative;
    z-index: 2;
    pointer-events: auto;
    touch-action: manipulation;
}

.filter-scroll-indicator {
    z-index: 1;
}
