/* ═══════════════════════════════════════════════════════════════════════════════
   FITTRACK MOBILE-FIRST RESPONSIVE DESIGN SYSTEM
   Complete mobile responsiveness for all devices and breakpoints
   Mobile: 320px–480px | Tablet: 481px–768px | Laptop: 769px–1024px | Desktop: 1025px+
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════ ROOT VARIABLES & RESET ═══════════════════ */
:root {
    /* Spacing Scale (mobile-first) */
    --spacing-2xs: 4px;
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 20px;
    --spacing-xl: 24px;
    --spacing-2xl: 32px;
    --spacing-3xl: 40px;
    --spacing-4xl: 48px;
    --spacing-5xl: 64px;
    --spacing-6xl: 80px;
    --spacing-7xl: 96px;
    
    /* Typography Scale */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 28px;
    --text-4xl: 32px;
    --text-5xl: 40px;
    --text-6xl: 48px;
    
    /* Colors */
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #22c55e;
    --secondary: #22c55e;
    --accent: #f97316;
    --surface: #f8fafc;
    --ink: #1f2937;
    --ink-light: #6b7280;
    --border: #e5e7eb;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #ffffff;
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ═══════════════════ RESPONSIVE TYPOGRAPHY ═══════════════════ */
h1 {
    font-size: clamp(24px, 6vw, 56px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-lg);
}

h2 {
    font-size: clamp(20px, 5vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-lg);
}

h3 {
    font-size: clamp(18px, 4vw, 32px);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

h4 {
    font-size: clamp(16px, 3vw, 24px);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

h5 {
    font-size: clamp(14px, 2.5vw, 20px);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

h6 {
    font-size: clamp(12px, 2vw, 18px);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

p {
    font-size: clamp(14px, 2.2vw, 16px);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    color: #4b5563;
}

/* Small text on mobile */
small {
    font-size: clamp(12px, 1.8vw, 14px);
}

/* ═══════════════════ RESPONSIVE CONTAINER ═══════════════════ */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

@media (min-width: 481px) {
    .container {
        padding-left: var(--spacing-lg);
        padding-right: var(--spacing-lg);
    }
}

@media (min-width: 769px) {
    .container {
        max-width: 728px;
        padding-left: var(--spacing-xl);
        padding-right: var(--spacing-xl);
    }
}

@media (min-width: 1025px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1281px) {
    .container {
        max-width: 1200px;
    }
}

/* ═══════════════════ FLEXIBLE LAYOUT SYSTEM ═══════════════════ */
.flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    width: 100%;
}

@media (min-width: 481px) {
    .flex-container {
        gap: var(--spacing-lg);
    }
}

.flex-container > * {
    flex: 1 1 100%;
    min-width: 0;
}

@media (min-width: 481px) {
    .flex-container.cols-2 > * {
        flex: 1 1 calc(50% - var(--spacing-md));
    }
}

@media (min-width: 769px) {
    .flex-container.cols-2 > * {
        flex: 1 1 calc(50% - var(--spacing-lg));
    }
}

@media (min-width: 1025px) {
    .flex-container.cols-3 > * {
        flex: 1 1 calc(33.333% - var(--spacing-lg));
    }
    
    .flex-container.cols-4 > * {
        flex: 1 1 calc(25% - var(--spacing-lg));
    }
}

/* ═══════════════════ RESPONSIVE GRID SYSTEM ═══════════════════ */
.grid-responsive {
    display: grid;
    gap: var(--spacing-md);
    width: 100%;
    grid-template-columns: 1fr;
}

@media (min-width: 481px) {
    .grid-responsive {
        gap: var(--spacing-lg);
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) {
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

@media (min-width: 1281px) {
    .grid-responsive {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Grid 2-Column Layout */
.grid-2 {
    grid-template-columns: 1fr;
}

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

/* Grid 3-Column Layout */
.grid-3 {
    grid-template-columns: 1fr;
}

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

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

/* ═══════════════════ RESPONSIVE SPACING ═══════════════════ */
.section {
    width: 100%;
    padding: var(--spacing-3xl) var(--spacing-md);
}

@media (min-width: 481px) {
    .section {
        padding: var(--spacing-3xl) var(--spacing-lg);
    }
}

@media (min-width: 769px) {
    .section {
        padding: var(--spacing-4xl) var(--spacing-xl);
    }
}

@media (min-width: 1025px) {
    .section {
        padding: var(--spacing-5xl) var(--spacing-2xl);
    }
}

/* Minimal spacing on mobile */
.section-tight {
    padding: var(--spacing-2xl) var(--spacing-md);
}

@media (min-width: 481px) {
    .section-tight {
        padding: var(--spacing-3xl) var(--spacing-lg);
    }
}

@media (min-width: 1025px) {
    .section-tight {
        padding: var(--spacing-4xl) var(--spacing-2xl);
    }
}

/* ═══════════════════ IMAGES RESPONSIVE ═══════════════════ */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

img.responsive {
    width: 100%;
    height: auto;
}

picture {
    display: block;
}

picture img {
    width: 100%;
    height: auto;
}

/* ═══════════════════ RESPONSIVE NAVBAR ═══════════════════ */
.navbar-responsive {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--spacing-md) var(--spacing-md);
    gap: var(--spacing-md);
}

@media (min-width: 481px) {
    .navbar-container {
        padding: var(--spacing-lg) var(--spacing-lg);
    }
}

@media (min-width: 769px) {
    .navbar-container {
        padding: var(--spacing-lg) var(--spacing-xl);
    }
}

/* Logo - Always visible */
.navbar-logo {
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
    flex-shrink: 0;
}

/* Hamburger Menu Button - Hide on desktop */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 50;
}

.hamburger-btn span {
    width: 24px;
    height: 2.5px;
    background: var(--ink);
    border-radius: 2px;
    transition: var(--transition-base);
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

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

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

@media (min-width: 769px) {
    .hamburger-btn {
        display: none;
    }
}

/* Mobile Navigation Menu */
.mobile-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}

.mobile-nav.active {
    display: flex;
    max-height: 500px;
}

.mobile-nav a,
.mobile-nav button {
    display: block;
    width: 100%;
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--ink);
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    font-weight: 500;
}

.mobile-nav a:hover,
.mobile-nav button:hover {
    background-color: var(--surface);
    color: var(--primary);
}

@media (min-width: 769px) {
    .mobile-nav {
        display: flex !important;
        position: static;
        max-height: none;
        border: none;
        background: none;
        flex-direction: row;
        gap: var(--spacing-lg);
        padding: 0;
    }
    
    .mobile-nav a,
    .mobile-nav button {
        padding: 0;
        border: none;
        background: none;
    }
    
    .mobile-nav a:hover {
        background: none;
    }
}

/* Desktop Navigation - Hide on mobile */
.desktop-nav {
    display: none;
    gap: var(--spacing-xl);
    align-items: center;
}

@media (min-width: 769px) {
    .desktop-nav {
        display: flex;
    }
}

/* ═══════════════════ RESPONSIVE BUTTONS ═══════════════════ */
button,
.btn,
input[type="button"],
input[type="submit"] {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    min-height: 44px;
    min-width: 44px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
}

/* Full width buttons on mobile */
.btn-full {
    width: 100%;
    display: block;
    padding: var(--spacing-md) var(--spacing-lg);
    min-height: 48px;
}

@media (min-width: 481px) {
    .btn-full {
        width: auto;
        display: inline-block;
    }
}

/* Primary Button */
.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--primary);
    color: white;
}

/* Disabled State */
button:disabled,
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ═══════════════════ RESPONSIVE FORMS ═══════════════════ */
form {
    width: 100%;
}

.form-group {
    margin-bottom: var(--spacing-lg);
    width: 100%;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    font-size: clamp(14px, 2.2vw, 16px);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: #ffffff;
    transition: all var(--transition-fast);
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form Row - Two columns on desktop */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

@media (min-width: 481px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══════════════════ RESPONSIVE CARDS ═══════════════════ */
.card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-xs);
}

@media (min-width: 481px) {
    .card {
        padding: var(--spacing-xl);
    }
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #d1d5db;
}

.card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(22, 163, 74, 0.1);
    border-radius: var(--radius-lg);
    color: var(--primary);
}

.card-title {
    font-size: clamp(16px, 3vw, 20px);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.card-text {
    font-size: clamp(14px, 2.2vw, 16px);
    color: #6b7280;
    flex-grow: 1;
    margin-bottom: var(--spacing-md);
}

/* ═══════════════════ RESPONSIVE TABLES ═══════════════════ */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: var(--spacing-lg);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: var(--surface);
    font-weight: 600;
    font-size: clamp(13px, 2vw, 15px);
}

td {
    font-size: clamp(13px, 2vw, 15px);
}

tr:hover {
    background-color: var(--surface);
}

/* Hide columns on mobile */
.hidden-mobile {
    display: none;
}

@media (min-width: 481px) {
    .hidden-mobile {
        display: table-cell;
    }
}

/* ═══════════════════ RESPONSIVE HERO SECTION ═══════════════════ */
.hero {
    position: relative;
    width: 100%;
    min-height: clamp(400px, 80vh, 600px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    padding: var(--spacing-md);
    text-align: center;
}

@media (min-width: 481px) {
    .hero-content {
        padding: var(--spacing-lg);
        text-align: left;
    }
}

/* ═══════════════════ UTILITY CLASSES ═══════════════════ */

/* Responsive Padding */
.p-responsive {
    padding: var(--spacing-md);
}

@media (min-width: 481px) {
    .p-responsive {
        padding: var(--spacing-lg);
    }
}

@media (min-width: 769px) {
    .p-responsive {
        padding: var(--spacing-xl);
    }
}

/* Responsive Margin */
.m-responsive {
    margin: var(--spacing-md);
}

@media (min-width: 481px) {
    .m-responsive {
        margin: var(--spacing-lg);
    }
}

@media (min-width: 769px) {
    .m-responsive {
        margin: var(--spacing-xl);
    }
}

/* Responsive Gap */
.gap-responsive {
    gap: var(--spacing-md);
}

@media (min-width: 481px) {
    .gap-responsive {
        gap: var(--spacing-lg);
    }
}

@media (min-width: 769px) {
    .gap-responsive {
        gap: var(--spacing-xl);
    }
}

/* ═══════════════════ RESPONSIVE UTILITIES ═══════════════════ */

/* Max Width Containers */
.max-w-sm {
    max-width: 320px;
}

.max-w-md {
    max-width: 420px;
}

.max-w-lg {
    max-width: 600px;
}

.max-w-xl {
    max-width: 780px;
}

.max-w-2xl {
    max-width: 960px;
}

.max-w-3xl {
    max-width: 1140px;
}

.max-w-4xl {
    max-width: 1320px;
}

.max-w-full {
    max-width: 100%;
}

/* Center Container */
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

/* ═══════════════════ ACCESSIBILITY ═══════════════════ */

/* 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;
        scroll-behavior: auto !important;
    }
}

/* Focus Visibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: more) {
    button,
    a,
    input {
        border-width: 2px;
    }
}

/* ═══════════════════ PRINT STYLES ═══════════════════ */
@media print {
    body {
        background: white;
    }
    
    .no-print {
        display: none;
    }
    
    a {
        text-decoration: underline;
    }
    
    img {
        max-width: 100%;
    }
}

/* ═══════════════════ LANDSCAPE MODE ═══════════════════ */
@media (max-height: 600px) and (orientation: landscape) {
    .section {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    h1 {
        margin-bottom: var(--spacing-sm);
    }
    
    .hero {
        min-height: auto;
        height: 100vh;
    }
}

/* ═══════════════════ DARK MODE SUPPORT ═══════════════════ */
@media (prefers-color-scheme: dark) {
    :root {
        --ink: #f1f5f9;
        --surface: #1e293b;
        --border: #334155;
    }
    
    body {
        background-color: #0f172a;
        color: var(--ink);
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="date"],
    textarea,
    select {
        background-color: #1e293b;
        color: var(--ink);
        border-color: var(--border);
    }
    
    .card {
        background-color: #1e293b;
        border-color: var(--border);
    }
    
    .navbar-responsive {
        background: rgba(15, 23, 42, 0.95);
    }
}

/* ═══════════════════ ANIMATION KEYFRAMES ═══════════════════ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FITTRACK NAVBAR - MOBILE-FIRST RESPONSIVE (320px - 430px - 768px - 1024px+)
   Fully optimized for all mobile devices and breakpoints
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════ MOBILE: 320px - 767px ═══════════════════ */
/* Base navbar styles for mobile (320px+) */
nav.navbar-sticky {
    width: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

nav.navbar-sticky .max-w-7xl {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    gap: 8px;
}

/* Logo - Always visible and optimized */
nav.navbar-sticky .flex-shrink-0 {
    min-width: fit-content;
    flex-shrink: 0;
}

nav.navbar-sticky .flex-shrink-0 a {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

nav.navbar-sticky .w-10.h-10 {
    width: 36px;
    height: 36px;
    min-width: 36px;
}

nav.navbar-sticky .w-10.h-10 svg {
    width: 20px;
    height: 20px;
}

nav.navbar-sticky .logo-text {
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
    display: inline;
}

/* Hide desktop elements on mobile */
nav.navbar-sticky .hidden.md\:flex {
    display: none !important;
}

/* Notification bell - Hide on very small screens */
@media (max-width: 374px) {
    nav.navbar-sticky .relative.p-2:first-of-type {
        display: none;
    }
}

/* Mobile menu button - Always visible on mobile */
#mobileMenuBtn {
    display: flex !important;
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 8px;
    flex-shrink: 0;
}

/* Mobile menu dropdown - Responsive positioning */
#mobileNav {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    background: white;
    border-top: 1px solid #e5e7eb;
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 40;
}

#mobileNav.active {
    max-height: 500px;
}

#mobileNav .px-4.py-3 {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

#mobileNav a {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(31, 41, 55, 0.8);
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

#mobileNav a:last-child {
    border-bottom: none;
}

#mobileNav a:hover {
    background-color: #f9fafb;
    color: #16a34a;
    padding-left: 20px;
}

/* ═══════════════════ SMALL MOBILE: 375px ═══════════════════ */
@media (min-width: 375px) {
    nav.navbar-sticky .max-w-7xl {
        height: 56px;
        padding: 0 14px;
    }

    nav.navbar-sticky .logo-text {
        font-size: 17px;
    }

    nav.navbar-sticky .w-10.h-10 {
        width: 38px;
        height: 38px;
    }

    #mobileNav a {
        padding: 13px 16px;
        font-size: 14px;
    }
}

