/* ==========================================================================
   Services Page Styles
   ========================================================================== */

@import url('../base.css');

/* ==========================================================================
   Services Hero
   ========================================================================== */

.services-hero {
    background: linear-gradient(135deg, #fff 0%, var(--paper) 100%);
    padding: var(--g-xl) 0 var(--g-lg);
    position: relative;
    overflow: hidden;
}

.services-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(191, 161, 116, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.services-hero .overline {
    display: inline-block;
    margin-bottom: var(--g-sm);
}

.services-hero h1 {
    font-size: clamp(40px, 5vw, 56px);
    margin-bottom: var(--g-xs);
    color: var(--ink-900);
    letter-spacing: -0.02em;
}

.services-hero .lead {
    font-size: clamp(20px, 2.5vw, 24px);
    color: var(--ink-700);
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services-section {
    padding: var(--g-xxl) 0 var(--g-xxl);
    background: var(--paper);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--g-lg);
    row-gap: var(--g-xl);
}

/* Section alternée */
.services-primary {
    background: var(--paper);
}

.services-secondary {
    background: #fff;
    position: relative;
}

.services-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--gold-500) 50%, transparent 100%);
    opacity: 0.3;
}

/* Service Blocks */
.service-block {
    position: relative;
}

/* Service Number */
.service-number {
    position: absolute;
    top: -16px;
    left: 20px;
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: var(--font-bold);
    color: var(--gold-500);
    opacity: 0.15;
    z-index: 1;
    line-height: 1;
}

.service-block-card {
    background: #fff;
    border-radius: var(--r-lg);
    padding: var(--g-lg) var(--g-md);
    height: 380px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(191, 161, 116, 0.1);
}

/* Gold accent */
.service-block-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: var(--gold-500);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    transition: all 0.3s ease;
}

.service-block-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--gold-500);
}

.service-block-card:hover::after {
    width: 40px;
    height: 40px;
}

/* Service Icon */
.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--g-md);
    color: var(--gold-500);
    position: relative;
    transition: transform 0.3s ease;
}

.service-block-card:hover .service-icon {
    transform: scale(1.1);
}

.service-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

/* Service Title */
.service-block .overline {
    display: block;
    text-align: center;
    margin-bottom: var(--g-xs);
    font-size: 11px;
    opacity: 0.8;
}

.service-block h2 {
    font-size: 24px;
    text-align: center;
    color: var(--ink-900);
    margin-bottom: 0;
    line-height: 1.3;
}

/* Hover Content */
.service-hover-content {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 243, 238, 0.98) 100%);
    padding: var(--g-md);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: var(--g-sm);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.service-block-card:hover .service-hover-content {
    opacity: 1;
    visibility: visible;
}

.service-hover-content p {
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink-700);
    margin-bottom: 12px;
}

.service-hover-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    flex: 1;
}

.service-hover-content li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--ink-700);
    line-height: 1.4;
}

.service-hover-content li::before {
    content: "✓";
    position: absolute;
    left: 8px;
    color: var(--gold-500);
    font-weight: bold;
    font-size: 12px;
}

/* Custom scrollbar for hover content */
.service-hover-content::-webkit-scrollbar {
    width: 4px;
}

.service-hover-content::-webkit-scrollbar-track {
    background: transparent;
}

.service-hover-content::-webkit-scrollbar-thumb {
    background: var(--gold-500);
    border-radius: 2px;
}

.service-hover-content::-webkit-scrollbar-thumb:hover {
    background: var(--gold-600);
}

/* Firefox */
.service-hover-content {
    scrollbar-width: thin;
    scrollbar-color: var(--gold-500) transparent;
}

.service-hover-content .btn-ghost {
    align-self: flex-start;
    padding: 12px 24px;
    font-size: 14px;
    margin-top: auto;
    border: 1px solid var(--gold-500);
    color: var(--gold-500);
    border-radius: var(--r-xl);
    transition: all 0.25s ease;
    font-weight: var(--font-medium);
}

.service-hover-content .btn-ghost:hover {
    background: var(--gold-500);
    color: #111;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(191, 161, 116, 0.3);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.section-cta {
    padding: var(--g-xxl) 0;
    background: linear-gradient(135deg, var(--paper) 0%, #fff 100%);
    position: relative;
    overflow: hidden;
}

.section-cta::before {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(191, 161, 116, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content .overline {
    display: inline-block;
    margin-bottom: var(--g-sm);
}

.cta-content h2 {
    font-size: clamp(32px, 4vw, 40px);
    margin-bottom: var(--g-xs);
    letter-spacing: -0.02em;
}

.cta-content p {
    font-size: 20px;
    color: var(--ink-700);
    margin-bottom: var(--g-md);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Smooth Scroll
   ========================================================================== */

html {
    scroll-padding-top: calc(var(--header-height) + var(--top-band-height) + 20px);
}

/* Target highlight */
.service-block:target .service-block-card {
    animation: highlight 1s ease;
}

@keyframes highlight {
    0%, 100% {
        box-shadow: var(--shadow-soft);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(191, 161, 116, 0.3);
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--g-md);
        row-gap: var(--g-lg);
    }
    
    .service-block-card {
        height: auto;
        min-height: 320px;
        padding: var(--g-md);
    }
    
    .service-hover-content {
        position: static;
        opacity: 1;
        visibility: visible;
        background: transparent;
        padding-top: var(--g-sm);
        backdrop-filter: none;
    }
    
    .service-block h2 {
        margin-bottom: var(--g-sm);
        font-size: 20px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-number {
        font-size: 36px;
        top: -12px;
        left: 16px;
    }
}