/* Fonts Setup */
/* Note: OpenDyslexic serves via CDN or local assets in production. For now assuming system fonts or link in header. */

/* Brand Gradient Text Utility */
.text-gradient-brand {
    background: linear-gradient(90deg, var(--clr-blurple-start) 0%, var(--clr-magenta-mid) 50%, var(--clr-coral-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-brand {
    background: linear-gradient(90deg, var(--clr-blurple-start) 0%, var(--clr-magenta-mid) 50%, var(--clr-coral-end) 100%);
    color: white;
}

/* Buttons - Pill Style (from mockups) */
.btn-neuro,
.btn-gradient {
    background: linear-gradient(135deg, var(--clr-blurple-start) 0%, var(--clr-magenta-mid) 50%, var(--clr-coral-end) 100%);
    color: white !important;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(217, 66, 85, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-neuro::before,
.btn-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--clr-coral-end) 0%, var(--clr-magenta-mid) 50%, var(--clr-blurple-start) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-neuro:hover,
.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 66, 85, 0.4);
    color: white;
}

.btn-neuro:hover::before,
.btn-gradient:hover::before {
    opacity: 1;
}

.btn-neuro span,
.btn-gradient span,
.btn-neuro a,
.btn-gradient a {
    position: relative;
    z-index: 1;
}

[data-theme="muted"] .btn-neuro:hover,
[data-theme="muted"] .btn-gradient:hover {
    transform: none;
    box-shadow: none;
}

.btn-neuro-outline {
    background-color: transparent;
    border: 2px solid var(--clr-primary);
    color: var(--clr-primary);
    padding: 12px 24px;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-neuro-outline:hover {
    background-color: var(--clr-primary);
    color: white;
}

/* Warning button (waitlist, alerts) */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white !important;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    opacity: 0.9;
}

/* Danger outline button (cancelar, eliminar) */
.btn-danger-outline {
    background: transparent;
    border: 2px solid #ef4444;
    color: #ef4444 !important;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-danger-outline:hover {
    background: #ef4444;
    color: white !important;
}

/* Disabled state for all buttons */
.btn-neuro:disabled,
.btn-gradient:disabled,
.btn-neuro-outline:disabled,
.btn-warning:disabled,
.btn-danger-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    pointer-events: none;
}

/* Tab Buttons */
.tab-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-button:hover {
    color: var(--primary);
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 700;
}

.tab-button .material-symbols-outlined {
    font-size: 1.25rem;
}


/* Pill button helper class */
.btn-pill {
    border-radius: 50px !important;
    padding: 10px 24px;
    font-weight: 500;
}

/* Card Styling (matching mockups) */
.card-neuro {
    border: none;
    border-radius: 1rem;
    /* 16px */
    background: var(--clr-surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    /* Subtle shadow from mockup */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-neuro:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

[data-theme="muted"] .card-neuro {
    box-shadow: none;
    border: 1px solid #ddd;
}

/* Pastel Tag System (from mockups) */
.tag-pastel {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.tag-pastel-peach {
    background: #FFE4D6;
    color: #8B4513;
    border-color: #FFD4BE;
}

.tag-pastel-lavender {
    background: #E6E6FA;
    color: #4B0082;
    border-color: #D8D8F0;
}

.tag-pastel-mint {
    background: #D5F4E6;
    color: #2D5F3F;
    border-color: #C0EBD7;
}

.tag-pastel-pink {
    background: #FFE4E1;
    color: #C71585;
    border-color: #FFD5D2;
}

.tag-pastel-blue {
    background: #E0F2FE;
    color: #0369A1;
    border-color: #BAE6FD;
}

.tag-pastel-purple {
    background: #F3E8FF;
    color: #7C3AED;
    border-color: #E9D5FF;
}

/* Badge overrides for consistency */
.badge.rounded-pill {
    padding: 6px 16px;
    font-weight: 500;
}

/* Navbar */
.navbar-neuro {
    background-color: var(--clr-surface);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.nav-link {
    color: var(--clr-text-main) !important;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--clr-coral-end) !important;
}

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

/* Social Media Embeds */
.embed-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Utility: Soft background */
.bg-soft {
    background-color: #F8F9FA;
}

/* Consistent spacing from mockups */
.section-spacing {
    padding: 80px 0;
}

.card-gap {
    gap: 24px;
}

/* Circle avatar for professionals */
.avatar-circle {
    border-radius: 50%;
    object-fit: cover;
}

/* Professional card specific */
.professional-card {
    text-align: center;
}

.professional-card .avatar-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
}

.professional-card .btn-group-vertical {
    gap: 8px;
}

/* Image aspect ratio helpers */
.ratio-16x9 {
    aspect-ratio: 16/9;
    object-fit: cover;
}

.ratio-4x3 {
    aspect-ratio: 4/3;
    object-fit: cover;
}

.ratio-1x1 {
    aspect-ratio: 1/1;
    object-fit: cover;
}


/* Instagram/TikTok (Vertical/Square) */
.embed-social-vertical {
    max-width: 350px;
    /* Typical mobile width */
    margin: 0 auto;
    border: 1px solid #ddd;
}

/* =========================================
   RESPONSIVE FIXES & GLOBAL RESETS
   ========================================= */

/* Ensure media doesn't overflow */
img,
video,
iframe,
svg {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scroll on mobile */
html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* Fix large typography on small screens */
@media (max-width: 640px) {
    .text-4xl {
        font-size: 2rem !important;
        line-height: 2.25rem !important;
    }

    .text-5xl {
        font-size: 2.25rem !important;
        line-height: 2.5rem !important;
    }

    .text-6xl {
        font-size: 2.5rem !important;
        line-height: 1.1 !important;
    }

    /* Adjust container padding if needed */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Safe table scrolling */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Utility to hide scrollbars but keep functionality */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}