:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --bg: #030712;
    --card-bg: rgba(17, 24, 39, 0.8);
    --text: #f3f4f6;
    --text-dim: #9ca3af;
    --accent: #fbbf24;
    --glass: rgba(3, 7, 18, 0.85);
    /* Slightly more opaque for better perf */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --success: #10b981;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Hero Image Background Effect */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(rgba(3, 7, 18, 0.7), rgba(3, 7, 18, 1)), url('../shared/images/atendendo.jpeg') center/cover no-repeat;
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

/* Navigation - Floating Pill */
nav {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(8px);
    padding: 0.7rem 1.5rem;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    width: max-content;
    max-width: 95vw;
}

.nav-links {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    transition: var(--transition);
}

nav a:hover,
nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
    color: var(--text);
}

h1 {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
}

.hero-logo-profile {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    margin-bottom: 2rem;
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.4);
    object-fit: cover;
}

.hero-title-sub {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 700px;
    margin-bottom: 2.5rem;
}

.cta-main {
    background: var(--primary);
    color: #fff;
    padding: 1.1rem 2.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    display: inline-block;
}

.cta-main:hover {
    transform: translateY(-3px) scale(1.05);
    background: var(--primary-dark);
}

/* Sections */
section {
    padding: 6rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-desc {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Cards (Apps/Services) */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.app-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 2rem;
    border-radius: 24px;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(37, 99, 235, 0.15), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.app-card:hover::before {
    opacity: 1;
}

.app-card:hover {
    transform: translateY(-8px);
    border-color: rgba(37, 99, 235, 0.5);
    background: rgba(17, 24, 39, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.app-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.app-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #fff;
}

.app-card p {
    font-size: 0.95rem;
    color: var(--text-dim);
}

/* Booking Widget - Dark Mode Adaptation */
.widget-container {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--accent);
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 1rem;
}

.slot-btn {
    padding: 10px 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.slot-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.slot-btn.selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
}

.loc-details {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    margin-top: 10px;
    font-size: 0.95rem;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.map-link {
    color: var(--primary);
    text-decoration: underline;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 1.5rem 2rem;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 1rem;
}

/* Week Pills */
.week-pills-container {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    margin-top: 10px;
}

.pill-day {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    cursor: default;
    transition: all 0.2s;
}

.pill-day.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Date Chips */
.date-chips-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(255, 255, 255, 0.1);
}

.date-chips-container::-webkit-scrollbar {
    height: 6px;
}

.date-chips-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.date-chip {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.date-chip:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: var(--primary);
    color: white;
}

.date-chip.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

/* App Promo Banner */
#app-promo-banner strong {
    font-size: 1rem;
}

/* Select Group Styling */
optgroup {
    color: #000;
    background: #fff;
    font-weight: bold;
}

option {
    color: #000;
    padding: 5px;
}

/* Animations & New Layouts */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.slide-in-up {
    animation: slideUp 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

@media(min-width: 600px) {
    .input-grid {
        grid-template-columns: 1fr 1fr;
    }

    #user-name {
        grid-column: 1 / -1;
    }
}

.summary-box {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--primary);
    padding: 1.5rem;
    border-radius: 16px;
    margin-top: 2rem;
    color: #e2e8f0;
}

.summary-box h4 {
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    color: #fff;
}

.warning-box {
    margin-top: 1rem;
    background: rgba(251, 191, 36, 0.1);
    border-left: 4px solid var(--accent);
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #fcd34d;
}

.badge-price {
    background: var(--success);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-left: 10px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}