/* Landing Page CSS - Optimized for Service/Package Pages */

/* Typography & Design System Variables */
:root {
    /* Typography Scale System */
    --text-xs: 0.875rem;
    --text-sm: 0.95rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.25rem;
    
    /* Font Weight System */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Color System - Matching Main Site */
    --peach: #FCE7C8;
    --peach-mid: #F5DDB8;
    --peach-dark: #EED5A8;
    --sage: #B1C29E;
    --sage-light: #C8D9B8;
    --amber: #F0A04B;
    --amber-dark: #D48C3F;
    --text-color: #1B2430;
    --muted-color: #5F6B7A;
    --border-color: #E6E9EF;
    
    /* Glass Morphism Values */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, 
        var(--peach) 0%,      /* #FCE7C8 - Peach light */
        var(--peach-mid) 50%,  /* #F5DDB8 - Peach mid */
        var(--peach-dark) 100% /* #EED5A8 - Peach warm */
    );
    min-height: 100vh;
    position: relative;
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
    width: 100%;
}

/* Subtle texture overlay for organic feel */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(
        circle at 1px 1px, 
        rgba(255, 255, 255, 0.25) 1px, 
        transparent 0
    );
    background-size: 20px 20px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

/* Container */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1; /* Above texture overlay */
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal overflow */
}

/* Skip to Booking Link - Accessibility */
.skip-to-booking {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--amber);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    border-radius: 4px;
    z-index: 2000;
    transition: top 0.3s ease;
}

.skip-to-booking:focus {
    top: 10px;
    outline: 3px solid var(--amber-dark);
    outline-offset: 2px;
}

/* Header */
.landing-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    padding: 12px 20px; /* Added horizontal padding to move items inward */
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(10px)) {
    .landing-header {
        background: rgba(255, 255, 255, 0.95);
    }
}

/* Header Logo */
.header-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo img {
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.95;
}

.header-logo img:hover {
    transform: scale(1.05);
    opacity: 1;
}

/* Home Button */
.home-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.home-button:hover {
    background: rgba(240, 160, 75, 0.12);
    border-color: rgba(240, 160, 75, 0.2);
}

.home-button span:first-child {
    font-size: 1.1em;
    transition: transform 0.25s ease;
}

.home-button:hover span:first-child {
    transform: translateX(-2px);
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.lang-toggle a {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(240, 160, 75, 0.25);
    border-radius: 20px;
    text-decoration: none;
    color: var(--muted-color);
    font-weight: var(--font-weight-semibold);
    font-size: var(--text-sm);
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.lang-toggle a[aria-current="page"] {
    background: linear-gradient(
        180deg,
        rgba(240, 160, 75, 0.85),
        rgba(212, 140, 63, 0.85)
    );
    color: #1B2430;
    border-color: rgba(240, 160, 75, 0.6);
    box-shadow: 
        0 4px 12px rgba(240, 160, 75, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.lang-toggle a:hover {
    background: rgba(240, 160, 75, 0.15);
    border-color: rgba(240, 160, 75, 0.45);
    color: var(--text-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.lang-toggle a[aria-current="page"]:hover {
    background: linear-gradient(
        180deg,
        rgba(242, 167, 84, 0.9),
        rgba(201, 128, 56, 0.9)
    );
    box-shadow: 
        0 6px 16px rgba(240, 160, 75, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Hero Section */
.landing-hero {
    text-align: center;
    padding: 20px 0 20px;
    max-width: 800px; /* Keep hero narrower for readability */
    margin-left: auto;
    margin-right: auto;
}

.service-title {
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    text-shadow: 
        0 1px 1px rgba(255, 255, 255, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.12),
        0 4px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    line-height: 1.2;
}

.service-subtitle {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-medium);
    color: var(--muted-color);
    text-shadow: 
        0 1px 2px rgba(255, 255, 255, 0.7),
        0 2px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Content Layout: Desktop side-by-side, mobile stacked */
.content-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin: 40px 0;
    width: 100%;
    max-width: 100%;
}

/* Mobile: Calendly first, then description */
.calendly-section {
    order: 1;
}

.service-description {
    order: 2;
}

@media (min-width: 960px) {
    .content-layout {
        grid-template-columns: 1fr 1.2fr; /* Info slightly smaller, Calendly larger */
        gap: 40px;
        align-items: start; /* Top-align both cards */
    }
    
    /* Desktop: Reset order - description left, calendly right */
    .service-description {
        order: 1;
    }
    
    .calendly-section {
        order: 2;
    }
}

/* Service Description */
.service-description {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    height: 100%; /* Fill grid cell */
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    padding: 36px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden; /* Changed from visible to hidden to prevent overflow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform; /* GPU acceleration hint */
    width: 100%;
    max-width: 100%;
}

.service-description:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(12px)) {
    .service-description {
        background: rgba(255, 255, 255, 0.95);
    }
}

/* Inner border glow effect */
.service-description::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(240, 160, 75, 0.15),
        rgba(177, 194, 158, 0.1)
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Radial glow beneath service description card */
.service-description::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -20px;
    width: 85%;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(240, 160, 75, 0.28) 0%,
        rgba(240, 160, 75, 0.12) 40%,
        rgba(0, 0, 0, 0) 75%
    );
    filter: blur(20px);
    opacity: 0.85;
    z-index: -1;
    pointer-events: none;
}

.service-description p {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-normal);
    color: var(--text-color);
    line-height: 1.7;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}

.service-description p:last-child {
    margin-bottom: 0;
}

/* Service Summary and Details List */
.service-card-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.3;
    text-align: center;
}

.service-summary {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-color);
    margin-bottom: 16px !important;
}

/* Service Chips (replacing bullet list) */
.service-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
    margin-bottom: 28px;
    justify-content: center;
}

