@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Lora:ital,wght@0,400;0,700;1,400&display=swap');

/* ====== THEME VARIABLES (HERITAGE BARBER) ====== */
:root {
    --primary-dark: #12100f;           /* Deep Espresso / Off-Black */
    --secondary-dark: #1a1716;         /* Warm Vintage Charcoal */
    --accent-orange: #b87333;          /* Vintage Copper / Brass */
    --accent-orange-hover: #d48a42;    /* Polished Copper */
    --text-white: #f4efe6;             /* Antique Ivory/Cream */
    --text-gray: #a39d93;              /* Warm Sepia-Gray */
    --card-bg: #1c1918;                /* Rich Wood tone */
    --whatsapp-green: #25D366;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ====== GLOBAL STYLES ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lora', serif; /* Classic, elegant body text */
    background-color: var(--primary-dark);
    color: var(--text-white);
    line-height: 1.8;
    scroll-behavior: smooth;
    background-image: radial-gradient(circle at center, #1a1716 0%, #12100f 100%);
}

/* ARABIC RTL SUPPORT */
body.rtl {
    direction: rtl;
    font-family: 'Amiri', 'Lora', serif; /* Classic Arabic serif */
}

/* FIX: Align input text to the right in Arabic */
body.rtl input, 
body.rtl select, 
body.rtl textarea {
    text-align: right;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding { padding: 100px 0; }
.bg-alt { background-color: var(--secondary-dark); border-top: 1px solid #2a2523; border-bottom: 1px solid #2a2523; }
.text-orange { color: var(--accent-orange); font-style: italic; }
.rounded { border-radius: 4px; } /* Muted corners for a classic look */

/* ====== REUSABLE COMPONENTS ====== */
.section-title {
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    margin-bottom: 60px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-white);
}

.section-title::after {
    content: '❖ ❖ ❖'; /* Vintage ornament */
    display: block;
    font-size: 1.2rem;
    color: var(--accent-orange);
    margin-top: 15px;
    letter-spacing: 15px;
}

.section-title-left {
    font-family: 'Cinzel', serif;
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--text-white);
    letter-spacing: 2px;
}

body.rtl .section-title-left {
    text-align: right;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 2px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    min-width: 260px;
    height: 55px;
    text-align: center;
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
    position: relative;
}

.btn-orange { 
    background: transparent; 
    color: var(--accent-orange); 
    border: 1px solid var(--accent-orange);
    outline: 1px solid var(--accent-orange);
    outline-offset: -4px; /* Classic double-line border effect */
}

.btn-orange:hover { 
    background: var(--accent-orange); 
    color: var(--primary-dark); 
    outline-offset: 0;
}

.btn-outline { 
    border: 1px solid var(--text-gray); 
    color: var(--text-gray); 
    background: transparent; 
}

.btn-outline:hover { 
    border-color: var(--text-white); 
    color: var(--text-white); 
}

.btn-block { width: 100%; display: flex; margin-top: 20px; min-width: auto; }

/* ====== HERO SECTION ====== */
.hero {
    height: 90vh;
    background: url('images/hero-bg.jpg') center top / cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 5px solid var(--accent-orange);
}

.hero-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(18,16,15,0.7) 0%, rgba(18,16,15,0.95) 100%);
    z-index: 1;
}

.hero-container { position: relative; z-index: 2; padding: 40px; border: 1px solid rgba(184, 115, 51, 0.3); }

.logo-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px dashed var(--accent-orange); /* Heritage stamp look */
    padding: 5px;
    margin-bottom: 25px;
    object-fit: cover;
    background: var(--primary-dark);
}

