/* ============================================
   COSTI MOBILE BARBER - GLOBAL STYLES
   Premium Dark Theme with Gold Accents
   ============================================ */

/* CSS Custom Properties (Variables) */
:root {
    /* Colors */
    --bg-primary: #0a0a0c;
    --bg-secondary: #111216;
    --bg-card: #1a1b20;
    --bg-hover: #23252b;
    --accent-gold: #c9a053;
    --accent-gold-hover: #b08a45;
    --accent-gold-light: #e0c485;
    --text-light: #f8f9fa;
    --text-muted: #9ca3af;
    --text-dark: #111827;
    --success: #198754;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #0dcaf0;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Borders & Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --border-radius-full: 50%;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.25);
    --shadow-glow: 0 0 20px rgba(201, 160, 83, 0.3);
    
    /* Transitions */
    --transition-fast: all 0.15s ease-in-out;
    --transition-normal: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-slow: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    
    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
    --z-overlay: 1070;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-light);
    line-height: 1.6;
    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.3;
    margin-bottom: var(--spacing-md);
    color: var(--text-light);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; font-weight: 500; }

p { margin-bottom: var(--spacing-md); }

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-gold-light);
    text-decoration: none;
}

/* Lists */
ul, ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

li { margin-bottom: var(--spacing-xs); }

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius-md);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text Utilities */
.font-serif { font-family: var(--font-heading); }
.font-mono { font-family: var(--font-mono); }
.text-gold { color: var(--accent-gold) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-light { color: var(--text-light) !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.tracking-wide { letter-spacing: 2px; }
.tracking-tight { letter-spacing: -0.5px; }

/* Background Utilities */
.bg-darkest { background-color: var(--bg-primary) !important; }
.bg-darker { background-color: var(--bg-secondary) !important; }
.bg-dark { background-color: var(--bg-card) !important; }
.bg-gold { background-color: var(--accent-gold) !important; }

/* Spacing Utilities */
.py-7 { padding-top: 6rem !important; padding-bottom: 6rem !important; }
.py-8 { padding-top: 8rem !important; padding-bottom: 8rem !important; }
.my-7 { margin-top: 6rem !important; margin-bottom: 6rem !important; }

/* Grid Utilities */
.grid-cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--spacing-lg); }
.grid-cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--spacing-lg); }
.grid-cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--spacing-lg); }

/* ============================================
   COMPONENT STYLES
   ============================================ */