.service-chips .chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #B1C29E;
    border: 1px solid color-mix(in srgb, #B1C29E 70%, black);
    border-radius: 999px;
    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-color);
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.04);
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.service-chips .chip:hover {
    box-shadow: 0 0 0 3px color-mix(in srgb, #B1C29E 35%, white);
    transform: translateY(-1px);
}

.service-detailed-copy {
    font-style: italic;
    color: var(--muted-color);
}

.service-detailed-copy-first {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid rgba(177, 194, 158, 0.3);
}

/* Calendly Section */
.calendly-section {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        /* Outer glow shadow */
        0 -6px 24px rgba(177, 194, 158, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    height: 100%; /* Fill grid cell */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden; /* Changed from visible to hidden to prevent overflow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform; /* GPU acceleration hint */
    width: 100%;
    max-width: 100%;
}

.calendly-section:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 -8px 28px rgba(177, 194, 158, 0.2);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(12px)) {
    .calendly-section {
        background: rgba(255, 255, 255, 0.96);
    }
}

/* Inner border glow effect */
.calendly-section::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(177, 194, 158, 0.15),
        rgba(240, 160, 75, 0.1)
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.calendly-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    text-shadow: 
        0 1px 2px rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.calendly-subtitle {
    font-size: var(--text-base);
    font-weight: var(--font-weight-normal);
    color: var(--muted-color);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Calendly Widget Styling */
/* NOTE: Widget height is overridden in HTML <style> block to ensure it wins over Calendly's external CSS */
.calendly-inline-widget {
    min-width: 320px;
    height: 900px; /* Mobile-first: tall for phones */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    flex: 1; /* Take remaining space in flex container */
}

@media (min-width: 960px) {
    .calendly-inline-widget {
        height: 700px; /* Shorter on desktop where there's side-by-side layout */
    }
}

/* Back to Main Site */
.back-to-main {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 60px;
}

.back-to-main a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(180deg, var(--amber) 0%, var(--amber-dark) 100%);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 12px;
    font-weight: var(--font-weight-semibold);
    font-size: var(--text-base);
    border: 1px solid #D79041;
    box-shadow: 
        inset 0 -2px 0 rgba(0, 0, 0, 0.10),
        0 6px 18px rgba(240, 160, 75, 0.32);
    transition: all 0.25s ease;
    position: relative;
}

/* Button glow effect */
.back-to-main a::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -14px;
    width: 70%;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(240, 160, 75, 0.35) 0%,
        rgba(240, 160, 75, 0.15) 50%,
        rgba(0, 0, 0, 0) 75%
    );
    filter: blur(12px);
    opacity: 0.9;
    z-index: -1;
    pointer-events: none;
}

