/* ==========================================
   AUTOPURE INTERIOR SERVICE - ULTRA-PREMIUM DESIGN
   Automotive-Inspired Apple-Style Design
   ========================================== */

/* CSS Custom Properties - Premium Color Palette (Charcoal/Grey/Red) */
:root {
    /* Primary Colors - Elegant Charcoal & Grey */
    --primary-charcoal: #2D3748;
    --primary-slate: #4A5568;
    --secondary-grey: #718096;
    --light-grey: #A0AEC0;
    --very-light-grey: #E2E8F0;
    --background-grey: #F7FAFC;
    
    /* Accent Colors - Premium Red */
    --accent-red: #E53E3E;
    --accent-red-light: #FC8181;
    --accent-red-dark: #C53030;
    
    /* Chrome & Metal Effects */
    --chrome-silver: #E2E8F0;
    --chrome-light: #F7FAFC;
    --chrome-dark: #CBD5E0;
    
    /* Glass & Transparency */
    --glass-white: rgba(255, 255, 255, 0.15);
    --glass-grey: rgba(226, 232, 240, 0.2);
    --glass-charcoal: rgba(45, 55, 72, 0.1);
    
    /* Typography */
    --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-text: 'SF Pro Text', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    
    /* Spacing Scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    
    /* Shadows - Premium Depth */
    --shadow-sm: 0 2px 4px rgba(45, 55, 72, 0.1);
    --shadow-md: 0 4px 12px rgba(45, 55, 72, 0.15);
    --shadow-lg: 0 8px 24px rgba(45, 55, 72, 0.2);
    --shadow-xl: 0 16px 48px rgba(45, 55, 72, 0.25);
    
    /* Animation Curves - Apple-inspired */
    --ease-in-out-cubic: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-quart: cubic-bezier(0.5, 0, 0.75, 0);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Automotive Specific */
    --car-metallic: linear-gradient(135deg, #E2E8F0 0%, #CBD5E0 50%, #A0AEC0 100%);
    --automotive-shine: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
}

/* Remove default padding for full-screen experience */
.main-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* Service Detail Page Container */
.service-detail-page {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--background-grey) 0%, var(--very-light-grey) 100%);
    overflow-x: hidden;
    font-family: var(--font-text);
    padding-left: 250px; /* Account for sidebar */
}

.service-detail-page * {
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .service-detail-page {
        padding-left: 0;
    }
}

/* ==========================================
   ULTRA-PREMIUM ANIMATED BACKGROUND
   ========================================== */
.service-detail-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 80%, var(--glass-grey) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--glass-white) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, var(--glass-charcoal) 0%, transparent 50%);
    animation: meshShift 30s ease-in-out infinite;
}

@keyframes meshShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(2deg); }
}

/* ==========================================
   HERO SECTION PREMIUM
   ========================================== */
.service-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, 
        rgba(247, 250, 252, 0.9) 0%, 
        rgba(226, 232, 240, 0.8) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-grey);
    padding: var(--space-xl);
}

.service-hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: var(--car-metallic);
    border-radius: 50%;
    box-shadow: var(--shadow-xl);
    border: 4px solid var(--glass-white);
    backdrop-filter: blur(10px);
    z-index: -1;
}

.service-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary-charcoal) 0%, var(--accent-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
}

.service-intro {
    font-size: 1.25rem;
    color: var(--secondary-grey);
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: var(--space-xl);
    position: relative;
    z-index: 2;
}

/* ==========================================
   SERVICE CONTENT PREMIUM
   ========================================== */
.service-content {
    padding: var(--space-3xl) var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.service-description {
    margin-bottom: var(--space-3xl);
    text-align: center;
}

.service-description h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-charcoal);
    margin-bottom: var(--space-lg);
}

.service-description > p {
    font-size: 1.2rem;
    color: var(--secondary-grey);
    line-height: 1.6;
    margin-bottom: var(--space-2xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================
   PREMIUM FLIP CARDS - IMPROVED SPACING
   ========================================== */
.flip-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
    padding: var(--space-lg);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    justify-items: center;
}

.flip-card {
    background: transparent;
    width: 100%;
    max-width: 350px;
    height: 250px;
    perspective: 1000px;
    cursor: pointer;
    margin: var(--space-sm) 0;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: visible;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s var(--ease-out-quart);
    transform-style: preserve-3d;
    background: transparent;
    border-radius: var(--radius-lg);
    box-shadow: none;
    border: none;
    -webkit-transform-style: preserve-3d;
    will-change: transform;
    perspective: 1000px;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-grey);
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: none;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    will-change: transform;
}

.flip-card-front {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(247, 250, 252, 0.9) 100%);
    backdrop-filter: blur(10px);
    color: var(--primary-charcoal);
    transform: rotateY(0deg);
}

.flip-card-back {
    background: linear-gradient(135deg, 
        var(--primary-charcoal) 0%, 
        var(--primary-slate) 50%,
        var(--accent-red) 100%);
    color: white;
    transform: rotateY(180deg);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    background: var(--car-metallic);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--chrome-silver);
}

.flip-card-front h3, .flip-card-back h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin: var(--space-sm) 0;
    text-align: center;
}

