/* ===================================================================
   Twacha Laser Clinic - Custom Styles
   Medical-grade professional design with Bootstrap 5
   =================================================================== */

/* ===================================================================
   1. CSS VARIABLES & ROOT STYLES
   =================================================================== */
:root {
    /* Modern Dermatology Color Palette - Inspired by Leading Clinics */
    --primary-color: #1e40af;      /* Deep Professional Blue */
    --secondary-color: #059669;    /* Calming Medical Green */
    --accent-color: #7c3aed;       /* Sophisticated Purple */
    --tertiary-color: #0891b2;     /* Soft Teal */
    --success-color: #10b981;      /* Success Green */
    --warning-color: #f59e0b;      /* Warm Amber */
    --danger-color: #ef4444;       /* Medical Red */
    --info-color: #3b82f6;        /* Info Blue */
    
    /* Neutral Colors - Premium Medical */
    --white: #ffffff;
    --off-white: #fefefe;
    --light-gray: #f9fafb;
    --soft-gray: #f3f4f6;
    --medium-gray: #6b7280;
    --dark-gray: #374151;
    --charcoal: #1f2937;
    --text-muted: #6b7280;
    
    /* Professional Medical Gradients */
    --primary-gradient: linear-gradient(135deg, var(--primary-color), var(--tertiary-color));
    --secondary-gradient: linear-gradient(135deg, var(--secondary-color), var(--success-color));
    --accent-gradient: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    --hero-gradient: linear-gradient(135deg, rgba(30, 64, 175, 0.9), rgba(123, 58, 237, 0.8));
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --section-padding: 5rem 0;
    --container-padding: 1.5rem;
    
    /* Border Radius */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* ===================================================================
   2. BRAND LOGO STYLES
   =================================================================== */
.brand-logo {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
}

.brand-logo i {
    transition: all var(--transition-normal);
}

.navbar-brand:hover .brand-logo i {
    transform: scale(1.1);
}

.brand-text {
    line-height: 1.2;
}

/* ===================================================================
   3. TYPOGRAPHY
   =================================================================== */
body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.65;
    color: var(--charcoal);
    background-color: var(--off-white);
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.display-4, .display-5 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--medium-gray);
}

.text-muted {
    color: var(--text-muted) !important;
}

/* ===================================================================
   3. NAVIGATION STYLES
   =================================================================== */
.navbar {
    transition: all var(--transition-normal);
    padding: 1rem 0;
    background-color: var(--white) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.navbar-brand:hover {
    color: var(--accent-color) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark-gray) !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(37, 99, 235, 0.1);
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
    transform: translateX(-50%);
    border-radius: 1px;
}

/* Navbar Toggle */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ===================================================================
   4. BUTTON STYLES
   =================================================================== */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    border: 2px solid var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.btn-success {
    background: var(--success-gradient);
    border: 2px solid var(--secondary-color);
    color: var(--white);
}

.btn-success:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: var(--white);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
    transform: translateY(-2px);
}

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

/* Button Loading State */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================================================
   5. HERO SECTION
   =================================================================== */
.hero-section {
    position: relative;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hero-gradient);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section h2 {
        font-size: 1.5rem;
    }
}

/* ===================================================================
   6. CARD COMPONENTS
   =================================================================== */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-normal);
    overflow: hidden;
    background: var(--white);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.service-card,
.treatment-card,
.testimonial-card {
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover .service-icon i {
    transform: scale(1.1);
    color: var(--primary-color);
}

.service-icon i,
.treatment-icon i,
.feature-icon i {
    transition: all var(--transition-normal);
}

/* ===================================================================
   7. FORM STYLES
   =================================================================== */
.form-control,
.form-select {
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    background-color: var(--white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
    background-color: var(--white);
}

.form-label {
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

/* Form Validation */
.is-invalid {
    border-color: var(--danger-color);
}

.is-valid {
    border-color: var(--success-color);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ===================================================================
   8. SECTION STYLES
   =================================================================== */
section {
    padding: var(--section-padding);
}

.page-header {
    padding: 8rem 0 4rem 0;
    background: linear-gradient(135deg, var(--light-gray), #e2e8f0);
    margin-top: 76px;
}

.bg-light {
    background-color: var(--light-gray) !important;
}

.bg-primary {
    background: var(--primary-gradient) !important;
}

/* ===================================================================
   9. CAROUSEL STYLES
   =================================================================== */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(37, 99, 235, 0.8);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
}

.carousel-indicators [data-bs-target] {
    background-color: var(--primary-color);
    border-radius: 50%;
    width: 12px;
    height: 12px;
}

/* ===================================================================
   10. TESTIMONIAL STYLES
   =================================================================== */
.testimonial-stars {
    font-size: 1.25rem;
}

.testimonial-avatar {
    font-size: 1.25rem;
    font-weight: 600;
}

.quick-testimonial {
    transition: all var(--transition-normal);
}

.quick-testimonial:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ===================================================================
   11. TREATMENT TAB STYLES
   =================================================================== */
.nav-pills .nav-link {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: var(--medium-gray);
    margin: 0 0.5rem 0.5rem 0;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-pills .nav-link.active {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-pills .nav-link:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===================================================================
   12. FOOTER STYLES
   =================================================================== */
footer {
    background: linear-gradient(135deg, #1e293b, #334155) !important;
    color: var(--white);
}

footer h5, footer h6 {
    color: var(--white);
}

footer .text-success {
    color: var(--secondary-color) !important;
}

footer a {
    transition: all var(--transition-fast);
}

footer a:hover {
    color: var(--secondary-color) !important;
    transform: translateX(3px);
}

/* ===================================================================
   13. UTILITY CLASSES
   =================================================================== */
.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--secondary-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Rounded Corners */
.rounded {
    border-radius: var(--border-radius-md) !important;
}

.rounded-lg {
    border-radius: var(--border-radius-lg) !important;
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.6s ease-out;
}

/* ===================================================================
   15. LOADING STATES
   =================================================================== */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===================================================================
   16. RESPONSIVE DESIGN
   =================================================================== */
@media (max-width: 1200px) {
    .hero-section h1 {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 60px;
        min-height: 80vh;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section h2 {
        font-size: 1.25rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .page-header {
        padding: 6rem 0 3rem 0;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .nav-pills .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section h2 {
        font-size: 1.125rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* ===================================================================
   17. ACCESSIBILITY IMPROVEMENTS
   =================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-outline-primary {
        border-width: 3px;
    }
    
    .form-control,
    .form-select {
        border-width: 2px;
    }
}

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

/* ===================================================================
   18. PRINT STYLES
   =================================================================== */
@media print {
    .navbar,
    .btn,
    footer,
    .carousel-control-prev,
    .carousel-control-next {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .card {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}
