/* AgendaFull - Modern CSS Framework */

/* ==================== VARIABLES ==================== */
:root {
    /* "Midnight Glass" Dark Premium Theme */
    --primary: #6366f1;
    /* Indigo-500: Electric Primary key */
    --primary-dark: #4338ca;
    /* Indigo-700 */
    --secondary: #ec4899;
    /* Pink-500: Vibrant Accent */

    /* Deep Dark Gradients */
    --gradient-primary: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    /* Slate to Deep Indigo */
    --gradient-accent: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    /* Electric Gradient */

    --accent: #22d3ee;
    /* Cyan-400: Tech Glow */

    /* Dark Mode Neutrals */
    --bg-body: #0f172a;
    /* Slate-900: Deepest Background */
    --bg-surface: #1e293b;
    /* Slate-800: Card Background */
    --bg-glass: rgba(30, 41, 59, 0.7);
    /* Glassy Surface */

    --text-main: #f8fafc;
    /* Slate-50: Primary Text */
    --text-muted: #94a3b8;
    /* Slate-400: Secondary Text */
    --text-inverse: #0f172a;
    /* Dark text for light buttons */

    /* Legacy Grays Mapping for Compatibility */
    --gray-50: #1e293b;
    --gray-100: #334155;
    --gray-200: #475569;
    --gray-300: #64748b;
    --gray-400: #94a3b8;
    --gray-500: #cbd5e1;
    --gray-600: #e2e8f0;
    --gray-700: #f1f5f9;
    --gray-800: #f8fafc;
    --gray-900: #ffffff;
    /* Invert for dark mode usage */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Borders */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    --border-color: rgba(255, 255, 255, 0.1);

    /* Shadows (Adapted for Dark) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    --glow-primary: 0 0 20px rgba(99, 102, 241, 0.3);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    transition: var(--transition-base);
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: var(--transition-base);
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ==================== UTILITIES ==================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: all 0.6s;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: scale(0.95);
}

/* Optional: Ripple effect overlay could be added here if we had JS, 
   but for pure CSS, active state scale is the requested "movement" */

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.5);
    /* Matching #6366f1 shadow */
}

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

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

.btn-white:hover {
    background: var(--gray-50);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ==================== NAVBAR ==================== */
.navbar {
    background: var(--gradient-primary);
    padding: 1rem 0;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px var(--accent);
}

.nav-links a:hover {
    color: white;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

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

.nav-links a:active {
    transform: scale(0.95);
    color: var(--accent);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 1.5rem;
    height: 2px;
    background: var(--gray-900);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}

/* ==================== HERO ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    opacity: 0.05;
    z-index: -1;
}

.hero-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
}

.hero-content {
    text-align: center;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--gray-600);
    margin-bottom: var(--spacing-2xl);
    line-height: 1.6;
}

.hero-search {
    display: flex;
    gap: var(--spacing-md);
    max-width: 600px;
    margin: 0 auto;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.85);
    /* Semi-transparent */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 0.5rem;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.15);
}

.search-input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

.search-input:focus {
    box-shadow: none;
}

/* ==================== SECTIONS ==================== */
.categories-section,
.featured-section,
.how-it-works {
    padding: var(--spacing-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* ==================== CATEGORIES LIST (New) ==================== */
/* ==================== CATEGORIES (Modern Dark Grid) ==================== */
.categories-columns-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.column-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    /* Electric Blue Title */
    text-transform: uppercase;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    list-style: none;
    padding: 0;
}

.category-list li {
    margin: 0;
}

.category-list a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 600;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), rgba(30, 41, 59, 0.4));
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-xl);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.category-list a:hover {
    background: var(--primary);
    color: white;
    transform: translateX(8px);
    box-shadow: var(--glow-primary);
    border-color: var(--primary);
}

.category-list .icon {
    margin-right: 1.25rem;
    font-size: 1.5rem;
    width: 32px;
    text-align: center;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

/* Clear old grids if needed or keep for reference */

/* ==================== CATEGORIES ==================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.category-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    transition: all var(--transition-base);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--glow-primary);
}

.category-card:active {
    transform: scale(0.98);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md);
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.category-card p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ==================== BUSINESSES ==================== */
.businesses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.business-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
    cursor: pointer;
}

.business-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
    object-fit: cover;
    opacity: 0.8;
}

.business-info {
    padding: var(--spacing-lg);
}

.business-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.business-category {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.business-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--warning);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
}

.business-description {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ==================== STEPS ==================== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
}

.step-card {
    text-align: center;
    padding: var(--spacing-xl);
}

.step-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 auto var(--spacing-lg);
}

.step-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.step-card p {
    color: var(--gray-600);
    font-size: 1rem;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 1;
    /* Fallback to visible to solve 'not seen' issue immediately */
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.pending {
    opacity: 0;
    transform: translateY(30px);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: var(--spacing-3xl) 0;
    color: white;
}

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

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
}

/* ==================== FOOTER ==================== */
.footer {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #e2e8f0;
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-xl);
}

.footer-brand p {
    color: #94a3b8;
    margin-top: var(--spacing-sm);
    font-size: 0.95rem;
}

.footer-column h4 {
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: #f1f5f9;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-column a {
    display: block;
    color: #94a3b8;
    margin-bottom: var(--spacing-sm);
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    padding-left: 0;
}

.footer-column a:hover {
    color: #6366f1;
    padding-left: 4px;
    transform: translateX(2px);
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    padding-top: var(--spacing-lg);
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

/* ==================== MODAL ==================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    /* Midnight Glass Modal */
    background: var(--bg-surface);
    color: var(--text-main);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    width: 100%;
    max-width: 380px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

.modal-large {
    max-width: 800px;
}

.modal-close {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gray-200);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== TIME SLOTS ==================== */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
}

.time-slot {
    padding: var(--spacing-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.time-slot:hover:not(.disabled) {
    border-color: var(--primary);
    background: var(--gray-50);
}

.time-slot.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.time-slot.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

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

    .hero-search {
        flex-direction: column;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .categories-grid,
    .businesses-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile Menu Active State */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: var(--spacing-md);
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-xl);
        gap: var(--spacing-md);
        animation: slideDown 0.3s ease-out;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}