/* ==========================================================================
   Real Estate Photography Hub - Global Stylesheet
   https://realestatephotographyhub.com
   A free real estate photography learning platform.
   ========================================================================== */

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

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    /* Brand Colors */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fbbf24;

    /* Neutrals */
    --dark: #111111;
    --dark-light: #1A1A1A;
    --gray-900: #e0e0e0;
    --gray-800: #d1d5db;
    --gray-700: #9CA3AF;
    --gray-600: #9CA3AF;
    --gray-500: #6b7280;
    --gray-400: #4b5563;
    --gray-300: #374151;
    --gray-200: rgba(255,255,255,0.06);
    --gray-100: #1A1A1A;
    --gray-50: #151515;
    --white: #111111;

    /* Semantic */
    --success: #10b981;
    --error: #ef4444;

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Oswald', var(--font-main);

    /* Layout */
    --section-padding: 80px;
    --container-max: 1200px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);

    /* Border Radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
}

/* --------------------------------------------------------------------------
   1. CSS Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: #e0e0e0;
    background-color: #111111;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* Remove default fieldset styles */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* Remove default summary arrow in some browsers */
summary {
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   2. Base Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 0.5em;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

h2 {
    font-size: clamp(1.625rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.015em;
}

h4 {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    font-weight: 600;
}

h5 {
    font-size: 1.125rem;
    font-weight: 600;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

p {
    margin-bottom: 1em;
    color: #9CA3AF;
    line-height: 1.7;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--primary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

strong, b {
    font-weight: 600;
}

small {
    font-size: 0.875rem;
}

blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #1A1A1A;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #9CA3AF;
    font-style: italic;
}

code {
    font-family: 'Fira Code', 'SF Mono', 'Cascadia Code', monospace;
    font-size: 0.875em;
    background: #1A1A1A;
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    color: #60a5fa;
}

pre {
    background: var(--dark);
    color: var(--gray-100);
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1.5rem 0;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Prose / article lists */
.prose ul,
.prose ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: #9CA3AF;
}

.prose ul {
    list-style: disc;
}

.prose ol {
    list-style: decimal;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.prose li::marker {
    color: var(--primary);
}

/* --------------------------------------------------------------------------
   3. Utility Classes
   -------------------------------------------------------------------------- */

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.container-sm {
    max-width: 768px;
}

.container-lg {
    max-width: 1400px;
}

.section {
    padding: var(--section-padding) 0;
}

.section-sm {
    padding: 40px 0;
}

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

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

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

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

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

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

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

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

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

.justify-end {
    justify-content: flex-end;
}

.gap-xs {
    gap: 0.5rem;
}

.gap-sm {
    gap: 0.75rem;
}

.gap-md {
    gap: 1rem;
}

.gap-lg {
    gap: 1.5rem;
}

.gap-xl {
    gap: 2rem;
}

.gap-2xl {
    gap: 3rem;
}

/* Grid */
.grid {
    display: grid;
}

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

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

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

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Text alignment */
.text-left {
    text-align: left;
}

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

.text-right {
    text-align: right;
}

/* Text colors */
.text-primary {
    color: var(--primary);
}

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

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

.text-muted {
    color: var(--gray-500);
}

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

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

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

/* Text size */
.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

/* Font weight */
.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Backgrounds */
.bg-primary {
    background-color: var(--primary);
}

.bg-dark {
    background-color: var(--dark);
}

.bg-gray-50 {
    background-color: var(--gray-50);
}

.bg-gray-100 {
    background-color: var(--gray-100);
}

.bg-white {
    background-color: var(--white);
}

/* Margins */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Padding */
.p-0 { padding: 0; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

/* Width */
.w-full {
    width: 100%;
}

.max-w-prose {
    max-width: 65ch;
}

/* Display */
.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.inline {
    display: inline;
}

.hidden {
    display: none;
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

/* Position */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.sticky {
    position: sticky;
}

/* Rounded */
.rounded {
    border-radius: var(--radius);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: var(--radius-full);
}

/* Shadows */
.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow {
    box-shadow: var(--shadow);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* --------------------------------------------------------------------------
   13. Accessibility Helpers / Skip to Content
   -------------------------------------------------------------------------- */
.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;
}

.sr-only-focusable:focus,
.sr-only-focusable:active {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

.skip-to-content {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0 0 var(--radius) var(--radius);
    text-decoration: none;
    transition: top var(--transition-fast);
}

.skip-to-content:focus {
    top: 0;
    color: var(--white);
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

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

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced motion */
@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;
    }
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    font-family: var(--font-main);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-user-select: none;
    user-select: none;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Secondary */
.btn-secondary {
    background-color: var(--accent);
    color: var(--dark);
    border-color: var(--accent);
}

.btn-secondary:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--dark);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Outline */
.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-outline:active {
    transform: translateY(0);
    box-shadow: none;
}

/* White outline (for dark backgrounds) */
.btn-outline-white {
    background-color: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
    background-color: var(--white);
    color: var(--dark);
    border-color: var(--white);
    transform: translateY(-1px);
}

.btn-outline-white:active {
    transform: translateY(0);
}

/* Large button */
.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.0625rem;
    border-radius: var(--radius-lg);
}

/* Small button */
.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
}

/* Icon button */
.btn-icon {
    padding: 0.625rem;
    line-height: 1;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Button group */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   5. Form Styles
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #9CA3AF;
    margin-bottom: 0.5rem;
}

.form-label-optional {
    font-weight: 400;
    color: var(--gray-400);
    margin-left: 0.25rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: var(--font-main);
    color: #e0e0e0;
    background-color: #111111;
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #4b5563;
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
    border-color: var(--gray-400);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-label {
    font-size: 0.9375rem;
    color: #9CA3AF;
    cursor: pointer;
}

/* Hint text */
.form-hint {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.375rem;
}

/* Error state */
.form-group.has-error .form-input,
.form-group.has-error .form-textarea,
.form-group.has-error .form-select,
.form-input.is-invalid,
.form-textarea.is-invalid,
.form-select.is-invalid {
    border-color: var(--error);
}

.form-group.has-error .form-input:focus,
.form-group.has-error .form-textarea:focus,
.form-group.has-error .form-select:focus,
.form-input.is-invalid:focus,
.form-textarea.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-error {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--error);
    margin-top: 0.375rem;
    font-weight: 500;
}

/* Success state */
.form-group.has-success .form-input,
.form-group.has-success .form-textarea,
.form-group.has-success .form-select,
.form-input.is-valid,
.form-textarea.is-valid,
.form-select.is-valid {
    border-color: var(--success);
}

.form-success {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--success);
    margin-top: 0.375rem;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   6. Card Component
   -------------------------------------------------------------------------- */
.card {
    background: #1A1A1A;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: none;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.card-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.card-text {
    font-size: 0.9375rem;
    color: #9CA3AF;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: #151515;
}

/* Flat card variant (no hover lift) */
.card-flat {
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.06);
}

.card-flat:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: var(--gray-300);
}

/* --------------------------------------------------------------------------
   7. Header / Navigation
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: box-shadow var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo img {
    height: 36px;
    width: auto;
}

.site-logo-text {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.site-logo-text span {
    color: var(--primary);
}

/* Main nav */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #9CA3AF;
    text-decoration: none;
    border-radius: var(--radius);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover {
    color: #ffffff;
    background-color: rgba(255,255,255,0.06);
}

.nav-link.active {
    color: var(--primary);
    background-color: rgba(37, 99, 235, 0.08);
}

/* Nav CTA */
.nav-cta {
    margin-left: 0.75rem;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: #1A1A1A;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast);
    transform: translateX(-50%) translateY(8px);
    z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-link {
    display: block;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9CA3AF;
    text-decoration: none;
    border-radius: var(--radius);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-dropdown-link:hover {
    background-color: rgba(255,255,255,0.06);
    color: var(--primary);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    gap: 5px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background-color var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background-color: rgba(255,255,255,0.06);
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #9CA3AF;
    border-radius: 1px;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Mobile hamburger animation (active state toggled via JS) */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile navigation panel */
.mobile-nav {
    display: none;
    position: fixed;
    inset: 72px 0 0 0;
    background: #111111;
    z-index: 999;
    padding: 1.5rem;
    overflow-y: auto;
    flex-direction: column;
    gap: 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav .nav-link {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius);
}

.mobile-nav .nav-cta {
    margin-left: 0;
    margin-top: 1rem;
}

.mobile-nav .btn {
    width: 100%;
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--dark);
    color: var(--gray-300);
    margin-top: auto;
}

.footer-main {
    padding: 4rem 0 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 3rem;
}

.footer-brand {
    max-width: 280px;
}

.footer-brand .site-logo-text {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--gray-400);
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--dark-light);
    color: var(--gray-400);
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--white);
}

.footer-social a svg {
    width: 18px;
    height: 18px;
}

.footer-heading {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--gray-400);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--dark-light);
    padding: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    font-size: 0.8125rem;
    color: var(--gray-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
    color: var(--gray-300);
}

