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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background: linear-gradient(45deg, #667eea 0%, #764ba2 100%); }
    50% { background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%); }
    100% { background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%); }
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 6s infinite linear;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* Header with Glow Effect */
header {
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    animation: slideDown 0.8s ease-out;
    transition: all 0.3s ease;
}

/* Mobile header scroll behavior */
@media (max-width: 768px) {
    header {
        transition: transform 0.3s ease, background 0.3s ease;
    }
    
    header.scrolled {
        background: rgba(44, 62, 80, 0.98);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
}

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

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: clamp(1.2rem, 5.5vw, 1.8rem);
    font-weight: bold;
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px rgba(243, 156, 18, 0.5); }
    to { text-shadow: 0 0 20px rgba(243, 156, 18, 0.8); }
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav-links a:hover {
    color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
    transform: translateY(-2px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::after { width: 100%; }

/* Hero Section with Parallax */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                url('../images/applogo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.hero-content { position: relative; z-index: 2; animation: fadeInUp 1s ease-out 0.5s both; }

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

.hero-content h1 {
    font-size: clamp(1.8rem, 6vw, 3rem);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease-out 0.5s both;
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
    word-wrap: break-word;
    hyphens: auto;
}

@keyframes typewriter { from { width: 0; } to { width: 100%; } }

.hero-content p { font-size: clamp(1rem, 3.8vw, 1.3rem); margin-bottom: 2rem; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); animation: fadeIn 1s ease-out 2s both; }

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

.cta-button {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    animation: pulse 2s infinite;
}

@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

.cta-button:hover { background: linear-gradient(45deg, #c0392b, #a93226); transform: translateY(-3px); box-shadow: 0 10px 25px rgba(231, 76, 60, 0.4); }
.cta-button::before { 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; }
.cta-button:hover::before { left: 100%; }

/* Services Section */
.services { padding: 80px 0; background: #f8f9fa; position: relative; }

.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 3rem; color: #2c3e50; position: relative; animation: slideInDown 1s ease-out; }
@keyframes slideInDown { from { opacity: 0; transform: translateY(-50px); } to { opacity: 1; transform: translateY(0); } }
.section-title::after { content: ''; position: absolute; bottom: -10px; left: 50%; width: 100px; height: 4px; background: linear-gradient(45deg, #3498db, #e74c3c); transform: translateX(-50%); border-radius: 2px; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 3rem; }
.service-card { background: white; padding: 2rem; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); text-align: center; transition: all 0.3s ease; position: relative; overflow: hidden; animation: fadeInUp 0.8s ease-out; cursor: pointer; min-height: 300px; }
.service-card::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent); transition: left 0.5s; }
.service-card:hover::before { left: 100%; }
.service-card:hover { transform: translateY(-10px) rotateY(5deg); box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.service-icon { font-size: 3rem; color: #3498db; margin-bottom: 1rem; transition: all 0.3s ease; display: inline-block; text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5); }
.service-card:hover .service-icon { transform: scale(1.2) rotate(360deg); color: #e74c3c; text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5); }

/* More Info Button Overlay */
.more-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 15px;
}

.service-card:hover .more-info-overlay {
    opacity: 1;
    visibility: visible;
}

.more-info-button {
    background: linear-gradient(45deg, #3498db, #e74c3c);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.more-info-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(45deg, #2980b9, #c0392b);
}

/* Booking */
.booking { padding: 80px 0; background: white; }
.booking-form { max-width: 600px; margin: 0 auto; background: #f8f9fa; padding: 2rem; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); position: relative; overflow: hidden; }
.booking-form::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(45deg, #3498db, #e74c3c, #f39c12); background-size: 200% 100%; animation: gradientMove 3s ease infinite; }
@keyframes gradientMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.form-group { margin-bottom: 1.5rem; position: relative; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px; border: 2px solid #ddd; border-radius: 8px; font-size: 1rem; transition: all 0.3s ease; background: white; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #3498db; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1); transform: translateY(-2px); }
.form-group label { position: absolute; top: 12px; left: 12px; color: #666; transition: all 0.3s ease; pointer-events: none; background: white; padding: 0 5px; }
.form-group input:focus + label, .form-group input:not(:placeholder-shown) + label { top: -8px; left: 8px; font-size: 0.8rem; color: #3498db; font-weight: bold; }

/* Calendar */
.calendar { max-width: 800px; margin: 0 auto; background: white; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); overflow: hidden; animation: slideInUp 1s ease-out; }
.calendar-header { display: flex; justify-content: center; align-items: center; gap: 1rem; padding: 1rem; background: #2c3e50; color: white; font-weight: bold; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: #ecf0f1; }
@keyframes slideInUp { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
.calendar-day { background: white; padding: 1rem; text-align: center; min-height: 80px; display: flex; flex-direction: column; justify-content: center; position: relative; transition: all 0.3s ease; cursor: pointer; }
.calendar-day.available { background: #d5f4e6; }
.calendar-day.available:hover { background: #a8e6cf; transform: scale(1.05); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.calendar-day.booked { background: #ffebee; color: #666; }
.calendar-day.today { background: #e3f2fd; font-weight: bold; animation: pulse 2s infinite; }
.calendar-day.selected { background: #3498db; color: white; transform: scale(1.1); }

/* Time Slots */
.time-slot { display: inline-block; background: #3498db; color: white; padding: 10px 20px; margin: 5px; border-radius: 25px; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; }
.time-slot:hover { background: #2980b9; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4); }
.time-slot.selected { background: #e74c3c; animation: pulse 1s infinite; }
.time-slot::before { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; background: rgba(255, 255, 255, 0.3); border-radius: 50%; transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s; }
.time-slot:active::before { width: 300px; height: 300px; }

/* Modal */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); animation: fadeIn 0.3s ease; }
.modal-content { background-color: white; margin: 5% auto; padding: 2rem; border-radius: 15px; width: 90%; max-width: 500px; position: relative; animation: slideInDown 0.3s ease; }

/* Messages */
.success-message { background: linear-gradient(45deg, #d5f4e6, #a8e6cf); color: #27ae60; padding: 1rem; border-radius: 10px; margin-top: 1rem; text-align: center; animation: slideInUp 0.5s ease; }
.error-message { background: linear-gradient(45deg, #ffebee, #ffcdd2); color: #e74c3c; padding: 1rem; border-radius: 10px; margin-top: 1rem; text-align: center; animation: slideInUp 0.5s ease; }

/* Accounts (Auth) */
.auth { padding: 80px 0; background: #f8f9fa; }
.auth-card { max-width: 640px; margin: 0 auto; background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); overflow: hidden; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #2c3e50; }
.auth-tab { padding: 1rem; text-align: center; color: #ecf0f1; cursor: pointer; transition: background 0.3s ease; user-select: none; }
.auth-tab.active { background: #34495e; font-weight: bold; }
.auth-body { padding: 1.5rem; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .auth-row { grid-template-columns: 1fr; } }
.helper-text { font-size: 0.9rem; color: #666; margin-top: 0.25rem; }
.current-user { color: #2c3e50; font-size: 0.95rem; }

/* Mobile-First Responsive Design */

/* Extra Small Devices (phones, 320px and up) */
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    
    .logo {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .hero {
        margin-top: 0;
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: clamp(1.4rem, 4vw, 1.8rem);
        line-height: 1.2;
        margin-bottom: 1rem;
        text-align: center;
        max-width: 100%;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
        min-height: 280px;
    }
    
    .service-icon {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
        text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
    }
    
    .auth-card {
        margin: 1rem 0;
        border-radius: 12px;
    }
    
    .auth-body {
        padding: 1.2rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
    }
    
    .form-group label {
        font-size: 0.9rem;
        top: 14px;
        left: 12px;
    }
    
    .form-group input:focus + label,
    .form-group input:not(:placeholder-shown) + label {
        top: -6px;
        left: 8px;
        font-size: 0.75rem;
    }
    
    .calendar-grid {
        gap: 2px;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .time-slot {
        padding: 8px 16px;
        margin: 3px;
        font-size: 0.9rem;
    }
    
    .booking-form {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .auth-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .helper-text {
        font-size: 0.8rem;
        margin-top: 0.3rem;
    }
}

/* Small Devices (landscape phones, 481px and up) */
@media (min-width: 481px) and (max-width: 768px) {
    .container { padding: 0 16px; }
    
    .hero {
        margin-top: 0;
        padding: 3rem 0;
    }
    
    .hero-content h1 {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
        line-height: 1.2;
        text-align: center;
        max-width: 100%;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .calendar-day {
        min-height: 70px;
        padding: 0.8rem;
    }
    
    .time-slot {
        padding: 10px 18px;
        margin: 4px;
    }
}

/* Medium Devices (tablets, 769px and up) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container { padding: 0 20px; }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .calendar-day {
        min-height: 80px;
    }
}

/* Large breakpoint adjustments */
@media (max-width: 768px) {
    .container { padding: 0 14px; }
    header { padding: 0.75rem 0; }
    .hero { margin-top: 0; background-attachment: scroll; }
    .hero-content h1 {
        white-space: normal;
        border-right: 0;
        animation: fadeInUp 1s ease-out 0.5s both;
        line-height: 1.2;
        font-size: clamp(1.6rem, 5vw, 2.5rem);
        text-align: center;
        max-width: 100%;
        word-wrap: break-word;
        hyphens: auto;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        right: 20px;
        background: rgba(44, 62, 80, 0.98);
        padding: 1rem;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        flex-direction: column;
        gap: 1rem;
        z-index: 1001;
    }
    .service-card:hover { transform: translateY(-5px); }
    
    /* Mobile-specific improvements */
    .nav-links a {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
        border-radius: 8px;
        display: block;
        text-align: center;
    }
    
    .nav-links a:hover {
        background: rgba(243, 156, 18, 0.2);
        transform: none;
    }
    
    /* Touch-friendly buttons */
    .cta-button {
        min-height: 44px; /* iOS touch target minimum */
        touch-action: manipulation;
    }
    
    .time-slot {
        min-height: 44px;
        min-width: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .calendar-day {
        min-height: 60px;
        touch-action: manipulation;
    }
    
    /* Mobile form improvements */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        -webkit-appearance: none;
        border-radius: 8px;
    }
    
    /* Mobile calendar improvements */
    .calendar-header {
        padding: 0.8rem;
        font-size: 1.1rem;
    }
    
    .calendar-day {
        font-size: 0.9rem;
        cursor: pointer;
    }
    
    /* Mobile admin features */
    .admin-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .admin-stats .service-card {
        padding: 1.5rem;
    }
}

/* Mobile nav toggle */
.menu-toggle { display: none; background: transparent; border: 2px solid rgba(255,255,255,0.6); color: white; padding: 0.4rem 0.6rem; border-radius: 8px; cursor: pointer; }
@media (max-width: 768px) { .menu-toggle { display: inline-block; } .nav-open .nav-links { display: flex; } }

.hidden { display: none; }

/* Loading Animation */
.loading { display: inline-block; width: 20px; height: 20px; border: 3px solid #f3f3f3; border-top: 3px solid #3498db; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Ensure anchored sections are not hidden under fixed header */
section { scroll-margin-top: 100px; }

/* Admin Features */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.admin-stats .service-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.admin-stats .service-icon {
    color: rgba(255, 255, 255, 0.9);
}

.admin-stats h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.admin-stats div:last-child {
    font-size: 2rem;
    font-weight: bold;
    color: #f39c12;
}

/* Enhanced form validation */
.form-group input:invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group input:valid {
    border-color: #27ae60;
}

/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced security indicators */
.security-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 5px;
}

.security-indicator.secure { background-color: #27ae60; }
.security-indicator.warning { background-color: #f39c12; }
.security-indicator.danger { background-color: #e74c3c; }

/* Responsive admin features */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
}

/* Mobile-Specific Enhancements */

/* Touch-friendly interactions */
@media (max-width: 768px) {
    /* Improved touch targets */
    button, .cta-button, .time-slot, .calendar-day, .auth-tab {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Better mobile navigation */
    .nav-links {
        width: 280px;
        max-width: 90vw;
        right: 10px;
        top: 70px;
        border-radius: 12px;
        backdrop-filter: blur(10px);
    }
    
    .nav-links a {
        margin: 0.2rem 0;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    .nav-links a:active {
        background: rgba(243, 156, 18, 0.3);
        transform: scale(0.98);
    }
    
    /* Mobile menu toggle improvements */
    .menu-toggle {
        padding: 0.5rem;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    .menu-toggle:active {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(0.95);
    }
    
    /* Mobile form improvements */
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        transform: none; /* Remove transform on mobile for better UX */
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    }
    
    /* Mobile calendar enhancements */
    .calendar {
        margin: 1rem 0;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .calendar-day {
        position: relative;
        overflow: hidden;
    }
    
    .calendar-day:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .calendar-day.selected {
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    }
    
    /* Mobile time slots */
    .time-slots {
        margin: 1.5rem 0;
    }
    
    .time-slot {
        border-radius: 20px;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    .time-slot:active {
        transform: scale(0.95);
    }
    
    .time-slot.selected {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    }
    
    /* Mobile service cards */
    .service-card {
        margin-bottom: 1rem;
        border-radius: 12px;
        transition: all 0.2s ease;
    }
    
    .service-card:active {
        transform: scale(0.98);
    }
    
    /* Mobile auth improvements */
    .auth-tab {
        padding: 1.2rem 1rem;
        font-size: 1rem;
        font-weight: 500;
    }
    
    .auth-tab:active {
        background: rgba(52, 73, 94, 0.8);
    }
    
    /* Mobile dashboard improvements */
    .services-grid {
        gap: 1rem;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Mobile more info button adjustments */
    .more-info-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Mobile admin features */
    .admin-stats .service-card {
        text-align: center;
    }
    
    .admin-stats div:last-child {
        font-size: 1.8rem;
        margin-top: 0.5rem;
    }
    
    /* Mobile booking form */
    .booking-form {
        border-radius: 12px;
        margin: 1rem 0;
    }
    
    .booking-form::before {
        height: 3px;
    }
    
    /* Mobile messages */
    .success-message,
    .error-message {
        padding: 1rem;
        border-radius: 8px;
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Mobile helper text */
    .helper-text {
        line-height: 1.3;
        margin-top: 0.4rem;
    }
    
    /* Mobile current user info */
    .current-user {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        display: block;
    }
    
    /* Mobile logout button */
    #logoutBtn {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-content h1 {
        font-size: clamp(1.6rem, 4vw, 1.8rem);
        margin-bottom: 0.8rem;
        text-align: center;
        max-width: 100%;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .calendar-day {
        min-height: 50px;
        padding: 0.4rem;
    }
    
    .time-slot {
        padding: 6px 12px;
        margin: 2px;
    }
}

/* High DPI mobile displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .service-icon {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        -webkit-appearance: none;
        border-radius: 8px;
    }
    
    .cta-button {
        -webkit-appearance: none;
        border-radius: 25px;
    }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .form-group input:focus {
        outline: none;
    }
}

/* Mobile accessibility improvements */
@media (max-width: 768px) {
    /* Ensure sufficient color contrast */
    .nav-links a {
        color: #ffffff;
    }
    
    .nav-links a:hover,
    .nav-links a:focus {
        color: #f39c12;
        background: rgba(243, 156, 18, 0.2);
    }
    
    /* Focus indicators for keyboard navigation */
    .cta-button:focus,
    .time-slot:focus,
    .calendar-day:focus {
        outline: 2px solid #3498db;
        outline-offset: 2px;
    }
    
    /* High contrast mode support */
    @media (prefers-contrast: high) {
        .service-card {
            border: 2px solid #000;
        }
        
        .calendar-day.available {
            background: #000;
            color: #fff;
        }
        
        .time-slot {
            border: 2px solid #000;
        }
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) { 
    * { 
        animation: none !important; 
        transition: none !important; 
    }
    
    .service-card:hover,
    .time-slot:hover,
    .calendar-day:hover {
        transform: none !important;
    }
}

/* Enhanced Authentication Styles */
.field-error {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group input.invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.form-group input.valid {
    border-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2);
}

.form-group input.invalid:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.3);
}

.form-group input.valid:focus {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.3);
}

/* Loading states */
.cta-button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.cta-button.loading .button-text {
    opacity: 0;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 350px;
    border-left: 4px solid #3498db;
}

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

.toast-success {
    border-left-color: #27ae60;
}

.toast-error {
    border-left-color: #e74c3c;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: 18px;
    font-weight: bold;
}

.toast-success .toast-icon {
    color: #27ae60;
}

.toast-error .toast-icon {
    color: #e74c3c;
}

.toast-message {
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

/* Admin badge */
.admin-badge {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 8px;
}

/* Enhanced form animations */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group input:focus + label {
    transform: translateY(-1.5rem) scale(0.85);
    color: #3498db;
}

.form-group input:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem) scale(0.85);
}

.form-group input.valid + label {
    color: #27ae60;
}

.form-group input.invalid + label {
    color: #e74c3c;
}

/* Mobile optimizations for auth */
@media (max-width: 768px) {
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .auth-card {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 16px;
    }
}

/* High contrast mode for auth */
@media (prefers-contrast: high) {
    .form-group input.invalid {
        border: 2px solid #000;
        background: #fff;
    }
    
    .form-group input.valid {
        border: 2px solid #000;
        background: #f0f0f0;
    }
    
    .toast {
        border: 2px solid #000;
    }
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    font-size: 1.2rem;
    color: #2c3e50;
}

.logo-emblem {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    white-space: nowrap;
}


/* Mobile logo adjustments */
@media (max-width: 768px) {
    .logo {
        font-size: 1rem;
    }
    
    .logo-emblem {
        height: 32px;
    }
    
    .logo-text {
        display: none; /* Hide text on very small screens */
    }
    
}

@media (max-width: 480px) {
    .logo-emblem {
        height: 28px;
    }
    
}

/* Turnstile styles removed */


/* Form message styles */
.form-message {
  padding: 1rem;
  border-radius: 4px;
  margin: 1rem 0;
  font-weight: 500;
}

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

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

.form-message.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.form-message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.form-message.hidden {
  display: none;
}


/* Quick Contact Form Styles */
.quick-contact-form {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.quick-contact-form h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #2c3e50;
  font-size: 1.5rem;
}

.quick-contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.quick-contact-form .form-group {
  position: relative;
  margin-bottom: 1rem;
}

.quick-contact-form .form-group input,
.quick-contact-form .form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
}

.quick-contact-form .form-group input:focus,
.quick-contact-form .form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.quick-contact-form .form-group label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: #7f8c8d;
  transition: all 0.3s ease;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.9);
  padding: 0 0.5rem;
}

.quick-contact-form .form-group input:focus + label,
.quick-contact-form .form-group input:valid + label,
.quick-contact-form .form-group textarea:focus + label,
.quick-contact-form .form-group textarea:valid + label {
  top: -0.5rem;
  left: 0.5rem;
  font-size: 0.8rem;
  color: #3498db;
}

.quick-contact-form .cta-button {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.quick-contact-form .cta-button:hover {
  background: linear-gradient(135deg, #2980b9, #1f5f8b);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.quick-contact-form .cta-button:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Mobile responsiveness for quick contact form */
@media (max-width: 768px) {
  .quick-contact-form {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .quick-contact-form .form-row {
    grid-template-columns: 1fr;
  }
}