.hero h1 { 
    font-family: 'Cinzel', serif; 
    font-size: 4rem; 
    letter-spacing: 8px; 
    margin-bottom: 10px; 
    text-transform: uppercase; 
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.hero h2 { 
    font-family: 'Lora', serif; 
    font-size: 1.4rem; 
    font-style: italic; 
    margin-bottom: 25px; 
    color: var(--accent-orange); 
}

.hero-content p { 
    margin-bottom: 50px; 
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* ====== ABOUT SECTION ====== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p { color: var(--text-gray); margin-bottom: 20px; font-size: 1.15rem; }
.img-responsive { 
    width: 100%; 
    height: 500px; 
    object-fit: cover; 
    border-radius: 200px 200px 10px 10px; /* Classic apothecary arch window shape */
    border: 3px solid var(--accent-orange);
    padding: 10px;
    background: var(--secondary-dark);
}

/* ====== SERVICE CARDS ====== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-card {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #332f2d;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-orange);
    background: var(--card-bg);
}

.service-img { height: 280px; width: 100%; overflow: hidden; border-bottom: 1px solid var(--accent-orange); }
.service-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: var(--transition);
    filter: sepia(40%) contrast(110%); /* Vintage photography feel */
}
.service-card:hover .service-img img { transform: scale(1.05); filter: sepia(0%) contrast(110%); }

.service-info { padding: 35px 25px; text-align: center; }
.service-info h3 { margin-bottom: 15px; font-family: 'Cinzel', serif; color: var(--accent-orange); font-size: 1.6rem; letter-spacing: 1px; }
.service-info p { color: var(--text-gray); font-size: 1rem; }

/* ====== BOOKING FORM ====== */
.form-wrapper {
    max-width: 800px; /* Widened for ledger look */
    margin: 0 auto;
    background: var(--card-bg);
    padding: 50px;
    border-radius: 4px;
    border: 1px solid var(--accent-orange);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5); /* Inner depth */
    position: relative;
}

/* Add corner pins to the form for a vintage ticket look */
.form-wrapper::before, .form-wrapper::after {
    content: ''; position: absolute; width: 10px; height: 10px; background: var(--accent-orange); border-radius: 50%;
}
.form-wrapper::before { top: 15px; left: 15px; box-shadow: 760px 0 0 var(--accent-orange); }
.form-wrapper::after { bottom: 15px; left: 15px; box-shadow: 760px 0 0 var(--accent-orange); }

.form-group { margin-bottom: 25px; }
input, select {
    width: 100%;
    padding: 15px 5px;
    background: transparent;
    border: none;
    border-bottom: 2px dashed #4a423d; /* Ledger line styling */
    color: var(--text-white);
    border-radius: 0;
    outline: none;
    height: 55px;
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    transition: var(--transition);
}

input[type="datetime-local"] { position: relative; }

input[type="datetime-local"]::before {
    content: attr(placeholder);
    width: 100%;
    color: var(--text-gray);
    pointer-events: none; 
}

input[type="datetime-local"]:focus::before,
input[type="datetime-local"]:valid::before {
    display: none;
}

input:focus, select:focus { border-bottom: 2px solid var(--accent-orange); background: rgba(0,0,0,0.2); }

.confirmation {
    margin-top: 20px;
    text-align: center;
    color: var(--accent-orange);
    font-family: 'Cinzel', serif;
    font-weight: bold;
    letter-spacing: 1px;
}

/* ====== GALLERY ====== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.gallery-item {
    height: 350px;
    overflow: hidden;
    border-radius: 0;
    border: 10px solid var(--primary-dark); /* Thick picture frame */
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    filter: grayscale(80%) sepia(20%);
}

.gallery-item:hover img { transform: scale(1.1); filter: grayscale(0%) sepia(0%); }

/* ====== TESTIMONIALS ====== */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.testimonial-card {
    background: transparent;
    padding: 40px 30px;
    border-radius: 0;
    text-align: center;
    position: relative;
    border-top: 1px solid var(--accent-orange);
    border-bottom: 1px solid var(--accent-orange);
}

.stars { color: var(--accent-orange); margin-bottom: 20px; font-size: 1.1rem; letter-spacing: 5px; }

