:root {
    --primary: #2A4D6E;
    /* Deep navy blue */
    --secondary: #4A707A;
    /* Muted teal */
    --accent: #94B0B7;
    /* Soft slate blue */
    --text: #333333;
    /* Dark gray */
    --background: #F8F9FA;
    /* Off-white */
    --card-bg: #FFFFFF;
    --overlay: rgba(42, 77, 110, 0.9);
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Photo styling */
.profile-photo-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--card-bg);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
    /* Ensure photo stays above header::before */
}

.error-message {
    color: #dc3545;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

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

#toggle-lang-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 24px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    cursor: pointer;
}

#toggle-lang-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

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

#form-errors:empty {
    display: none;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Adjust header spacing */
header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 2rem 2rem 4rem;
    /* Keep photo-adjusted padding */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text);
}



header::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: var(--overlay);
    border-radius: 50%;
}

#title {
    font-weight: 600;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 1.5rem;
    /* Add space between photo and name */
    margin-bottom: 0;
}

#language-toggle {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 24px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 30px;
    right: 30px;
}

#language-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.intro,
.services,
.booking,
.contact {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 2rem auto;
    padding: 2.5rem;
    max-width: 1200px;
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--accent);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.card h3 {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.card h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.card ul {
    list-style: none;
    padding: 0;
}

.card li {
    padding-left: 2rem;
    margin-bottom: 1rem;
    position: relative;
}

.card li::before {
    content: '▹';
    left: 0.5rem;
    right: auto;
    transform: translateY(-50%);
}

html[lang="ar"] .card li {
    padding-left: 0;
    padding-right: 2rem;
    text-align: right;
}

html[lang="ar"] .card li::before {
    content: '◃';
    left: auto;
    right: 0.5rem;
    transform: translateY(-50%);
}


#physio-services li,
#nutrition-services li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    text-align: start;
    /* Ensures proper RTL/LTR alignment */
}

form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

form input,
form select {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

form input:focus,
form select:focus {
    border-color: var(--accent);
    outline: none;
}

form button {
    grid-column: span 2;
    background: var(--primary);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

form button:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: var(--card-bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 3px 10px rgba(42, 77, 110, 0.1);
    outline: none;
}

form button {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

#feedback-note {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text);
}

#feedback-note a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

#feedback-note a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.contact {
    text-align: center;
}

.contact a {
    color: var(--primary);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.contact a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

.contact a:hover::after {
    width: 100%;
}

/* RTL Support */
html[lang="ar"] .profile-photo-container {
    margin: 0 auto 1.5rem;
    /* Maintain centered position */
}

html[lang="ar"] body {
    font-family: 'Noto Sans Arabic', sans-serif;
}

html[lang="ar"] .form-group label {
    text-align: right;
}

html[lang="ar"] .form-group input,
html[lang="ar"] .form-group select {
    text-align: right;
}

html[lang="ar"] .card h3 {
    padding-left: 0;
    padding-right: 1.5rem;
}

html[lang="ar"] .card h3::before {
    left: auto;
    right: 0;
}

html[lang="ar"] .card li {
    padding-left: 0;
    padding-right: 2rem;
    text-align: right;
}

html[lang="ar"] .card li::before {
    content: '▹';
    left: auto;
    right: 0;
    transform: scaleX(-1);
    /* Flip the arrow direction */
}

@media (max-width: 768px) {
    .profile-photo-container {
        width: 90px;
        height: 90px;
    }

    form {
        grid-template-columns: 1fr;
    }

    form button {
        grid-column: span 1;
    }

    header {
        padding: 3rem 1.5rem;
    }

    #language-toggle {
        top: 20px;
        right: 20px;
    }
}

#physio-services,
#nutrition-services {
    padding: 0;
    margin: 0;
    list-style: none;
    display: block !important;
}