/**
 * Aspire Wellness - Main Stylesheet
 * A custom WordPress theme for physiotherapy and wellness clinic
 *
 * Table of Contents:
 * 1. Variables - CSS Custom Properties
 * 2. Base - Reset and foundational styles
 * 3. Components - Reusable UI components
 * 4. Layout - Header, Footer, Sidebar
 * 5. Pages - Page-specific styles
 * 6. Utilities - Helper classes
 */

/* ==========================================================================
   1. VARIABLES
   ========================================================================== */
@import url('variables.css');

/* ==========================================================================
   2. BASE
   ========================================================================== */
@import url('base.css');

/* ==========================================================================
   3. COMPONENTS
   ========================================================================== */
@import url('components/buttons.css');
@import url('components/cards.css');
@import url('components/forms.css');
@import url('components/navigation.css');
@import url('components/google-reviews.css');

/* ==========================================================================
   4. LAYOUT
   ========================================================================== */
@import url('layout/header.css');
@import url('layout/footer.css');

/* ==========================================================================
   5. PAGES
   ========================================================================== */
@import url('pages/pages.css');
@import url('pages/home.css');
@import url('pages/blog.css');
@import url('pages/events.css');
@import url('pages/corporate.css');
@import url('pages/careers.css');
@import url('pages/policy.css');

/* ==========================================================================
   6. ADDITIONAL COMPONENTS
   ========================================================================== */

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--overlay-dark);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    background-color: var(--neutral-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    border-bottom: 1px solid var(--neutral-gray-200);
}

.modal-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin: 0;
}

.modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--neutral-gray-500);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--neutral-gray-100);
    color: var(--neutral-gray-800);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-6);
    border-top: 1px solid var(--neutral-gray-200);
}

/* ===== TOAST / NOTIFICATION ===== */
.toast-container {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-tooltip);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background-color: var(--neutral-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform var(--transition-base);
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--neutral-gray-800);
}

.toast-message {
    font-size: var(--text-sm);
    color: var(--neutral-gray-600);
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
    color: var(--neutral-gray-400);
}

.toast-close:hover {
    color: var(--neutral-gray-600);
}

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

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

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

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

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--neutral-gray-200);
    border-top-color: var(--primary-coral);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

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

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

/* Page loading overlay */
.page-loading {
    position: fixed;
    inset: 0;
    background-color: var(--neutral-white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-tooltip);
}

/* ===== BADGE ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-coral {
    background-color: var(--overlay-coral);
    color: var(--primary-coral-dark);
}

.badge-success {
    background-color: var(--accent-success-light);
    color: var(--accent-success);
}

.badge-warning {
    background-color: var(--accent-warning-light);
    color: var(--accent-warning);
}

.badge-error {
    background-color: var(--accent-error-light);
    color: var(--accent-error);
}

.badge-dark {
    background-color: var(--secondary-charcoal);
    color: var(--neutral-white);
}

/* ===== TOOLTIP ===== */
.tooltip {
    position: relative;
}

.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: var(--space-2) var(--space-3);
    background-color: var(--secondary-charcoal);
    color: var(--neutral-white);
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: var(--z-tooltip);
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--secondary-charcoal);
}

.tooltip:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* ===== AVATAR ===== */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    overflow: hidden;
    background-color: var(--neutral-gray-200);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-md {
    width: 48px;
    height: 48px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

.avatar-xl {
    width: 96px;
    height: 96px;
}

.avatar-initials {
    font-weight: var(--font-semibold);
    color: var(--neutral-gray-600);
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: var(--space-6);
    right: var(--space-6);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--neutral-white);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--neutral-white);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: var(--space-6);
}

.lightbox-next {
    right: var(--space-6);
}

/* ===== WHATSAPP FLOATING BUTTON ===== */
.whatsapp-float {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-fixed);
}

.whatsapp-float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--accent-whatsapp);
    color: var(--neutral-white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    overflow: hidden;
}

.whatsapp-float-btn:hover {
    background-color: var(--accent-whatsapp-dark);
    transform: scale(1.1);
    color: var(--neutral-white);
}

.whatsapp-float-btn svg {
    width: 32px;
    height: 32px;
}

/* Pulse animation */
.whatsapp-float-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    background-color: var(--accent-whatsapp);
    animation: whatsappPulse 2s ease-out infinite;
    z-index: -1;
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .site-header,
    .site-footer,
    .whatsapp-float,
    .back-to-top,
    .mobile-navigation {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

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

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

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