/* ═══════════════════ MEDIUM MOBILE: 430px ═══════════════════ */
@media (min-width: 430px) {
    nav.navbar-sticky .max-w-7xl {
        height: 58px;
        padding: 0 16px;
    }

    nav.navbar-sticky .logo-text {
        font-size: 18px;
    }

    nav.navbar-sticky .w-10.h-10 {
        width: 40px;
        height: 40px;
    }

    nav.navbar-sticky .flex-shrink-0 a {
        gap: 8px;
    }

    #mobileNav a {
        padding: 14px 16px;
        font-size: 15px;
    }

    /* Show notification bell on medium screens */
    nav.navbar-sticky .relative.p-2:first-of-type {
        display: flex !important;
    }
}

/* ═══════════════════ TABLET/DESKTOP: 768px+ ═══════════════════ */
@media (min-width: 768px) {
    nav.navbar-sticky {
        padding: 0;
    }

    nav.navbar-sticky .max-w-7xl {
        width: 100%;
        max-width: 100%;
        height: 64px;
        padding: 0 24px;
        gap: 20px;
    }

    nav.navbar-sticky .flex-shrink-0 a {
        gap: 8px;
    }

    nav.navbar-sticky .logo-text {
        font-size: 20px;
    }

    nav.navbar-sticky .w-10.h-10 {
        width: 40px;
        height: 40px;
    }

    /* Show desktop navigation */
    nav.navbar-sticky .hidden.md\:flex {
        display: flex !important;
        flex: 1;
        justify-content: center;
        gap: 8px;
    }

    /* Hide mobile menu button on desktop */
    #mobileMenuBtn {
        display: none !important;
    }

    /* Hide mobile menu */
    #mobileNav {
        display: none !important;
        position: static;
        max-height: none;
        border: none;
        background: none;
    }

    /* Profile section layout */
    nav.navbar-sticky .flex.items-center.gap-4 {
        gap: 20px;
        margin-left: auto;
        flex-shrink: 0;
    }
}

