/* =========================================================
   Mahtisa Beauty Clinic
   Main stylesheet
   ========================================================= */

:root {
    --color-primary: #c9a227;
    --color-primary-dark: #a9861e;
    --color-primary-text: #9a7620;
    --color-text: #222222;
    --color-text-soft: #666666;
    --color-text-muted: #777777;
    --color-bg: #f8f4ee;
    --color-surface: #ffffff;
    --color-surface-soft: #fdfbf8;
    --color-border: #eee5d9;
    --color-border-strong: #ddd2c3;
    --color-footer: #1f1f1f;
    --color-footer-text: #cccccc;
    --color-success-text: #285b38;
    --color-success-bg: #e7f6eb;
    --color-success-border: #b8dfc2;
    --color-error-text: #8a1f17;
    --color-error-bg: #fdebea;
    --color-error-border: #efc4c1;
    --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 15px 35px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 18px 45px rgba(0, 0, 0, 0.07);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --page-padding: 7%;
    --transition: 0.3s ease;
}

/* Reset and global styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    direction: rtl;
    font-family: Arial, sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg);
}

img {
    max-width: 100%;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

a,
button,
input,
select,
textarea {
    font: inherit;
}

.btn,
.nav-btn,
.service-detail-link,
.service-book-link {
    transition:
        background-color var(--transition),
        color var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    background-color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 6px;
}

.btn:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.btn:focus-visible,
.navbar a:focus-visible,
.footer a:focus-visible,
.service-actions a:focus-visible,
.back-to-services:focus-visible {
    outline: 3px solid rgba(201, 162, 39, 0.35);
    outline-offset: 3px;
}

/* Navbar */
.navbar {
    position: relative;
    z-index: 20;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 20px var(--page-padding);
    background-color: var(--color-surface);
}

.logo {
    flex-shrink: 0;
    color: var(--color-primary);
    font-size: 26px;
    font-weight: 700;
    justify-self: start;
}

.navbar nav {
    display: flex;
    align-items: center;
    justify-self: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
}

.navbar nav a {
    color: var(--color-text);
    font-size: 16px;
    text-decoration: none;
}

.navbar nav a:hover {
    color: var(--color-primary);
}

.nav-btn {
    flex-shrink: 0;
    padding: 10px 22px;
    color: #ffffff;
    text-decoration: none;
    background-color: var(--color-primary);
    border-radius: 5px;
    justify-self: end;
}

.nav-btn:hover {
    background-color: var(--color-primary-dark);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background-color: var(--color-text);
    border-radius: 2px;
}

/* Hero */
.hero {
    position: relative;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 90px var(--page-padding);
    text-align: center;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(201, 162, 39, 0.14),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #fffdf9 0%,
            #f6eee2 100%
        );
}

.hero::before {
    position: absolute;
    width: 420px;
    height: 420px;
    content: "";
    background-color: rgba(201, 162, 39, 0.08);
    border-radius: 50%;
    transform: translate(55%, -45%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 760px;
}

.hero-label {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 16px;
    color: var(--color-primary-text);
    font-size: 15px;
    font-weight: 700;
    background-color: rgba(201, 162, 39, 0.1);
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 999px;
}

.hero h1 {
    margin-bottom: 22px;
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1.35;
}

.hero h1 strong {
    display: block;
    color: var(--color-primary);
}

.hero p {
    max-width: 620px;
    margin: 0 auto 34px;
    color: var(--color-text-soft);
    font-size: 19px;
    line-height: 2;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    color: var(--color-primary-text);
    text-decoration: none;
    background-color: transparent;
    border: 1px solid var(--color-primary);
    border-radius: 6px;
    transition:
        color var(--transition),
        background-color var(--transition);
}

.hero-secondary-btn:hover {
    color: #ffffff;
    background-color: var(--color-primary);
}

/* Shared section title */
.section-title {
    width: 100%;
    max-width: 650px;
    margin: 0 auto 50px;
    text-align: center;
}

.section-title span {
    display: block;
    margin-bottom: 10px;
    color: var(--color-primary);
    font-weight: 700;
}

.section-title h2 {
    margin-bottom: 15px;
    font-size: clamp(30px, 4vw, 36px);
    line-height: 1.45;
}

.section-title p {
    margin-bottom: 0;
    color: var(--color-text-soft);
    line-height: 1.8;
}

/* Services */
.services {
    padding: 90px var(--page-padding);
    background-color: var(--color-surface);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.service-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--color-surface-soft);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.service-card-image,
.service-card-image-placeholder {
    width: 100%;
    height: 230px;
}

.service-card-image {
    display: block;
    object-fit: cover;
    object-position: center;
}

.service-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #806f59;
    background-color: #e9dfd1;
}

.service-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
}

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

.service-card h3 {
    margin-bottom: 15px;
    font-size: 23px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.service-card-body > p {
    margin-bottom: 16px;
    color: var(--color-text-soft);
    line-height: 1.8;
}

.service-meta {
    margin-bottom: 8px !important;
    color: var(--color-text-muted) !important;
    font-size: 14px;
}

.service-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: auto;
    padding-top: 22px;
}

