/* ========================================
   MEDICARE RESERVATIONS - BASE STYLES
   Sistema de Reservas Premium para Clinicas
   ======================================== */

/* ========== GOOGLE FONTS ========== */
@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Manrope:wght@300;400;500;600;700&display=swap');

/* ========== CSS VARIABLES - LUXURY THEME ========== */
:root {
    /* Primary Colors - Gold & Black */
    --luxury-black: #0b1118;
    --luxury-charcoal: #111a24;
    --luxury-dark: #182231;
    --luxury-gray: #223044;
    --luxury-light-gray: #2a3a52;

    /* Gold Palette */
    --gold-primary: #2dd4bf;
    --gold-light: #7ae7db;
    --gold-dark: #14b8a6;
    --gold-muted: #4bb7aa;
    --champagne: #dff7f3;
    --gold-gradient: linear-gradient(135deg, #2dd4bf 0%, #0ea5e9 50%, #2dd4bf 100%);

    /* Accent Colors */
    --burgundy: #1f2937;
    --burgundy-light: #334155;
    --emerald: #22c55e;
    --navy: #0f172a;

    /* Text Colors */
    --text-white: #ffffff;
    --text-light: #f5f7fb;
    --text-muted: #98a6b7;
    --text-dark: #1f2937;

    /* Backgrounds */
    --bg-primary: var(--luxury-black);
    --bg-secondary: var(--luxury-charcoal);
    --bg-card: var(--luxury-dark);
    --bg-input: var(--luxury-gray);
    --bg-glass: rgba(17, 26, 36, 0.85);

    /* Borders */
    --border-subtle: rgba(45, 212, 191, 0.12);
    --border-gold: rgba(45, 212, 191, 0.35);
    --border-light: rgba(255, 255, 255, 0.1);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.6);
    --shadow-gold: 0 4px 20px rgba(45, 212, 191, 0.28);
    --shadow-gold-lg: 0 8px 40px rgba(45, 212, 191, 0.4);

    /* Typography */
    --font-heading: 'Marcellus', 'Times New Roman', serif;
    --font-body: 'Manrope', 'Segoe UI', sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 600;
    --z-toast: 700;
}

/* ========== RESET & BASE ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-white);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--gold-light);
}

/* Gold text */
.text-gold {
    color: var(--gold-primary);
}

.text-gradient-gold {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== LAYOUT UTILITIES ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-lg {
    max-width: 1400px;
}

.container-sm {
    max-width: 800px;
}

/* 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; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--luxury-black);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
}

.btn-secondary:hover {
    background: var(--gold-primary);
    color: var(--luxury-black);
}

.btn-ghost {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-light);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: var(--radius-full);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== CARDS ========== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-gold);
    box-shadow: var(--shadow-lg);
}

.card-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.card-featured {
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-gold);
}

/* ========== FORM ELEMENTS ========== */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-4);
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: var(--text-base);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d4af37' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    padding-right: var(--space-10);
}

/* Checkbox & Radio Custom */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-gold);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    position: relative;
    appearance: none;
}

.form-check-input:checked {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
}

.form-check-input:checked::after {
    content: '\\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--luxury-black);
    font-size: 12px;
    font-weight: bold;
}

.form-check-label {
    font-size: var(--text-sm);
    color: var(--text-light);
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-full);
}

.badge-gold {
    background: var(--gold-gradient);
    color: var(--luxury-black);
}

.badge-success {
    background: var(--emerald);
    color: var(--text-white);
}

.badge-warning {
    background: var(--gold-muted);
    color: var(--luxury-black);
}

.badge-danger {
    background: var(--burgundy);
    color: var(--text-white);
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
}

/* ========== DIVIDERS ========== */
.divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-8) 0;
}

.divider-gold {
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.divider-vertical {
    width: 1px;
    height: 100%;
    background: var(--border-subtle);
}

/* ========== RATINGS ========== */
.rating {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.rating-star {
    color: var(--gold-primary);
    font-size: var(--text-lg);
}

.rating-star.empty {
    color: var(--luxury-light-gray);
}

.rating-value {
    font-weight: 600;
    color: var(--text-white);
    margin-left: var(--space-2);
}

.rating-count {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ========== PRICE DISPLAY ========== */
.price {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--gold-primary);
}

.price-currency {
    font-size: var(--text-sm);
    vertical-align: super;
}

.price-range {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--gold-primary);
}

.price-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--gold-primary);
}

.price-dot.inactive {
    background: var(--luxury-light-gray);
}

/* ========== AVATARS ========== */
.avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--border-gold);
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 96px; height: 96px; }

.avatar-group {
    display: flex;
}

.avatar-group .avatar {
    margin-left: -12px;
    border: 2px solid var(--bg-primary);
}

.avatar-group .avatar:first-child {
    margin-left: 0;
}

/* ========== LOADING STATES ========== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--luxury-gray) 25%,
        var(--luxury-light-gray) 50%,
        var(--luxury-gray) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--gold-primary);
    border-radius: var(--radius-full);
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* ========== MODALS ========== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.modal-title {
    font-size: var(--text-2xl);
}

.modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: toast-slide-in 0.3s ease;
}

.toast-success { border-left: 4px solid var(--emerald); }
.toast-error { border-left: 4px solid var(--burgundy); }
.toast-warning { border-left: 4px solid var(--gold-primary); }
.toast-info { border-left: 4px solid var(--navy); }

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== DECORATIVE ELEMENTS ========== */
.luxury-line {
    width: 60px;
    height: 2px;
    background: var(--gold-gradient);
    margin: var(--space-4) 0;
}

.luxury-line-center {
    margin: var(--space-4) auto;
}

.gold-border-top {
    border-top: 1px solid var(--border-gold);
}

.gold-border-bottom {
    border-bottom: 1px solid var(--border-gold);
}

/* Ornament decorations */
.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin: var(--space-6) 0;
}

.ornament::before,
.ornament::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.ornament-icon {
    color: var(--gold-primary);
    font-size: var(--text-xl);
}

/* ========== ANIMATIONS ========== */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-up {
    animation: fadeUp 0.5s ease forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scale-in {
    animation: scaleIn 0.3s ease forwards;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Hover animations */
.hover-lift {
    transition: transform var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-glow {
    transition: box-shadow var(--transition-normal);
}

.hover-glow:hover {
    box-shadow: var(--shadow-gold);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --text-3xl: 1.5rem;
    }

    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root {
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.375rem;
    }

    .container {
        padding: 0 var(--space-4);
    }

    .grid-cols-4,
    .grid-cols-3,
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .btn-lg {
        width: 100%;
    }

    .modal {
        width: 95%;
        padding: var(--space-6);
    }
}

@media (max-width: 480px) {
    :root {
        --text-5xl: 1.75rem;
        --text-4xl: 1.5rem;
    }

    .btn {
        padding: var(--space-3) var(--space-4);
    }
}

/* ========== SCROLLBAR CUSTOM ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--luxury-charcoal);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-muted);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}

/* ========== SELECTION ========== */
::selection {
    background: var(--gold-primary);
    color: var(--luxury-black);
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }

.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.tracking-wide { letter-spacing: 1px; }
.tracking-wider { letter-spacing: 2px; }

.m-0 { margin: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.my-8 { margin-top: var(--space-8); margin-bottom: var(--space-8); }

.p-0 { padding: 0; }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

.pointer-events-none { pointer-events: none; }
.cursor-pointer { cursor: pointer; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