.flip-card-front h3 {
    color: var(--primary-charcoal);
}

.flip-card-back h3 {
    color: white;
    margin-bottom: var(--space-md);
}

.flip-card-back p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    font-size: 0.85rem;
    text-align: left;
    margin: 0;
    white-space: pre-line;
}

/* ==========================================
   PRICING SECTION PREMIUM - FIXED
   ========================================== */
.pricing-section {
    margin-bottom: var(--space-3xl);
    text-align: center;
    position: relative;
    z-index: 1;
}

.pricing-section h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-charcoal);
    margin-bottom: var(--space-2xl);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-xl);
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-lg);
    position: relative;
    z-index: 2;
    justify-items: center;
}

.price-card {
    position: relative;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(247, 250, 252, 0.8) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-grey);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.4s var(--ease-out-quart);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: var(--space-sm) 0;
    z-index: 3;
    width: 100%;
    max-width: 380px;
    min-height: 320px;
}

.price-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-red);
}

.price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(229, 62, 62, 0.05) 0%, 
        rgba(45, 55, 72, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.price-card:hover::before {
    opacity: 1;
}

.price-card h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-charcoal);
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 2;
}

.price-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-xl) 0;
    position: relative;
    z-index: 2;
}

.price-card li {
    display: flex;
    align-items: center;
    padding: var(--space-xs) 0;
    color: var(--primary-slate);
    font-size: 0.9rem;
    line-height: 1.4;
}

.price-card li::before {
    content: '✓';
    color: var(--accent-red);
    font-weight: bold;
    margin-right: var(--space-sm);
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ==========================================
   PREMIUM BUTTONS
   ========================================== */
.btn-reservation {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    background: transparent;
    border: 2px solid var(--accent-red);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s var(--ease-out-quart);
    overflow: hidden;
    color: var(--accent-red);
    min-width: 200px;
    z-index: 2;
}

.btn-reservation:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-red-dark);
    color: white;
    text-decoration: none;
}

.btn-reservation::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-red-dark));
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-reservation:hover::before {
    left: 0;
}

.btn-reservation::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--automotive-shine);
    animation: shine 3s ease-in-out infinite;
}

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

/* ==========================================
   MESSAGES PREMIUM
   ========================================== */
.messages {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 1000;
    max-width: 400px;
}

.alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    background: linear-gradient(145deg, var(--glass-white), var(--chrome-light));
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-grey);
    box-shadow: var(--shadow-lg);
    color: var(--primary-charcoal);
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    border-left: 4px solid var(--accent-red);
}

.alert-error {
    border-left: 4px solid #E53E3E;
}

/* ==========================================
   RESPONSIVE DESIGN - IMPROVED SPACING
   ========================================== */
@media (max-width: 768px) {
    .flip-card-container {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        padding: var(--space-md);
        margin-bottom: var(--space-2xl);
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        padding: var(--space-md);
    }
    
    .flip-card {
        max-width: 100%;
        margin: var(--space-md) 0;
    }
    
    .price-card {
        max-width: 100%;
        margin: var(--space-md) 0;
        min-height: 280px;
    }
    
    .service-hero h1 {
        font-size: 2rem;
    }
    
    .service-description h2,
    .pricing-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .service-detail-page {
        padding-left: 0;
    }
    
    .service-content {
        padding: var(--space-xl) var(--space-md);
    }
    
    .flip-card-container {
        gap: var(--space-lg);
        padding: var(--space-sm);
    }
    
    .pricing-cards {
        gap: var(--space-lg);
        padding: var(--space-sm);
    }
    
    .price-card {
        padding: var(--space-lg);
        margin: var(--space-sm) 0;
        min-height: 260px;
    }
    
    .flip-card {
        height: 250px;
        margin: var(--space-sm) 0;
    }
    
    .flip-card-front, .flip-card-back {
        padding: var(--space-lg);
    }
}

/* ==========================================
   FIX FLIP CARD ARTIFACTS - NO BACKGROUND SQUARES
   ========================================== */
.flip-card,
.flip-card *,
.flip-card-inner,
.flip-card-inner *,
.flip-card-front,
.flip-card-back {
    outline: none !important;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

/* Prevent any pseudo-elements from creating background artifacts */
.flip-card::before,
.flip-card::after,
.flip-card-inner::before,
.flip-card-inner::after {
    display: none !important;
}

/* Ensure smooth transforms without background bleeding */
.flip-card-front,
.flip-card-back {
    -webkit-transform-origin: center center;
    transform-origin: center center;
    will-change: transform;
}

/* ==========================================
   ELIMINATE DOUBLE CARD EFFECT
   ========================================== */

/* Ensure only one face is visible at a time */
.flip-card-front {
    opacity: 1;
    visibility: visible;
}

.flip-card-back {
    opacity: 1;
    visibility: visible;
}

/* During flip transition, ensure smooth visibility */
.flip-card:hover .flip-card-front {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.flip-card:hover .flip-card-back {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease-in-out 0.3s, visibility 0.3s ease-in-out 0.3s;
}

/* Ensure clean rendering during transform */
.flip-card,
.flip-card-inner,
.flip-card-front,
.flip-card-back {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