.service-actions a {
    min-width: 0;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    text-align: center;
    text-decoration: none;
    line-height: 1.5;
    border-radius: var(--radius-sm);
}

.service-detail-link {
    color: var(--color-primary-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-primary);
}

.service-detail-link:hover {
    color: #ffffff;
    background-color: var(--color-primary);
}

.service-book-link {
    color: #ffffff;
    background-color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.service-book-link:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.services-empty {
    grid-column: 1 / -1;
    margin-bottom: 0;
    color: var(--color-text-soft);
    text-align: center;
}

/* About */
.about {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 60px;
    padding: 100px var(--page-padding);
    background-color: var(--color-bg);
}

.about-content {
    min-width: 0;
}

.about-content > span {
    display: block;
    margin-bottom: 12px;
    color: var(--color-primary);
    font-weight: 700;
}

.about-content h2 {
    margin-bottom: 25px;
    font-size: clamp(30px, 4vw, 38px);
    line-height: 1.5;
}

.about-content p {
    margin-bottom: 16px;
    color: var(--color-text-soft);
    font-size: 17px;
    line-height: 2;
}

.about-content .btn {
    margin-top: 15px;
}

.about-box {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.about-number {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    text-align: center;
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.about-number:first-child {
    grid-column: 1 / -1;
}

.about-number strong {
    margin-bottom: 8px;
    color: var(--color-primary);
    font-size: 36px;
}

.about-number span {
    color: #555555;
}

/* Gallery */
.gallery {
    padding: 100px var(--page-padding);
    background-color: var(--color-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.gallery-card {
    min-width: 0;
    overflow: hidden;
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition);
}

.gallery-card:hover {
    transform: translateY(-8px);
}

.gallery-image,
.gallery-placeholder {
    width: 100%;
    height: 260px;
}

.gallery-image {
    display: block;
    object-fit: cover;
    object-position: center;
}

.gallery-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #806f59;
    font-size: 18px;
    background-color: #e9dfd1;
}

.gallery-content {
    padding: 25px;
}

.gallery-content h3 {
    margin-bottom: 10px;
    font-size: 22px;
}

.gallery-content p {
    margin-bottom: 0;
    color: var(--color-text-soft);
    line-height: 1.8;
}

.gallery-action {
    margin-top: 40px;
    text-align: center;
}

/* Appointment form */
.appointment {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: start;
    gap: 60px;
    padding: 100px var(--page-padding);
    background-color: var(--color-surface);
}

.appointment-info {
    min-width: 0;
}

.appointment-info span {
    display: block;
    margin-bottom: 12px;
    color: var(--color-primary);
    font-weight: 700;
}

.appointment-info h2 {
    margin-bottom: 20px;
    font-size: clamp(30px, 4vw, 38px);
    line-height: 1.5;
}

.appointment-info p {
    margin-bottom: 0;
    color: var(--color-text-soft);
    font-size: 17px;
    line-height: 2;
}

.appointment-form {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding: 35px;
    background-color: var(--color-bg);
    border-radius: 16px;
}

.form-group {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.form-group label {
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-width: 0;
    padding: 13px 15px;
    color: var(--color-text);
    font-size: 15px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    outline: none;
    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.12);
}

.full-width {
    grid-column: 1 / -1;
}

.appointment-form .btn {
    border: none;
    cursor: pointer;
}

.form-message,
.form-errors {
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
}

.form-message {
    color: var(--color-success-text);
    background-color: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
}

.form-errors {
    grid-column: 1 / -1;
    color: var(--color-error-text);
    background-color: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
}

.errorlist {
    margin: 5px 0 0;
    padding: 0;
    color: #b42318;
    font-size: 14px;
    list-style: none;
}

.form-errors .errorlist {
    margin: 0;
}

/* Service detail page */
.service-detail-page {
    min-height: 75vh;
    padding: 80px var(--page-padding);
    background-color: var(--color-bg);
}

.service-detail-container {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
}

.back-to-services {
    display: inline-block;
    margin-bottom: 22px;
    color: #92701f;
    font-weight: 700;
    text-decoration: none;
}

.back-to-services:hover {
    color: #6f5116;
}

.service-detail-card {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
    gap: 45px;
    padding: 55px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.service-detail-main {
    min-width: 0;
}

.service-detail-label {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--color-primary);
    font-weight: 700;
}

.service-detail-main h1 {
    margin-bottom: 20px;
    color: var(--color-text);
    font-size: clamp(34px, 5vw, 46px);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.service-detail-lead {
    margin-bottom: 30px;
    color: var(--color-text-soft);
    font-size: 20px;
    line-height: 2;
}

.service-detail-description {
    color: #555555;
    font-size: 17px;
    line-height: 2.1;
    overflow-wrap: anywhere;
}

.service-detail-description p {
    margin-bottom: 18px;
}

.service-detail-sidebar {
    min-width: 0;
    align-self: start;
    padding: 28px;
    background-color: var(--color-bg);
    border-radius: var(--radius-md);
}

.service-detail-sidebar h2 {
    margin-bottom: 22px;
    font-size: 24px;
}

.service-info-list {
    margin-bottom: 26px;
}

.service-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e4dacb;
}

.service-info-item:last-child {
    border-bottom: none;
}

.service-info-item span {
    color: var(--color-text-muted);
}

.service-info-item strong {
    color: #332d25;
    text-align: left;
    overflow-wrap: anywhere;
}

.service-detail-book-button {
    width: 100%;
}

/* Footer */
.footer {
    padding-top: 70px;
    color: #ffffff;
    background-color: var(--color-footer);
}

.footer-container {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 50px;
    padding: 0 var(--page-padding) 50px;
}

.footer h3,
.footer h4 {
    margin-bottom: 20px;
    color: var(--color-primary);
}

.footer p {
    margin-bottom: 0;
    color: var(--color-footer-text);
    line-height: 1.9;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--color-footer-text);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-contact p {
    margin-bottom: 10px;
}
.footer-contact-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.footer-contact-line a {
    color: var(--color-footer-text);
    text-decoration: none;
    unicode-bidi: isolate;
    overflow-wrap: anywhere;
}

.footer-contact-line a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    padding: 20px var(--page-padding);
    text-align: center;
    border-top: 1px solid #3a3a3a;
}

/* Responsive */
@media (max-width: 1000px) {
    .services-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .navbar {
        flex-wrap: nowrap;
        gap: 12px;
        padding-left: 4%;
        padding-right: 4%;
    }

    .navbar nav {
        width: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 12px;
        padding-top: 0;
        border-top: none;
    }

    .navbar nav a {
        font-size: 13px;
        white-space: nowrap;
    }

    .logo {
        font-size: 22px;
    }

    .nav-btn {
        padding: 8px 13px;
        font-size: 13px;
        white-space: nowrap;
    }

    .about,
    .appointment,
    .service-detail-card {
        grid-template-columns: 1fr;
    }

    .about {
        gap: 40px;
    }

    .appointment {
        gap: 35px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .service-detail-page {
        padding: 55px 5%;
    }

    .service-detail-card {
        gap: 30px;
        padding: 32px;
    }
}

@media (max-width: 700px) {
    .navbar {
        grid-template-columns: 1fr auto auto;
        gap: 12px;
    }

    .menu-toggle {
        display: block;
    }

    .navbar nav {
        display: none;
        grid-column: 1 / -1;
        width: 100%;
    }

    .navbar nav.is-open {
        display: flex;
    }
}

@media (max-width: 650px) {
    :root {
        --page-padding: 5%;
    }

    .navbar {
        gap: 14px;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .logo {
        font-size: 23px;
    }

    .nav-btn {
        padding: 9px 14px;
        font-size: 14px;
    }

    .hero {
        min-height: 70vh;
        padding: 56px 20px;
    }

    .hero p {
        font-size: 17px;
    }

    .services,
    .about,
    .gallery,
    .appointment {
        padding-top: 70px;
        padding-bottom: 70px;
    }

    .services-grid,
    .gallery-grid,
    .about-box,
    .appointment-form {
        grid-template-columns: 1fr;
    }

    .about-number:first-child,
    .full-width {
        grid-column: auto;
    }

    .appointment-form {
        padding: 25px;
    }

    .service-actions {
        grid-template-columns: 1fr;
    }

    .gallery-image,
    .gallery-placeholder {
        height: 230px;
    }
}

@media (max-width: 480px) {
    .service-card-body {
        padding: 26px 22px;
    }

    .service-detail-card {
        padding: 24px 18px;
    }

    .service-detail-lead {
        font-size: 17px;
    }

    .service-info-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .service-info-item strong {
        text-align: right;
    }
}


/* Scroll-to-top button */
.scroll-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;
    font-size: 24px;
    cursor: pointer;

    background-color: var(--color-primary);
    border: none;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);

    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease,
        transform 0.3s ease,
        background-color 0.3s ease;
}

.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-3px);
}

.scroll-to-top:focus-visible {
    outline: 3px solid rgba(201, 162, 39, 0.35);
    outline-offset: 3px;
}

@media (max-width: 650px) {
    .scroll-to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 650px) {
    .service-card-image,
    .service-card-image-placeholder {
        height: 210px;
    }
    .about {
    gap: 32px;
}

.about-content h2 {
    font-size: 30px;
}

.about-content p {
    font-size: 16px;
    line-height: 1.9;
}

.about-box {
    gap: 14px;
}

.about-number {
    min-height: 115px;
    padding: 18px;
}

.about-number strong {
    font-size: 32px;
}
}

.gallery-empty {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--color-text-soft);
    text-align: center;
}