/**
 * Custom CSS for Barbershop website
 * This file contains all custom styles extracted from HTML templates
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

:root {
    --primary-color: #d4af37;
    --secondary-color: #2c3e50;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 8px;
    --box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-pattern.png') repeat;
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons .btn {
    margin: 0.5rem;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

/* ==========================================================================
   Card Components
   ========================================================================== */

/* Selection Cards */
.selection-card {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: var(--transition);
    background: white;
    position: relative;
    overflow: hidden;
}

.selection-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

.selection-card:hover::before {
    left: 100%;
}

.selection-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.selection-card.active {
    border-color: var(--primary-color);
    background-color: rgba(212, 175, 55, 0.05);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.selection-card .card-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.selection-card .card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.selection-card .card-description {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Testimonial Cards */
.testimonial-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.testimonial-content {
    margin-bottom: 1.5rem;
    position: relative;
}

.testimonial-content .fa-quote-left {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.7;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author-info h6 {
    margin: 0;
    font-weight: 600;
    color: var(--secondary-color);
}

.testimonial-author-info small {
    color: #6c757d;
}

/* ==========================================================================
   Form Components
   ========================================================================== */

/* Custom File Upload */
.custom-file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-file-upload .btn {
    width: 100%;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.file-preview {
    margin-top: 1rem;
    padding: 1rem;
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius);
    text-align: center;
    background-color: #f8f9fa;
}

.file-preview img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* Rating Stars */
.rating-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.rating-stars .star {
    font-size: 1.5rem;
    color: #dee2e6;
    cursor: pointer;
    transition: var(--transition);
}

.rating-stars .star:hover,
.rating-stars .star.hover {
    color: #ffc107;
    transform: scale(1.1);
}

.rating-stars .star.active {
    color: #ffc107;
}

/* Form Validation */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

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

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

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   Notification Components
   ========================================================================== */

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    pointer-events: none;
}

.notification-item {
    pointer-events: auto;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: none;
    border-radius: var(--border-radius);
    animation: slideInRight 0.3s ease-out;
}

.notification-item.fade-out {
    animation: slideOutRight 0.3s ease-in;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ==========================================================================
   Map Components
   ========================================================================== */

.map-search-container {
    margin-bottom: 1rem;
}

.map-search-container .input-group {
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.barbershop-popup {
    min-width: 250px;
}

.barbershop-popup h6 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.barbershop-popup .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    margin-right: 0.5rem;
}

/* Leaflet Custom Controls */
.leaflet-control-custom {
    background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
}

.leaflet-control-custom button {
    width: 100%;
    height: 100%;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
}

.leaflet-control-custom button:hover {
    background-color: #f4f4f4;
}

/* ==========================================================================
   Animation Components
   ========================================================================== */

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--box-shadow);
}

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

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Lazy Loading */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Text Utilities */
.text-primary-custom {
    color: var(--primary-color) !important;
}

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

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

/* Spacing Utilities */
.section-padding {
    padding: 80px 0;
}

.section-margin {
    margin: 80px 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .selection-card {
        padding: 1rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .notification-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .section-margin {
        margin: 60px 0;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .notification-container,
    .back-to-top,
    .hero-section,
    .map-search-container {
        display: none !important;
    }
    
    .selection-card,
    .testimonial-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