/* ═══════════════════ LARGE DESKTOP: 1024px+ ═══════════════════ */
@media (min-width: 1024px) {
    nav.navbar-sticky .max-w-7xl {
        height: 70px;
        padding: 0 32px;
        gap: 24px;
    }

    nav.navbar-sticky .logo-text {
        font-size: 22px;
    }

    nav.navbar-sticky .hidden.md\:flex {
        gap: 12px;
    }

    nav.navbar-sticky .flex.items-center.gap-4 {
        gap: 24px;
    }
}

/* ═══════════════════ PROFILE DROPDOWN - MOBILE ADJUSTMENTS ═══════════════════ */
@media (max-width: 767px) {
    .profile-dropdown {
        position: fixed;
        left: 12px;
        right: 12px;
        width: auto !important;
        min-width: auto !important;
        top: auto !important;
        bottom: 20px;
        max-height: 60vh;
        overflow-y: auto;
    }

    .dropdown-item {
        padding: 12px 16px;
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    .profile-dropdown {
        position: absolute;
        left: auto;
        right: 0;
        width: 200px;
        min-width: 200px;
        bottom: auto;
        top: calc(100% + 8px);
    }
}

/* ═══════════════════ ACCESSIBILITY & REDUCED MOTION ═══════════════════ */
@media (prefers-reduced-motion: reduce) {
    nav.navbar-sticky,
    nav.navbar-sticky *,
    #mobileNav,
    .profile-dropdown {
        transition: none !important;
    }
}

/* ═══════════════════ HIGH DPI DEVICES (RETINA) ═══════════════════ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    nav.navbar-sticky .w-10.h-10 {
        box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
    }

    #mobileMenuBtn:hover {
        background: rgba(243, 244, 246, 0.8);
    }
}

/* ═══════════════════ LANDSCAPE ORIENTATION ═══════════════════ */
@media (max-height: 500px) and (orientation: landscape) {
    nav.navbar-sticky .max-w-7xl {
        height: 48px;
        padding: 8px 12px;
    }

    #mobileNav a {
        padding: 8px 12px;
        font-size: 13px;
    }

    .navbar-logo {
        font-size: 14px;
    }
}
