/* Top Five Cuts - Premium Barber Shop Styles */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #d4af37;
    --accent-color: #8b7355;
    --text-color: #333;
    --text-light: #666;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

/* Enhanced Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.logo-image {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
    border-radius: 8px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    transition: var(--transition);
    line-height: 1;
}

.logo span {
    color: var(--secondary-color);
    font-weight: 700;
}

/* Logo hover effects */
.logo-container:hover .logo-image {
    transform: scale(1.05) rotate(2deg);
}

.logo-container:hover .logo {
    color: var(--secondary-color);
    transform: translateX(2px);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

nav a:hover {
    color: var(--secondary-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 4px;
}

.mobile-menu:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Enhanced Hero Section with Background Image */
.hero {
    background: 
        linear-gradient(135deg, rgba(26, 26, 26, 0.85) 0%, rgba(45, 45, 45, 0.8) 100%),
        url('https://i.imgur.com/QJA9Ptk.jpeg') no-repeat center center / cover;
    color: var(--white);
    padding: 150px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(212, 175, 55, 0.12) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    line-height: 1.6;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero .btn {
    animation: fadeInUp 0.8s ease-out 0.4s both;
    margin-top: 1rem;
}

/* Enhanced animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Styles */
.btn {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background: #b8941f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--background-light);
    transform: none;
    box-shadow: none;
}

/* Section Styles */
section {
    padding: 80px 0;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
}

/* Services Section - UPDATED WITH IMG TAGS */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--secondary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-img img {
    transform: scale(1.05);
}

.service-content {
    padding: 1.5rem;
}

.service-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.service-content p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Gallery Section */
.gallery {
    background: var(--background-light);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

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

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn .count {
    background: var(--primary-color);
    color: var(--white);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.filter-btn.active .count {
    background: var(--white);
    color: var(--primary-color);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--primary-color);
}

/* Enhanced Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    background-color: #f5f5f5;
}

.gallery-item img.loaded {
    opacity: 1;
    animation: fadeIn 0.5s ease;
}

.gallery-item img.lazy {
    opacity: 0;
    filter: blur(10px);
    transition: opacity 0.5s ease, filter 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Category Badges */
.category-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    z-index: 2;
}

.category-badge {
    background: rgba(212, 175, 55, 0.9);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateY(10px);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay-content {
    color: white;
    width: 100%;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.gallery-item:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.overlay-content p {
    margin-bottom: 1rem;
    opacity: 0.9;
    font-size: 0.95rem;
}

.view-btn {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.view-btn:hover {
    background: #b8941f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 2rem 0;
    grid-column: 1 / -1;
}

.load-more-btn {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.load-more-btn:hover {
    background: #b8941f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.load-more-btn .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.load-more-btn.loading .spinner {
    display: inline-block;
}

.load-more-btn.loading .btn-text {
    opacity: 0.7;
}

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

/* Gallery Loading States */
.gallery-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.gallery-loading .loading-spinner {
    margin: 0 auto 1rem;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    background: var(--background-light);
    border-radius: var(--border-radius);
}

.gallery-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    z-index: 2001;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
}

.lightbox-nav button {
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav button:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Lightbox Counter */
.lightbox-counter {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

/* Improved Loading States */
.image-loading, .image-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    color: #666;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(212, 175, 55, 0.3);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.image-error i {
    font-size: 2.5rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

/* Enhanced Focus Styles */
.gallery-item:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Booking Section */
.booking {
    background: var(--white);
}

.booking-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 2rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
    transition: var(--transition);
}

.step.active {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.step-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.booking-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    align-items: start;
}

.booking-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-control.error {
    border-color: #dc3545;
}

.field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.time-slots-container {
    margin: 2rem 0;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.time-slot {
    padding: 12px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.time-slot.available:hover {
    border-color: var(--secondary-color);
    background: rgba(212, 175, 55, 0.1);
}

.time-slot.selected {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--primary-color);
}

.time-slot.booked {
    background: var(--background-light);
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.6;
}

.form-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-navigation .btn {
    flex: 1;
}

/* Payment Styles */
.payment-options {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.payment-option:last-child {
    margin-bottom: 0;
}

.payment-option input[type="radio"] {
    margin: 0;
}

.payment-details {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
}

.square-payment-form {
    margin-top: 1.5rem;
}

.payment-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

#sq-card-number {
    margin-bottom: 1rem;
}

.sq-input {
    border: 2px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    padding: 12px 16px !important;
    transition: var(--transition) !important;
}

.sq-input:focus {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1) !important;
}

#sq-credit-card {
    width: 100%;
    margin-top: 1rem;
    position: relative;
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* Confirmation Styles */
#confirmation-message {
    text-align: center;
    padding: 2rem;
}

#confirmation-message h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.confirmation-details {
    background: var(--background-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    text-align: left;
}

.detail-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.status-confirmed {
    color: #28a745;
    font-weight: 600;
}

/* Calendar Container */
.calendar-container {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.calendar-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.calendar-header h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

#current-month {
    font-weight: 600;
    color: var(--secondary-color);
}

.calendar-legend {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-color.available {
    background: var(--secondary-color);
}

.legend-color.booked {
    background: var(--text-light);
}

.legend-color.selected {
    background: var(--primary-color);
}

/* Barber Section */
.barber-profile {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 3rem;
}

.barber-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.barber-image img {
    width: 100%;
    height: auto;
    display: block;
}

.barber-bio h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.title {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: block;
}

.barber-bio p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-light);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-column p {
    margin-bottom: 1.5rem;
    opacity: 0.8;
    line-height: 1.6;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul li a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-column ul li a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.footer-column ul li i {
    width: 20px;
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

/* Alert Styles */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: none;
    animation: slideIn 0.3s ease;
}

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

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Flatpickr Customization */
.flatpickr-calendar {
    box-shadow: var(--shadow-lg) !important;
    border-radius: var(--border-radius) !important;
    border: none !important;
}

.flatpickr-day.selected {
    background: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
}

.flatpickr-day.today {
    border-color: var(--secondary-color) !important;
}

.flatpickr-day:hover {
    background: rgba(212, 175, 55, 0.1) !important;
    border-color: var(--secondary-color) !important;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Improved Mobile Responsiveness */
@media (max-width: 768px) {
    .logo-container {
        gap: 8px;
    }
    
    .logo-image {
        height: 40px;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .mobile-menu {
        display: block;
    }
    
    nav ul {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    nav ul.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    nav a {
        font-size: 1.1rem;
        padding: 0.75rem 0;
        display: block;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }
    
    nav a:last-child {
        border-bottom: none;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .filter-btn .count {
        font-size: 0.7rem;
        min-width: 20px;
        padding: 1px 6px;
    }
    
    .load-more-btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
    
    .booking-container {
        grid-template-columns: 1fr;
    }
    
    .barber-profile {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 35px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .category-badges {
        top: 8px;
        left: 8px;
    }
    
    .category-badge {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    section h2 {
        font-size: 2rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover,
    .gallery-item:hover,
    .btn:hover {
        transform: none;
    }

    .service-card:active,
    .gallery-item:active,
    .btn:active {
        transform: scale(0.98);
    }

    .time-slot {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filter-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .gallery-item {
        min-height: 120px;
    }
    
    .view-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .loading-spinner {
        animation: none;
    }
    
    .gallery-item,
    .service-card {
        transition: none;
    }
    
    .flatpickr-calendar {
        animation: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Payment Fallback Styles */
.payment-fallback {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.fallback-header {
    color: #dc3545;
    margin-bottom: 20px;
}

.fallback-header i {
    font-size: 3em;
    margin-bottom: 10px;
}

.fallback-header h4 {
    margin: 0;
    font-size: 1.5em;
}

.phone-booking {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
}

.phone-number {
    font-size: 1.8em;
    font-weight: bold;
    margin: 15px 0;
}

.phone-number a {
    color: #007bff;
    text-decoration: none;
}

.phone-number a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.fallback-hours {
    color: #6c757d;
    margin: 15px 0;
}

.fallback-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn-call {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-call:hover {
    background: #218838;
}

.btn-retry {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-retry:hover {
    background: #545b62;
}

/* Payment Ready Message */
.payment-ready-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #c3e6cb;
}

.payment-ready-message i {
    color: #28a745;
}

/* Environment-specific styling */
.env-badge {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 8px;
}

.env-badge.sandbox {
    background: #f39c12;
    color: white;
}

.env-badge.production {
    background: #27ae60;
    color: white;
}

.payment-ready-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.payment-ready-message i {
    color: #28a745;
}

.payment-fallback {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.fallback-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #856404;
}

.fallback-header i {
    font-size: 1.2em;
}

.fallback-content {
    color: #856404;
}

.phone-booking {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
}

.phone-number {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.phone-number a {
    color: #856404;
    text-decoration: none;
}

.phone-number a:hover {
    text-decoration: underline;
}

.fallback-hours {
    font-size: 0.9em;
    margin: 10px 0;
}

.fallback-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.btn-call, .btn-retry {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.9em;
}

.btn-call {
    background: #28a745;
    color: white;
}

.btn-retry {
    background: #6c757d;
    color: white;
}

.btn-call:hover {
    background: #218838;
}

.btn-retry:hover {
    background: #5a6268;
}

/* Enhanced error states for payment form */
#card-container.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#card-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Loading states */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

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

/* Responsive improvements */
@media (max-width: 768px) {
    .fallback-actions {
        flex-direction: column;
    }
    
    .btn-call, .btn-retry {
        justify-content: center;
    }
    
    .payment-ready-message {
        font-size: 0.8em;
        padding: 10px;
    }
}

/* Enhanced mobile header */
@media (max-width: 768px) {
    header {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.95);
    }
    
    .header-scrolled {
        background: rgba(255, 255, 255, 0.98) !important;
    }
}

/* Better touch interactions */
@media (hover: none) and (pointer: coarse) {
    .service-card,
    .gallery-item,
    .btn {
        transition: transform 0.1s ease;
    }
    
    .service-card:active,
    .gallery-item:active,
    .btn:active {
        transform: scale(0.98);
    }
    
    /* Prevent double-tap zoom */
    .booking-form,
    .gallery-grid,
    .services-grid {
        touch-action: manipulation;
    }
}

/* Loading state improvements */
.gallery-item img.loading {
    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;
    }
}