/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8b5cf6;
    --primary-hover: #7c3aed;
    --text-dark: #1f2937;
    --text-light: #ffffff;
    --text-gray: #9ca3af;
    --bg-dark: #1e1b4b;
    --bg-card: #2e1b4b;
    --bg-light: #3a2861;
    --bg-gray: #0f172a;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-focus: #8b5cf6;
    --transition: all 0.2s ease;
}

html, body {
    overflow-x: hidden;
}

/* Fade-in animation for page load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animated Stars Background */
@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(120deg); }
    66% { transform: translateY(5px) rotate(240deg); }
}

.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.star {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

.star:nth-child(odd) {
    animation-delay: -1s;
    animation-duration: 4s;
}

.star:nth-child(3n) {
    animation-name: float;
    animation-duration: 6s;
}

.star:nth-child(5n) {
    animation-name: twinkle, float;
    animation-duration: 5s, 8s;
}

/* Slide-in animation for modal */
@keyframes slideIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Pulse animation for buttons */
@keyframes buttonPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-light);
    line-height: 1.6;
    background: var(--bg-gray);
}

/* Header */
.header {
    background: var(--bg-dark);
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 10px;
}

.brand-logo {
    max-height: 140px;
    width: auto;
    object-fit: contain;
}

.business-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.business-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
}

.business-contact a {
    color: var(--text-gray);
    text-decoration: none;
}

.business-contact a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

/* Main Wrapper */
.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Policies Section */
.policies-section {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.policies-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 24px;
}

.policies-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.policy-item {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-light);
}

.policy-item strong {
    font-weight: 600;
}

/* Services Section */
.services-section {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 32px;
    border: 1px solid var(--border-color);
}

.section-heading {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 16px;
}

.location-intro {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 24px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.services-subheading {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.services-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.service-list {
    list-style: none;
    margin-top: 8px;
    color: var(--text-light);
}

.service-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 8px 0;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.service-list li:last-child {
    border-bottom: none;
}

.service-list li span {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.book-style-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.8125rem;
}

.service-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-light);
    transition: var(--transition);
    animation: fadeIn 0.5s ease-out;
}

.service-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    background: var(--bg-card);
    transform: translateY(-2px);
}

.service-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    margin: 0;
}

.service-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.service-description {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin: 4px 0 0 0;
}

.book-btn {
    padding: 10px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    margin-left: 20px;
}

.book-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: buttonPulse 0.3s ease;
}

.book-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-wrapper {
        padding: 20px 12px;
    }

    .header-content {
        gap: 16px;
    }

    .brand-logo {
        max-height: 60px;
    }

    .business-info {
        gap: 2px;
    }

    .business-name {
        font-size: 1.1rem;
    }

    .business-contact a {
        font-size: 0.85rem;
    }

    .policies-section,
    .services-section {
        padding: 20px 16px;
    }

    .policies-title,
    .section-heading {
        font-size: 1.15rem;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .location-intro {
        font-size: 0.85rem;
        margin-bottom: 16px;
    }

    .service-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .service-name {
        font-size: 1rem;
    }

    .services-list {
        grid-template-columns: 1fr;
    }

    .service-list li {
        font-size: 0.8rem;
    }

    .book-style-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        white-space: nowrap;
        min-height: auto;
        display: inline-block;
        width: auto;
    }

    .book-btn {
        width: 100%;
        margin-left: 0;
        padding: 12px 16px;
        font-size: 0.875rem;
        min-height: 44px;
    }
}

/* Modal / Booking styles */
.modal.hidden {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 980px;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-light));
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border: 1px solid var(--border-color);
    z-index: 1300;
}