/* ====== FOOTER ====== */
.footer {
    background: #0a0908;
    padding: 80px 0 30px 0;
    border-top: 3px double #2a2523;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.footer-socials { display: flex; gap: 20px; }

.social-btn {
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid var(--text-gray);
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0; /* Square heritage buttons */
    text-decoration: none;
    transition: var(--transition);
}

.social-btn:hover { background: var(--accent-orange); color: var(--primary-dark); border-color: var(--accent-orange); transform: rotate(45deg); }
.social-btn:hover i { transform: rotate(-45deg); } /* Keep icon straight while box rotates */

.footer-bottom {
    text-align: center;
    border-top: 1px solid #1f1b1a;
    padding-top: 30px;
    color: #665f5a;
    font-size: 0.9rem;
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
}

/* ====== LANGUAGE SWITCHER ====== */
.language-switcher {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 9999;
    pointer-events: auto;
}

body.rtl .language-switcher {
    right: auto;
    left: 30px;
}

.lang-btn {
    background: transparent;
    color: var(--text-white);
    border: 1px solid var(--accent-orange);
    padding: 8px 20px;
    border-radius: 2px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.lang-btn:hover {
    background: var(--accent-orange);
    color: var(--primary-dark);
}

/* ====== WHATSAPP FLOAT ====== */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-dark);
    color: var(--whatsapp-green);
    border: 2px solid var(--whatsapp-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 1000;
    transition: var(--transition);
    text-decoration: none;
}

body.rtl .whatsapp-float {
    right: auto;
    left: 40px;
}

.whatsapp-float:hover {
    transform: translateY(-5px);
    background-color: var(--whatsapp-green);
    color: var(--primary-dark);
}

/* ====== MOBILE RESPONSIVENESS ====== */
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; letter-spacing: 4px; }
    .gallery-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; gap: 40px; text-align: center; }
    .btn { min-width: 100%; }
    .form-wrapper::before, .form-wrapper::after { display: none; } /* Hide pins on mobile to avoid overflow */
}

/* ====== FOOTER MAP STYLES ====== */
.footer-map-container {
    margin: 60px 0;
    text-align: center;
}

.map-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-white);
}

.map-responsive {
    overflow: hidden;
    padding-bottom: 35%; 
    position: relative;
    height: 0;
    border: 3px solid #2a2523;
    border-radius: 0;
}

.map-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
    filter: sepia(80%) hue-rotate(340deg) contrast(110%) brightness(0.6); /* Vintage parchment map look */
}

@media (max-width: 768px) {
    .map-responsive {
        padding-bottom: 75%;
    }
}

/* ====== PERSISTENT CALENDAR ICON & CONFIRM BTN ====== */
.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-actions {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 20; 
    pointer-events: none; 
}

body.rtl .input-actions {
    right: auto;
    left: 10px;
    flex-direction: row-reverse;
}

.calendar-icon {
    color: var(--accent-orange);
    font-size: 1.2rem;
}

.confirm-btn {
    display: none;
    background: var(--text-white);
    color: var(--primary-dark);
    border: 1px solid var(--text-gray);
    padding: 6px 15px;
    border-radius: 2px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    transition: var(--transition);
    pointer-events: auto; 
}

.confirm-btn:hover {
    background: var(--accent-orange);
    color: var(--text-white);
    border-color: var(--accent-orange);
}

/* Show button only when input has focus OR has a value */
#form-datetime:focus + .input-actions .confirm-btn,
#form-datetime:not(:placeholder-shown) + .input-actions .confirm-btn {
    display: block;
}

/* CRITICAL: This makes the native invisible calendar button cover the whole bar */
input::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%; 
    height: 100%; 
    color: transparent;
    background: transparent;
    cursor: pointer;
    z-index: 10;
}

/* Container for the work examples */
.work-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 equal columns */
    gap: 15px; /* Space between images */
    margin-top: 30px;
}

/* Individual card styling */
.work-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px; /* Smooth corners */
    aspect-ratio: 1 / 1; /* Makes images perfectly square */
}

.work-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents stretching */
    transition: transform 0.5s ease;
}

/* Hover effect */
.work-card:hover img {
    transform: scale(1.1);
}

/* Overlay text styling */
.work-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #c5a059; /* Your brand gold/orange */
    padding: 10px;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
}

/* Responsive: 2 side-by-side on tablets/phones */
@media (max-width: 768px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}