/* Smile Aesthetics Pro - Main Styles */
/* Using drinkhydrant.com styling patterns */

/* Custom Properties */
:root {
    --brand-green: #10b14b;
    --navy-blue: #002583;
    --cream: #FFF8E7;
    --whitening: #A0DFFF;
    --whitening-text: #002583;
    --aligners: #C8FF83;
    --aligners-text: #166E00;
    --veneers: #E88DFF;
    --veneers-text: #6E0055;
    --business: #FFA57F;
    --business-text: #6E1B00;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Euclid Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Prevent horizontal scroll */
.container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Navigation Styles - Mobile First */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.announcement-bar {
    width: 100%;
    background: #FFF8E7;
    color: #333333;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
}

.nav-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #002583;
    text-decoration: none;
    white-space: nowrap;
    z-index: 1001;
}

.nav-logo span {
    color: #10b14b;
}

/* Desktop Navigation */
.nav-desktop {
    display: none;
}

@media (min-width: 1024px) {
    .nav-desktop {
        display: flex;
        align-items: center;
        gap: 2rem;
    }

    .nav-link {
        color: #4a5568;
        text-decoration: none;
        font-weight: 500;
        transition: color 0.2s ease;
        white-space: nowrap;
    }

    .nav-link:hover {
        color: #002583;
    }

    .nav-dropdown {
        position: relative;
    }

    .nav-dropdown-trigger {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        color: #4a5568;
        font-weight: 500;
        cursor: pointer;
        transition: color 0.2s ease;
    }

    .nav-dropdown-trigger:hover {
        color: #002583;
    }

    .nav-dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 0.5rem;
        min-width: 16rem;
        background: white;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        border-radius: 0.5rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.2s ease;
    }

    .nav-dropdown:hover .nav-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-dropdown-link {
        display: block;
        padding: 0.75rem 1rem;
        color: #4a5568;
        text-decoration: none;
        transition: background-color 0.2s ease;
    }

    .nav-dropdown-link:hover {
        background-color: rgba(160, 223, 255, 0.2);
    }

    .nav-dropdown-link.whitening:hover {
        background-color: rgba(160, 223, 255, 0.2);
        color: #002583;
    }

    .nav-dropdown-link.aligners:hover {
        background-color: rgba(200, 255, 131, 0.2);
        color: #166E00;
    }

    .nav-dropdown-link.veneers:hover {
        background-color: rgba(232, 141, 255, 0.2);
        color: #6E0055;
    }

    .nav-dropdown-link.skin:hover {
        background-color: rgba(255, 165, 127, 0.2);
        color: #6E1B00;
    }
}

.nav-cta {
    display: none;
}

@media (min-width: 1024px) {
    .nav-cta {
        display: block;
        background: #10b14b;
        color: white;
        padding: 0.75rem 1.5rem;
        border-radius: 0.375rem;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
        transition: background-color 0.2s ease;
    }

    .nav-cta:hover {
        background: #0e9940;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

.hamburger {
    width: 24px;
    height: 20px;
    position: relative;
    transform: rotate(0deg);
    transition: 0.5s ease-in-out;
    cursor: pointer;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #002583;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
}

.hamburger span:nth-child(1) {
    top: 0px;
}

.hamburger span:nth-child(2) {
    top: 8px;
}

.hamburger span:nth-child(3) {
    top: 16px;
}

.hamburger.active span:nth-child(1) {
    top: 8px;
    transform: rotate(135deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.hamburger.active span:nth-child(3) {
    top: 8px;
    transform: rotate(-135deg);
}

/* Animation Classes */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Service Panels */
.service-panel {
    animation: fadeIn 0.3s ease-in-out;
}

.service-panel.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Interactive Radio Filters */
input[type="radio"]:checked ~ div {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Styles */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: white;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-content {
    padding: 1.5rem;
    padding-top: 5rem;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.mobile-menu-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #002583;
}

.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #4a5568;
    transition: color 0.2s ease;
}

.mobile-menu-close:hover {
    color: #002583;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu-link {
    display: block;
    padding: 1rem;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.125rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.mobile-menu-link:hover,
.mobile-menu-link:active {
    background: #f7fafc;
    color: #002583;
    transform: translateX(4px);
}

.mobile-submenu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.mobile-submenu-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.mobile-submenu-link.whitening {
    border-left: 3px solid #A0DFFF;
}

.mobile-submenu-link.whitening:active {
    background: rgba(160, 223, 255, 0.2);
    color: #002583;
}

.mobile-submenu-link.aligners {
    border-left: 3px solid #C8FF83;
}

.mobile-submenu-link.aligners:active {
    background: rgba(200, 255, 131, 0.2);
    color: #166E00;
}

.mobile-submenu-link.veneers {
    border-left: 3px solid #E88DFF;
}

.mobile-submenu-link.veneers:active {
    background: rgba(232, 141, 255, 0.2);
    color: #6E0055;
}

.mobile-submenu-link.skin {
    border-left: 3px solid #FFA57F;
}

.mobile-submenu-link.skin:active {
    background: rgba(255, 165, 127, 0.2);
    color: #6E1B00;
}

.mobile-menu-cta {
    display: block;
    margin-top: 2rem;
    background: #10b14b;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.mobile-menu-cta:active {
    background: #0e9940;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1050;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main content spacing for fixed header */
main {
    padding-top: 7rem;
}

@media (min-width: 1024px) {
    main {
        padding-top: 6rem;
    }
}

/* Button Hover Effects */
.btn-primary {
    background-color: var(--brand-green);
    color: white;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0e9940;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 177, 75, 0.3);
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(16, 177, 75, 0.1);
}

/* Image Hover Effects */
img {
    transition: transform 0.3s ease;
}

.hover-scale:hover img {
    transform: scale(1.05);
}

/* Dropdown Menu Animation */
.group:hover .group-hover\:opacity-100 {
    animation: dropdownFade 0.2s ease-in-out;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--brand-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--navy-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-green);
}

/* Responsive Utilities */
@media (max-width: 1024px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Prevent overflow on all elements */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

section {
    overflow-x: hidden;
}

/* Fix Tailwind grid overflow */
.grid {
    max-width: 100%;
}

/* Mobile responsive padding */
@media (max-width: 640px) {
    .px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
    }
}

/* Touch-friendly tap targets on mobile */
@media (max-width: 1024px) {
    a, button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-menu-link,
    .mobile-submenu-link {
        min-height: 48px;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    .no-print {
        display: none;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--brand-green);
    outline-offset: 2px;
}

/* Gradient Backgrounds */
.gradient-blue {
    background: linear-gradient(135deg, #f5feff 0%, #d3efff 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #f0fff4 0%, #c8ff83 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #fef5ff 0%, #e88dff 100%);
}

.gradient-orange {
    background: linear-gradient(135deg, #fff5f0 0%, #ffa57f 100%);
}