.modal-close {
    position: absolute;
    right: 12px;
    top: 8px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

.booking-steps {
    display: grid;
    gap: 16px;
}

.appointment-summary {
    margin-bottom: 12px;
}

.calendar-wrapper {
    background: transparent;
    border-radius: 8px;
    padding: 8px 0;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.cal-nav {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

.cal-month {
    font-weight: 600;
    color: var(--text-light);
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar .day,
.calendar .weekday {
    padding: 8px;
    text-align: center;
    border-radius: 6px;
    color: var(--text-light);
}

.calendar .weekday {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.calendar .day:hover {
    background: rgba(139, 92, 246, 0.2);
    cursor: pointer;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar .day.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.calendar .day.selected {
    background: var(--primary-color);
    color: var(--text-light);
}

.timeslots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.timeslot {
    padding: 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.timeslot:hover:not(.selected) {
    background: rgba(139, 92, 246, 0.15);
    transform: translateY(-1px);
}

.timeslot small {
    display: block;
    color: var(--text-gray);
    font-size: 0.75rem;
}

.timeslot.selected {
    border-color: var(--primary-color);
    background: linear-gradient(180deg, rgba(139,92,246,0.15), rgba(139,92,246,0.06));
    animation: slideIn 0.2s ease;
}

.selected-datetime {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
}

.booking-form {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.form-row label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 6px;
}

.form-row input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    background: transparent;
    color: var(--text-light);
}

.form-row input[type="file"] {
    padding: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
}

.email-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.email-tag {
    background: rgba(255,255,255,0.06);
    padding: 6px 8px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.confirm-btn {
    padding: 12px 18px;
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

@media (max-width: 768px) {
    .calendar {
        grid-template-columns: repeat(7, 1fr);
    }

    .timeslots {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content { padding: 16px; }
}

/* Success panel shown after booking is submitted */
.booking-success {
    background: linear-gradient(180deg, rgba(139,92,246,0.12), rgba(58,40,97,0.06));
    border: 1px solid rgba(139,92,246,0.18);
    color: var(--text-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.booking-success h3 {
    margin-bottom: 8px;
    font-size: 1.125rem;
}

.booking-success p {
    color: var(--text-gray);
    margin-bottom: 12px;
}

.booking-success .success-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.booking-success .btn {
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.booking-success .btn-close {
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255,255,255,0.06);
}

.booking-success .btn-done {
    background: var(--primary-color);
    color: var(--text-light);
}
/* Wider screens: add more columns */
@media (min-width: 1000px) {
    .services-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1400px) {
    .services-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra small screens - very small phones */
@media (max-width: 480px) {
    .main-wrapper {
        padding: 16px 10px;
    }

    .services-section {
        padding: 16px 12px;
    }

    .section-heading {
        font-size: 1rem;
        margin-bottom: 10px;
        line-height: 1.2;
    }

    .location-intro {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }

    .header-content {
        gap: 12px;
    }

    .brand-logo {
        max-height: 50px;
    }

    .book-style-btn {
        padding: 5px 9px;
        font-size: 0.7rem;
        white-space: nowrap;
        display: inline-block;
        width: auto;
    }

    .timeslot {
        padding: 10px 8px;
        font-size: 0.85rem;
        min-height: 40px;
    }

    .timeslot small {
        font-size: 0.65rem;
    }
}

/* Modal: fit to device and allow internal scrolling */
.modal-content {
    max-height: 90vh;
    overflow: auto;    animation: slideIn 0.3s ease;}

/* Make modal near-fullscreen on narrow devices */
@media (max-width: 600px) {
    .modal-content {
        width: 96vw;
        height: 96vh;
        max-width: 96vw;
        max-height: 96vh;
        border-radius: 8px;
        padding: 12px;
    }

    .calendar {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
    }

    .calendar .day,
    .calendar .weekday {
        padding: 6px 2px;
        font-size: 0.75rem;
    }

    .calendar .day.disabled {
        opacity: 0.3;
    }

    .service-list li {
        gap: 6px;
    }

    .book-style-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
        white-space: nowrap;
        flex-shrink: 0;
        display: inline-block;
        width: auto;
    }

    .timeslots {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .timeslot {
        padding: 12px 10px;
        font-size: 0.9rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .timeslot small {
        font-size: 0.7rem;
    }

    .form-row input,
    .form-row textarea {
        padding: 12px 10px;
        font-size: 16px;
        min-height: 44px;
    }

    .form-row label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .booking-success {
        padding: 20px 16px;
    }

    .booking-success h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .booking-success p {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    .booking-success .btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 0.875rem;
        min-height: 44px;
    }
}

/* Prevent body scroll when modal open */
body.modal-open {
    overflow: hidden;
    touch-action: none;
}

/* Ensure modal inner content (like calendar/timeslots) can scroll independently */
.calendar-wrapper, .timeslots-wrapper, .booking-steps {
    /* allow inner scroll if content overflows */
    max-height: calc(90vh - 200px);
    overflow: auto;
}

@media (max-width: 600px) {
    .calendar-wrapper, .timeslots-wrapper, .booking-steps {
        max-height: none;
        overflow: visible;
    }
}