/* --------------------------------------------------------------------------
   9. Progress Bar
   -------------------------------------------------------------------------- */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-sm {
    height: 4px;
}

.progress-bar-lg {
    height: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    position: relative;
}

.progress-fill[data-animated] {
    background-size: 200% 100%;
    animation: progressShimmer 2s ease infinite;
}

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #9CA3AF;
}

.progress-percentage {
    color: var(--primary);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   10. Toast / Notification
   -------------------------------------------------------------------------- */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 320px;
    max-width: 420px;
    padding: 1rem 1.25rem;
    background: #1A1A1A;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--gray-400);
    pointer-events: auto;
    animation: toastSlideIn var(--transition) ease forwards;
}

.toast.toast-exiting {
    animation: toastSlideOut var(--transition-fast) ease forwards;
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.125rem;
}

.toast-message {
    font-size: 0.8125rem;
    color: #9CA3AF;
    line-height: 1.5;
}

.toast-close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.toast-close:hover {
    background: rgba(255,255,255,0.06);
    color: #9CA3AF;
}

/* Toast variants */
.toast-success {
    border-left-color: var(--success);
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error {
    border-left-color: var(--error);
}

.toast-error .toast-icon {
    color: var(--error);
}

.toast-info {
    border-left-color: var(--primary);
}

.toast-info .toast-icon {
    color: var(--primary);
}

.toast-warning {
    border-left-color: var(--accent);
}

.toast-warning .toast-icon {
    color: var(--accent);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* --------------------------------------------------------------------------
   11. Loading Spinner
   -------------------------------------------------------------------------- */
.spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spinnerRotate 0.7s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

.spinner-white {
    border-color: rgba(255, 255, 255, 0.25);
    border-top-color: var(--white);
}

/* Spinner overlay */
.spinner-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(4px);
}

.spinner-overlay .spinner-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #9CA3AF;
}

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

