/* Request/Pasugo Page Styles */

/* SIMPLE FIX: Hide step numbers that escape their container */
.step-number:not(.how-it-works .step-number) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: fixed !important;
    top: -9999px !important;
    left: -9999px !important;
}

/* Additional nuclear option - hide any floating numbers */
*:not(.how-it-works) .step-number {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Ensure proper containment in How It Works section */
.how-it-works {
    position: relative;
    overflow: hidden;
}

.how-it-works .step-item {
    position: relative;
}

.how-it-works .step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
}

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --border-light: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Request Hero Section */
.request-hero {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 25%, #0e7490 50%, #155e75 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.request-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.15)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 24px;
    font-weight: 500;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.title-line {
    display: block;
}

.title-line.highlight {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Services Section */
.services-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Services Grid - Desktop 3x3, Mobile Single Column */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.service-option {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    border: 3px solid #3b82f6;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.service-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.service-option:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
    border-width: 4px;
}

.service-option:hover::before {
    opacity: 0.1;
}

.service-option > * {
    position: relative;
    z-index: 2;
}

.service-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.service-option:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-option h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.service-option p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.service-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.service-meta i {
    font-size: 0.75rem;
}

/* Service Benefits */
.service-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 80px;
    padding: 0 20px;
}

.benefit-item {
    text-align: center;
    background: var(--bg-card);
    padding: 40px 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.benefit-icon {
    width: 72px;
    height: 72px;
    background: var(--gradient-secondary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.75rem;
}

.benefit-item h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.benefit-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0;
    background: var(--bg-card);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-top: 60px;
    padding: 0 20px;
}

.step-card {
    text-align: center;
    padding: 40px 24px;
    background: var(--bg-light);
    border-radius: 16px;
    border: 3px solid #3b82f6;
    transition: all 0.3s ease;
    position: relative;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    border-width: 4px;
}

.step-item {
    position: relative !important; /* Force relative positioning for step container */
}

.step-number {
    position: absolute !important;
    top: -15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    background: var(--primary-color) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 1.125rem !important;
    box-shadow: var(--shadow-md) !important;
    z-index: 1 !important; /* Keep below navigation which should be higher */
}

.step-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    color: white;
    font-size: 1.5rem;
}

.step-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.step-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .request-hero {
        padding: 100px 0 60px;
        margin-top: 70px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .services-section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Mobile Single Column Layout */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 16px;
    }
    
    .service-option {
        padding: 28px 20px;
    }
    
    .service-option h3 {
        font-size: 1.125rem;
    }
    
    .service-meta {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .service-benefits {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 60px;
        padding: 0 16px;
    }
    
    .benefit-item {
        padding: 32px 20px;
    }
    
    .how-it-works {
        padding: 60px 0;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 40px;
        padding: 0 16px;
    }
    
    .step-card {
        padding: 32px 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .service-option {
        padding: 24px 16px;
    }
    
    .service-icon {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }
    
    .benefit-icon {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }
    
    .step-icon {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }
}

/* Service Selection Animations */
.service-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.1));
    transform: translateY(-4px);
}

.service-option.selected .service-icon {
    background: var(--primary-color);
    transform: scale(1.05);
}

/* Loading States */
.service-option.loading {
    pointer-events: none;
    opacity: 0.7;
}

.service-option.loading .service-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Accessibility */
.service-option:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.service-option:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-option {
        border: 2px solid var(--text-primary);
    }
    
    .service-option:hover {
        border-color: var(--primary-color);
        background: var(--primary-color);
        color: white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .service-option,
    .service-icon,
    .hero-badge,
    .hero-title,
    .hero-subtitle {
        animation: none;
        transition: none;
    }
    
    .service-option:hover {
        transform: none;
    }
}

/* DEBUG PANEL STYLES - TEMPORARY */
.debug-panel {
    position: fixed !important;
    top: 10px !important;
    right: 10px !important;
    background: rgba(0,0,0,0.9) !important;
    color: white !important;
    padding: 20px !important;
    border-radius: 8px !important;
    z-index: 99999 !important;
    font-family: monospace !important;
    font-size: 12px !important;
    max-width: 300px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
}

.debug-panel h3 {
    margin: 0 0 10px 0 !important;
    color: #ff6b6b !important;
}

.debug-panel button {
    background: #4ecdc4 !important;
    color: white !important;
    border: none !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    margin-bottom: 10px !important;
    cursor: pointer !important;
    margin-right: 5px !important;
}

.debug-panel button:hover {
    opacity: 0.8 !important;
}

.close-debug {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    background: none !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
}

#debug-results {
    margin-top: 10px !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

/* ===== EMERGENCY FIX FOR FLOATING STEP NUMBER 4 ===== */
/* This MUST stay at the bottom to override all other styles */

/* Force proper containment for the entire How It Works section */
.how-it-works .steps-grid {
    position: relative !important;
    z-index: 1 !important;
    isolation: isolate !important;
    contain: layout !important;
}

/* Ultra-specific selector to force step items to contain their children */
.how-it-works .steps-grid .step-item {
    position: relative !important;
    z-index: 1 !important;
    isolation: isolate !important;
    contain: layout !important;
    overflow: visible !important;
}

/* Nuclear option: Target the specific 4th step number */
.how-it-works .steps-grid .step-item:nth-child(4) .step-number {
    position: absolute !important;
    top: -15px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) translateY(0) !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2 !important;
    contain: strict !important;
    will-change: auto !important;
}

/* ULTRA-SPECIFIC OVERRIDE to defeat global styles.css step-number rule */
/* This targets the specific HTML structure in request_pasugo.html */
div.how-it-works div.steps-grid div.step-item div.step-number {
    position: absolute !important;
    top: -15px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) translateY(0) !important;
    width: 40px !important;
    height: 40px !important;
    background: var(--primary-color) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 1.125rem !important;
    box-shadow: var(--shadow-md) !important;
    z-index: 2 !important;
    margin: 0 !important;
    padding: 0 !important;
    contain: layout style !important;
    will-change: auto !important;
    /* Prevent any escaping */
    clip-path: circle(25px at center) !important;
}

/* Even MORE specific for the problematic 4th step */
div.how-it-works div.steps-grid div.step-item:nth-child(4) div.step-number {
    position: absolute !important;
    top: -15px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) translateY(0) !important;
    width: 40px !important;
    height: 40px !important;
    background: var(--primary-color) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 1.125rem !important;
    box-shadow: var(--shadow-md) !important;
    z-index: 2 !important;
    margin: 0 !important;
    padding: 0 !important;
    contain: strict !important;
    will-change: auto !important;
    clip-path: circle(25px at center) !important;
}

/* NUCLEAR SOLUTION: HIDE ANY STEP NUMBER THAT FLOATS TO TOP */
/* This will hide any step-number that appears in the top 100px of the page */
.step-number {
    /* First, ensure it's contained properly */
    position: absolute !important;
    top: -15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    background: var(--primary-color) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 1.125rem !important;
    box-shadow: var(--shadow-md) !important;
    z-index: 2 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Force step numbers to only appear within their proper containers */
.step-number:not(.how-it-works .step-number) {
    display: none !important;
}

/* If a step number somehow gets positioned at the top of the page, hide it */
@media screen {
    body > .step-number,
    header .step-number,
    nav .step-number,
    .navbar .step-number {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* Ensure navigation has higher z-index than any step numbers */
.header,
.navbar,
.nav-container,
.navbar-brand,
.nav-links {
    position: relative !important;
    z-index: 99999 !important;
}