/* Buttons - Enhanced */
.btn {
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
    border-radius: var(--border-radius-md);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::after {
    left: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-gold {
    background: var(--accent-gold);
    color: #000 !important;
    border-color: var(--accent-gold);
}

.btn-gold:hover,
.btn-gold:focus {
    background: transparent;
    color: var(--accent-gold) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-outline-gold {
    background: transparent;
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

.btn-outline-gold:hover,
.btn-outline-gold:focus {
    background: var(--accent-gold);
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-outline-light {
    background: transparent;
    color: var(--text-light);
    border-color: rgba(255,255,255,0.3);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background: rgba(255,255,255,0.1);
    border-color: var(--text-light);
    transform: translateY(-2px);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Cards - Enhanced */
.card,
.bg-dark,
.bg-darker {
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition-normal);
}

.card:hover,
.bg-dark:hover,
.bg-darker:hover {
    border-color: var(--accent-gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Form Elements - Enhanced */
.form-control,
.form-select {
    background-color: var(--bg-secondary);
    border: 1px solid #333;
    color: var(--text-light);
    padding: 0.85rem 1rem;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    transition: var(--transition-fast);
    width: 100%;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 0.25rem rgba(201, 160, 83, 0.25);
    color: #fff;
    background-color: var(--bg-hover);
    outline: none;
}

.form-control::placeholder,
.form-select:invalid {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger);
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--success);
}

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

.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated .form-select:invalid ~ .invalid-feedback {
    display: block;
}

/* Labels */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--text-light);
}

.form-label .text-danger {
    margin-left: 2px;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    padding: 1.2rem 0;
    background: transparent;
    transition: var(--transition-normal);
    z-index: var(--z-sticky);
}

.navbar.scrolled {
    background: rgba(10, 10, 12, 0.94);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.navbar-brand .text-gold {
    font-size: 1.8rem;
}

.nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    margin: 0 0.5rem;
    padding: 0.5rem 0;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: var(--transition-normal);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Slide Up Animation */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.5s ease-out forwards;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.bounce {
    animation: bounce 2s infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Shine Effect */
@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.shine::after {
    animation: shine 1.5s infinite;
}

/* Loader Animation */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: var(--z-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 3px;
}

/* ============================================
   FLOATING ELEMENTS
   ============================================ */

.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: var(--z-fixed);
    background: #25D366;
    color: #fff !important;
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: var(--transition-normal);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: #fff !important;
}

.whatsapp-float:active {
    transform: scale(0.95);
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: var(--z-fixed);
    background: var(--accent-gold);
    color: #000 !important;
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-full);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    background: var(--accent-gold-hover);
    box-shadow: var(--shadow-lg);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-md);
    border: 1px solid transparent;
    margin-bottom: var(--spacing-md);
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.alert-success {
    background: rgba(25, 135, 84, 0.15);
    border-color: var(--success);
    color: #75b798;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: var(--danger);
    color: #ea868f;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border-color: var(--warning);
    color: #ffd97d;
}

.alert-info {
    background: rgba(13, 202, 240, 0.15);
    border-color: var(--info);
    color: #8fe3f5;
}

.alert i {
    margin-right: 0.5rem;
    vertical-align: -2px;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-gold);
    color: #000;
    padding: 0.5rem 1rem;
    z-index: var(--z-overlay);
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only */
.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;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --accent-gold: #ffd700;
        --text-muted: #ccc;
    }
    
    .btn-gold,
    .btn-outline-gold {
        border-width: 3px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.9em;
    }
    
    .navbar,
    .footer,
    .whatsapp-float,
    .back-to-top,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .card,
    .bg-dark,
    .bg-darker {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

/* Hide on mobile */
.d-none-mobile {
    display: none;
}

@media (min-width: 768px) {
    .d-none-mobile {
        display: block;
    }
}

/* Hide on desktop */
.d-none-desktop {
    display: block;
}

@media (min-width: 992px) {
    .d-none-desktop {
        display: none;
    }
}

/* Text alignment responsive */
.text-center-mobile {
    text-align: center;
}

@media (min-width: 768px) {
    .text-center-mobile {
        text-align: left;
    }
}

/* ============================================
   MISCELLANEOUS ENHANCEMENTS
   ============================================ */

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img.loading {
    opacity: 0.5;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold-hover);
}

/* Selection color */
::selection {
    background: var(--accent-gold);
    color: #000;
}

/* Hover lift effect for interactive elements */
.hover-lift {
    transition: var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Gold border accent */
.border-gold {
    border-color: var(--accent-gold) !important;
}

.border-gold-top {
    border-top: 3px solid var(--accent-gold) !important;
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Blur backdrop */
.blur-backdrop {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

/* Tablet */
@media (max-width: 991.98px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-xxl: 2rem;
    }
    
    h1 { font-size: clamp(1.75rem, 6vw, 3rem); }
    h2 { font-size: clamp(1.5rem, 5vw, 2.25rem); }
    
    .py-7 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
    
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    :root {
        --spacing-lg: 1rem;
        --spacing-xl: 1.25rem;
    }
    
    body {
        font-size: 0.95rem;
    }
    
    h1 { font-size: clamp(1.5rem, 7vw, 2.5rem); }
    h2 { font-size: clamp(1.25rem, 6vw, 2rem); }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .whatsapp-float,
    .back-to-top {
        width: 48px;
        height: 48px;
        bottom: 1.5rem;
    }
    
    .whatsapp-float { left: 1.5rem; }
    .back-to-top { right: 1.5rem; }
}

/* Small Mobile */
@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        margin: 0 0.25rem;
    }
    
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 0.85rem;
    }
    
    .py-7 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}