.back-to-main a:hover {
    background: linear-gradient(180deg, #F2A754 0%, #C98038 100%);
    box-shadow: 
        inset 0 -2px 0 rgba(0, 0, 0, 0.12),
        0 8px 22px rgba(240, 160, 75, 0.40);
    transform: translateY(-2px);
}

/* Arrow icon animation */
.back-to-main a span:first-child {
    font-size: 1.2em;
    transition: transform 0.25s ease;
}

.back-to-main a:hover span:first-child {
    transform: translateX(-3px);
}

/* Footer */
.landing-footer {
    text-align: center;
    padding: 30px 0;
    color: var(--muted-color);
    font-size: var(--text-xs);
}

.landing-footer a {
    color: var(--amber);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

.landing-footer a:hover {
    color: var(--amber-dark);
    text-shadow: 0 1px 2px rgba(240, 160, 75, 0.3);
    text-decoration: underline;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .landing-header {
        padding: 10px 16px;
        gap: 12px;
    }
    
    .header-logo img {
        width: 40px;
        height: 40px;
    }
    
    .home-button {
        font-size: var(--text-sm);
        padding: 5px 8px;
    }
    
    .lang-toggle a {
        padding: 6px 10px;
        font-size: var(--text-xs);
    }
    .container {
        padding: 12px;
        width: 100%;
    }
    
    .landing-header {
        padding: 10px 12px;
        margin-bottom: 20px;
    }
    
    .home-button {
        font-size: var(--text-xs);
        padding: 6px 10px;
        gap: 4px;
    }
    
    .lang-toggle {
        gap: 4px;
    }
    
    .lang-toggle a {
        padding: 6px 10px;
        font-size: 0.8125rem;
    }
    
    .service-title {
        font-size: var(--text-3xl);
        text-shadow: 
            0 1px 1px rgba(255, 255, 255, 0.9),
            0 2px 3px rgba(0, 0, 0, 0.1);
    }
    
    .service-subtitle {
        font-size: var(--text-lg);
        margin-bottom: 30px;
    }
    
    .landing-hero {
        padding: 20px 0 15px;
    }
    
    .content-layout {
        gap: 20px;
        margin: 20px 0 40px;
    }
    
    .service-description {
        padding: 24px 20px;
        margin: 0;
        width: 100%;
    }
    
    .service-description h2 {
        font-size: var(--text-2xl);
    }
    
    .service-description p {
        font-size: var(--text-base);
    }
    
    .calendly-section {
        padding: 24px 20px;
        margin: 0;
        width: 100%;
    }
    
    .calendly-section h2 {
        font-size: var(--text-2xl);
    }
    
    /* Calendly widget height set in base rule (900px mobile-first) */
    
    /* Reduce hover lift on mobile for better touch interaction */
    .service-description:hover,
    .calendly-section:hover {
        transform: translateY(-2px);
    }
    
    .back-to-main {
        padding: 30px 0;
        margin-top: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .landing-header {
        padding: 8px 10px;
        flex-wrap: nowrap;
    }
    
    .service-title {
        font-size: var(--text-2xl);
    }
    
    .service-subtitle {
        font-size: var(--text-base);
    }
    
    .service-description,
    .calendly-section {
        padding: 20px 16px;
    }
    
    .service-description h2,
    .calendly-section h2 {
        font-size: var(--text-xl);
    }
    
    /* Calendly widget height set in base rule (900px mobile-first) */
    
    .lang-toggle {
        flex-wrap: nowrap;
        gap: 3px;
    }
    
    .lang-toggle a {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    
    .home-button {
        padding: 5px 8px;
    }
    
    .home-button span:last-child {
        display: none; /* Hide "Home" text, keep arrow only on very small screens */
    }
}

/* Focus states for accessibility */
.lang-toggle a:focus,
.back-to-main a:focus,
.home-button:focus {
    outline: 2px solid rgba(240, 160, 75, 0.6);
    outline-offset: 2px;
}

/* Focus visible for modern browsers (keyboard only) */
.lang-toggle a:focus-visible,
.back-to-main a:focus-visible,
.home-button:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(240, 160, 75, 0.2);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Loading state for Calendly */
.calendly-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #666;
    font-style: italic;
}

/* Print Styles */
@media print {
    body::before,
    .service-description::before,
    .service-description::after,
    .calendly-section::before,
    .back-to-main a::after {
        display: none; /* Hide decorative elements */
    }
    
    .landing-header {
        position: static;
        border-bottom: 2px solid #ddd;
        box-shadow: none;
        background: white;
    }
    
    .service-description,
    .calendly-section {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .calendly-inline-widget {
        display: none; /* Hide interactive widget */
    }
    
    .calendly-section::after {
        content: "Visit the website to book an appointment.";
        display: block;
        margin-top: 20px;
        font-style: italic;
        color: #666;
    }
    
    .back-to-main,
    .lang-toggle {
        display: none; /* Hide navigation elements */
    }
}