/* Skeleton loading placeholder */
.skeleton {
    background: linear-gradient(90deg, #1A1A1A 25%, #222222 50%, #1A1A1A 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-sm);
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-heading {
    height: 1.5em;
    width: 50%;
    margin-bottom: 1rem;
}

.skeleton-img {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   Additional Components: Badge & Tag
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.badge-accent {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-dark);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.badge-gray {
    background: rgba(255,255,255,0.06);
    color: #9CA3AF;
}

/* --------------------------------------------------------------------------
   Section Heading Pattern
   -------------------------------------------------------------------------- */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.section-label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.0625rem;
    color: var(--gray-500);
}

/* --------------------------------------------------------------------------
   12. Responsive Breakpoints
   -------------------------------------------------------------------------- */

/* Tablet: up to 1024px */
@media (max-width: 1280px) {
    :root {
        --section-padding: 64px;
    }
}

@media (max-width: 1024px) {
    :root {
        --section-padding: 56px;
    }

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

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

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

/* Mobile: up to 768px */
@media (max-width: 768px) {
    :root {
        --section-padding: 48px;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Navigation: switch to mobile menu */
    .main-nav,
    .nav-cta-desktop {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-inner {
        height: 64px;
    }

    .mobile-nav {
        inset-top: 64px;
    }

    /* Grid collapses to single column */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .grid-auto {
        grid-template-columns: 1fr;
    }

    /* Footer stacks to single column */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-brand {
        max-width: none;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
    }

    /* Section header */
    .section-header {
        margin-bottom: 2rem;
    }

    /* Toast becomes full-width on mobile */
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }

    /* Buttons stack on small screens */
    .btn-group-mobile-stack {
        flex-direction: column;
    }

    .btn-group-mobile-stack .btn {
        width: 100%;
    }
}

/* Small mobile: up to 480px */
@media (max-width: 480px) {
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .card-body {
        padding: 1.25rem;
    }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .site-header,
    .site-footer,
    .skip-to-content,
    .toast-container,
    .spinner-overlay {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}
