:root {
    /* Premium Color Palette */
    --color-primary: #0f172a;
    /* Slate 900 */
    --color-primary-light: #1e293b;
    /* Slate 800 */
    --color-accent: #db2777;
    /* Raspberry - Pink 600 */
    --color-accent-hover: #be185d;
    /* Darker Pink 700 */
    --color-accent-glow: rgba(219, 39, 119, 0.4);

    --color-text-main: #f8fafc;
    /* Slate 50 */
    --color-text-muted: #cbd5e1;
    /* Slate 300 */
    --color-market-bg: #020617;
    /* Slate 950 */

    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    /* Subtle white border */
    --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-radius: 12px;

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --header-height: 80px;
    --container-max: 1200px;

    --h1-size: clamp(2.5rem, 5vw, 3.5rem);
    --h2-size: clamp(2rem, 4vw, 2.5rem);
}

/* Base Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-market-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: var(--h1-size);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--h2-size);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    width: 90%;
    max-width: var(--container-max);
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--color-accent);
    color: white;
    box-shadow: 0 4px 12px var(--color-accent-glow);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--color-accent-glow);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--glass-border);
    color: white;
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background-color: rgba(99, 102, 241, 0.1);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: var(--container-max);
    margin: 0 auto;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--color-text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.nav-links li a:hover {
    color: white;
}

.lang-switch {
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Mobile menu todo */
    }
}

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(to bottom, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.95)),
        url('assets/images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 900px) {
    .hero-container {
        grid-template-columns: 0.8fr 1.2fr;
        text-align: left;
    }

    .hero .container {
        text-align: left;
    }
}

.hero-image {
    display: flex;
    justify-content: center;
}

.profile-img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

@media (min-width: 900px) {
    .profile-img {
        width: 350px;
        height: 350px;
    }
}

.hero-content {
    display: flex;
    flex-direction: column;
}

.hero h1 {
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

@media (min-width: 900px) {
    .hero .intro {
        margin: 0 0 2.5rem 0;
    }

    .cta-group {
        justify-content: flex-start;
    }
}

/* Services */
.services-section {
    padding: 5rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card.active {
    grid-row: span 2;
    /* Make expansions more visible if in grid support */
    z-index: 10;
    border-color: var(--color-accent);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: #0f172a;
    /* Solid background when expanded to cover content behind */
}

/* Image */
.card-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .card-image {
    transform: scale(1.05);
}

/* Preview Section */
.card-preview {
    padding: 2rem;
    padding-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    /* height: 100%;  <-- Removing this to prevent forced stretching */
    flex-grow: 1;
    /* Allow it to fill space if needed, but not force it if flex items behave */
    justify-content: flex-start;
    /* Ensure content stacks at top */
}

/* When active, prevent preview from hogging space */
.service-card.active .card-preview {
    flex-grow: 0;
    height: auto;
    padding-bottom: 0.5rem;
    /* Reduce padding slightly when open */
}

.card-preview h3 {
    margin: 1.5rem 0 0.5rem;
    /* Reduced bottom margin */
    font-size: 1.35rem;
    color: white;
}

/* Hidden Section */
.card-hidden {
    padding: 0 2rem 2rem;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin-top: -1rem;
    /* Pull up closer to preview */
}

.service-card.active .card-hidden {
    display: block;
    animation: fadeIn 0.4s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button */
.btn-expand {
    margin-top: 2rem;
    /* Fixed margin instead of auto to avoid huge gaps */
    width: fit-content;
    align-self: flex-start;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--color-text-muted);
}

.btn-expand:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.service-card.active .btn-expand {
    background: var(--color-accent-hover);
    color: white;
    align-self: flex-start;
}

.service-card h3 {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.service-section-title {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    /* Reduced from 0.5rem */
    font-weight: 600;
}

.service-card ul li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.service-card ul li::before {
    content: "•";
    color: var(--color-accent);
    position: absolute;
    left: 0;
}

/* About/Contact */
.about-contact {
    padding: 5rem 0;
    text-align: center;
    background: linear-gradient(to bottom, var(--color-market-bg), #0f172a);
    border-top: 1px solid var(--glass-border);
}

.contact-area {
    max-width: 800px;
    margin: 0 auto;
}

.contact-area p {
    font-size: 1.25rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
    color: #64748b;
    font-size: 0.875rem;
}

/* Mobile Nav */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--color-primary);
        padding: 1.5rem;
        flex-direction: column;
        align-items: center;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Form */
.contact-form {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: var(--card-radius);
    border: 1px solid var(--glass-border);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(15, 23, 42, 1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Carousel Core */
.relative-container {
    position: relative;
    padding: 0 1rem;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 1rem;
    /* Space for scrollbar if visible */
    scrollbar-width: none;
    /* Firefox */
}

.carousel-track::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.carousel-item {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* Gallery Thumbnails (3 per view on desktop) */
.gallery-thumb {
    width: 80%;
    /* Mobile: almost full width or peephole */
    max-width: 400px;
    aspect-ratio: 1;
    border-radius: var(--card-radius);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
}

.gallery-thumb:hover {
    transform: scale(1.02);
    border-color: var(--color-accent);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 768px) {
    .gallery-thumb {
        width: calc(33.333% - 1rem);
        /* 3 items minus gap */
    }
}

/* Testimonial Cards (2 per view on desktop) */
.testimonial-card {
    width: 85%;
    flex: 0 0 85%;
    /* Mobile */
    padding: 2.5rem;
    /* Added padding as requested */
    text-align: center;
    background: rgba(30, 41, 59, 0.4);
    /* Slightly different bg */
}

@media (min-width: 768px) {
    .testimonial-card {
        flex: 0 0 calc(50% - 0.75rem);
        /* 2 items */
        width: auto;
    }
}

.testimonial-text {
    font-style: italic;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
}

.testimonial-role {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.8);
    color: white;
    border: 1px solid var(--glass-border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: none;
    /* Hidden on mobile by default, user can swipe */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.carousel-btn:hover {
    background: var(--color-accent);
}

.prev-btn {
    left: -20px;
}

.next-btn {
    right: -20px;
}

@media (min-width: 768px) {
    .carousel-btn {
        display: flex;
    }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    /* Above header */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--color-accent);
}

/* Footer structure */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--color-text-muted);
    font-size: 0.85rem;
    background: var(--color-market-bg);
}