/* 
   Distinct Dental - Light Luxury Theme
   Palette: Fashion (Gold/Beige/Black)
*/

:root {
    /* Palette from color.md */
    --color-gold: #BF9004;
    /* Fashion-1 */
    --color-orange: #D97C0B;
    /* Fashion-2 */
    --color-beige: #A6937C;
    /* Fashion-3 */
    --color-brown: #73655D;
    /* Fashion-4 */
    --color-black: #0D0D0D;
    /* Fashion-5 */

    /* Semantic Mapping (Light Theme) */
    --color-bg-body: #ffffff;
    --color-bg-offset: #f9f9f9;
    --color-bg-warm: rgba(166, 147, 124, 0.1);
    /* Beige tint */

    --color-text-main: var(--color-black);
    --color-text-secondary: var(--color-brown);
    --color-accent: var(--color-gold);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --header-height: 90px;
    --max-width: 1400px;
    --container-padding: 2rem;
}

/* Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    /* Force prevent horizontal scroll */
    width: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Bypassable copy-friction layer */
body.protect {
    -webkit-user-select: none;
    user-select: none;
}

body.protect :where(input, textarea, select, option, button, [contenteditable="true"]) {
    -webkit-user-select: text;
    user-select: text;
}

/* Custom right-click panel */
.dd-context {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px) scale(0.98);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.dd-context.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.dd-context__panel {
    width: min(280px, calc(100vw - 24px));
    border-radius: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.55);
}

.dd-context__title {
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.dd-context__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.dd-context__link:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    color: var(--color-black);
    line-height: 1.1;
    font-weight: 600;
}

h1 {
    font-size: 4rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
}

.text-gold {
    color: var(--color-gold);
}

.text-secondary {
    color: var(--color-text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--color-black);
    color: var(--color-gold);
}

.btn-primary:hover {
    background-color: var(--color-gold);
    color: var(--color-black);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(191, 144, 4, 0.2);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-inner {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-black);
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: var(--color-black);
    position: relative;
}

/* Fix for button inside nav having dark text */
.nav-links .btn-primary {
    color: var(--color-gold);
}

.nav-links .btn-primary:hover {
    color: var(--color-black);
    background-color: var(--color-gold);
    /* Ensure background changes too if specificity is weird */
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding-top: var(--header-height);
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: url('images/clinic-outer-1.jpg') center/cover no-repeat;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    /* More transparent */
    backdrop-filter: blur(3px);
    /* Less blur */
    z-index: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-image-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.hero-image-wrapper img {
    position: relative;
    z-index: 2;
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    transform: scale(1.05);
    transform-origin: bottom center;
}

/* Ambient Background Blobs for Hero */
.ambient-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--color-gold);
    opacity: 0.08;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
}

.glow-1 {
    top: -10%;
    right: -10%;
}

.glow-2 {
    bottom: -10%;
    left: -10%;
    background: var(--color-beige);
}

/* About / Experience */
.about-section {
    background: var(--color-bg-body);
}

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

.about-image-collage {
    position: relative;
    height: 600px;
}

.collage-img {
    position: absolute;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.img-main {
    width: 80%;
    height: 85%;
    object-fit: cover;
    top: 0;
    left: 0;
    z-index: 1;
}

.img-accent {
    width: 50%;
    height: 40%;
    object-fit: cover;
    bottom: 0;
    right: 0;
    z-index: 2;
    border: 8px solid white;
}

/* Services */
.services-section {
    background: var(--color-bg-offset);
}

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

.service-card {
    background: white;
    padding: 3rem;
    border-radius: 2px;
    transition: all 0.4s ease;
    border-bottom: 3px solid transparent;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(13, 13, 13, 0.08);
    /* Dark shadow for contrast */
    border-bottom-color: var(--color-gold);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--color-gold);
    margin-bottom: 2rem;
}

.service-card h3 {
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--color-text-secondary);
}

/* Before/After */
.results-section {
    background: white;
}

.results-wrapper {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.slider-container {
    position: relative;
    width: 100%;
    padding-bottom: 60%;
    /* Aspect ratio */
    overflow: hidden;
}

.img-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.img-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-before {
    z-index: 2;
    /* clip-path set by JS */
    border-right: none;
}

.slider-range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: col-resize;
    z-index: 3;
    margin: 0;
}

.slider-handle-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
    pointer-events: none;
}

.slider-handle-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Adjusted by JS */
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 4;
    pointer-events: none;
}

/* Footer */
.footer {
    background: var(--color-beige);
    color: white;
    /* Contrast against beige */
    padding: 6rem 0 3rem;
}

.footer h3 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer p,
.footer li {
    opacity: 0.9;
}

.footer ul li {
    margin-bottom: 0.8rem;
}

.footer-logo {
    filter: brightness(0) invert(1);
    margin-bottom: 1.5rem;
    height: 40px;
}

.map-embed {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    aspect-ratio: 16 / 10;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Responsive */
@media (max-width: 992px) {
    .main-header {
        height: 70px;
        /* Smaller header on mobile */
    }

    .mobile-menu-toggle {
        display: block;
        z-index: 1002;
    }

    .nav-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        /* Use left 0 and transform for better performance/layout */
        width: 100%;
        height: 100vh;
        background: white;
        transform: translateX(100%);
        /* Move off-screen */
        transition: transform 0.3s ease-in-out;
        z-index: 1001;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-wrapper.active {
        transform: translateX(0);
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 2rem;
        gap: 2rem;
    }

    .hero-image-wrapper {
        order: -1;
        height: 300px;
        /* Reduced height to not dominate */
    }

    .hero-image-wrapper img {
        height: 100%;
        width: auto;
        transform: scale(1.3);
        /* Bigger on mobile */
        transform-origin: bottom center;
    }

    h1 {
        font-size: 2.5rem;
    }

    .section {
        padding: 4rem 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image-collage {
        height: 350px;
        margin-top: 0;
    }
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}
