/*==================================================================
    IMPORTS & SETUP
==================================================================*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Define CSS Variables for Theming */
:root {
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Light Theme */
    --color-primary: #8B5CF6; /* Purple-500 */
    --color-primary-dark: #7C3AED; /* Purple-600 */
    --color-secondary: #EC4899; /* Pink-500 */
    --color-text-primary: #111827; /* Gray-900 */
    --color-text-secondary: #4B5563; /* Gray-600 */
    --color-text-muted: #9CA3AF; /* Gray-400 */
    --color-bg-light: #F9FAFB; /* Gray-50 */
    --color-bg-dark: #F3F4F6; /* Gray-100 */
    --color-card: #FFFFFF;
    --color-border: #E5E7EB; /* Gray-200 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-deep: 0 8px 32px rgba(139, 92, 246, 0.2);
}

/* Dark Theme */
html.dark {
    --color-primary: #A78BFA; /* Purple-400 */
    --color-primary-dark: #8B5CF6; /* Purple-500 */
    --color-secondary: #F472B6; /* Pink-400 */
    --color-text-primary: #F9FAFB; /* Gray-50 */
    --color-text-secondary: #9CA3AF; /* Gray-400 */
    --color-text-muted: #6B7280; /* Gray-500 */
    --color-bg-light: #111827; /* Gray-900 */
    --color-bg-dark: #1F2937; /* Gray-800 */
    --color-card: #1F2937; /* Gray-800 */
    --color-border: #374151; /* Gray-700 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.15);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.2), 0 2px 4px -2px rgb(0 0 0 / 0.2);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.2), 0 4px 6px -4px rgb(0 0 0 / 0.2);
    --shadow-deep: 0 8px 32px rgba(167, 139, 250, 0.15);
}

/*==================================================================
    BASE & LAYOUT
==================================================================*/

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family-base);
    background-color: var(--color-bg-light);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1280px; /* XL Breakpoint */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.section {
    padding: 6rem 0;
}

/*==================================================================
    TYPOGRAPHY
==================================================================*/

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem; /* 40px */
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.section-subtitle {
    font-size: 1.125rem; /* 18px */
    max-width: 60ch;
    margin: 0 auto;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/*==================================================================
    HEADER & NAVIGATION
==================================================================*/

.glass-effect {
    background-color: color-mix(in srgb, var(--color-bg-light) 70%, transparent);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.logo-image {
    height: 40px;
}

.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    padding-bottom: 0.25rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--color-text-primary);
}

.nav-link:hover::after,
.nav-link:focus::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/*==================================================================
    HERO SECTION
==================================================================*/

.hero-section {
    padding: 12rem 0 8rem 0;
    text-align: center;
    position: relative;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

#hero-animation-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-gradient-text {
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    max-width: 60ch;
    margin: 0 auto 2.5rem;
    font-size: 1.25rem;
    color: var(--color-text-secondary);
}

/*==================================================================
    SERVICES & PACKAGES SECTION (CARD STYLES)
==================================================================*/

.services-grid, .packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card, .package-card {
    background-color: var(--color-card);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover, .package-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 3.5rem; height: 3.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    background-color: color-mix(in srgb, var(--color-primary) 15%, transparent);
    color: var(--color-primary);
    border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
    display: flex; align-items: center; justify-content: center;
}

.service-title { font-size: 1.5rem; margin-bottom: 0.75rem; }

.package-card { align-items: flex-start; }
.package-title { font-size: 1.75rem; }
.package-price { font-size: 3rem; font-weight: 800; color: var(--color-primary); margin: 1.5rem 0; }
.package-features { list-style: none; padding: 0; margin-bottom: 2rem; flex-grow: 1; }
.package-features li { padding-left: 2rem; position: relative; margin-bottom: 1rem; }
.package-features li::before { content: "✓"; position: absolute; left: 0; color: var(--color-primary); font-weight: 700; }

.package-card--popular {
    position: relative;
    border-color: var(--color-primary);
}

.package-badge {
    position: absolute; top: -1.25rem; right: 1.5rem;
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.package-card .btn-container {
    margin-top: auto;
    padding-top: 1.5rem;
    width: 100%;
}

/*==================================================================
    PROCESS SECTION (TIMELINE)
==================================================================*/

.process-steps { position: relative; display: grid; grid-template-columns: 1fr; gap: 3rem; margin-top: 4rem; }

.process-line { display: none; }

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    text-align: left;
}

.process-number {
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    width: 3.5rem; height: 3.5rem; border-radius: 9999px;
    background-color: var(--color-card);
    color: var(--color-primary);
    border: 2px solid var(--color-border);
    font-weight: 700;
    font-size: 1.25rem;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.process-step:hover .process-number {
    background-color: var(--color-primary);
    color: var(--color-card);
    border-color: var(--color-primary);
}

.process-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.25rem; }

/*==================================================================
    ABOUT SECTION
==================================================================*/

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 2rem;
}

.about-image-wrapper {
    max-width: 400px;
    margin: 0 auto;
}

.about-image {
    width: 100%;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.about-text .section-title {
    text-align: left;
}

.about-intro {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    max-width: 65ch;
}

/*==================================================================
    CONTACT SECTION
==================================================================*/

.contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--color-card);
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

.form-group { margin-bottom: 1.5rem; }

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 25%, transparent);
}

/*==================================================================
    BUTTONS
==================================================================*/

.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.btn--primary {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.btn--primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.btn--secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn--secondary:hover {
    background-color: color-mix(in srgb, var(--color-primary) 15%, transparent);
    color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.btn--full-width { width: 100%; }


/*==================================================================
    RESPONSIVE DESIGN
==================================================================*/

@media (max-width: 767px) {
    .hero-title {
        font-size: 3rem; /* Further reduce title size */
    }
    .hero-description {
        font-size: 1.1rem; /* Adjust font size */
        max-width: 90%;    /* Use percentage for fluid width */
        overflow-wrap: break-word; /* Ensure long words break */
    }
}

@media (min-width: 768px) {
    .section { padding: 8rem 0; }
    .section-title { font-size: 3rem; }
    .hero-title { font-size: 4.5rem; }

    .services-grid, .packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content {
        grid-template-columns: 1fr 2fr;
        gap: 4rem;
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Desktop Timeline styles */
    .process-steps {
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
    }

    .process-line {
        display: block;
        position: absolute;
        top: 1.75rem; /* Half of process-number height */
        left: 12.5%;  /* Start after half of the first item */
        right: 12.5%; /* End before half of the last item */
        height: 2px;
        background-color: var(--color-border);
        z-index: -1;
    }

    .process-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 1rem;
    }

    .process-number {
        margin-bottom: 1.5rem;
        z-index: 1;
    }

    .packages-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .about-content {
        grid-template-columns: 1fr 2fr;
        gap: 5rem;
    }
}
