/* --- General & Typography --- */
:root {
    --primary-color: #4D4DCC; /* Dark Blue from Logo */
    --dark-primary: #4D4DCC;  /* Dark Blue from Logo for headings */
    --light-accent: #EBF8FC; /* Very Light Blue, derived from #5EC4E2 */
    --action-color: #E83D3E; /* Solid Red from Logo for hover/actions */
    --background-color: #FFFFFF;
    --pink-color: #F5A8C9;
    --yellow-color:  #F6D35B;
    --Light-Blue-color:  #5EC4E2;    
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Poppins', sans-serif;

}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    margin: 0;
    background-color: var(--background-color);
    color: #333; /* Standard dark grey for body text */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3, h4 {
    font-family: var(--heading-font);
    color: var(--dark-primary); /* Use the new dark green for headings */
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; text-align: center; margin-bottom: 2rem; }
h3 { font-size: 1.5rem; }

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

section {
    padding: 4rem 0;
    /* border-bottom: 1px solid #eee; */ /* Removing border for background color separation */
}

section:last-of-type {
    border-bottom: none;
}

/* --- Header & Navigation --- */
header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Space between logo and text */
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.logo img {
    height: 60px; /* Adjust the height of your logo */
    width: auto;
    vertical-align: middle; /* Helps with alignment */
}

.nav-toggle {
    display: none; /* Hide hamburger by default on PC */
}

#nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.language-switcher {
    margin-left: 1rem;
}
.language-switcher select {
    background-color: transparent;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 5px;
    font-family: var(--body-font);
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    -webkit-appearance: none; /* Removes default OS styling */
    appearance: none; /* Standard property for compatibility */
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-color);
}

/* Underline effect for active/hover nav links */
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after, nav ul li a.active::after {
    width: 100%;
}

/* --- Buttons --- */
.cta-button {
    display: inline-block;
    background-color: var(--Light-Blue-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 50px; /* Fully rounded buttons */
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: 2px solid var(--primary-color);
}

.cta-button:hover {
    background-color: var(--action-color);
    border-color: var(--action-color);
    transform: translateY(-2px);
}

/* --- Hero Section --- */
#hero {
    position: relative; /* Needed for pseudo-element positioning */
    overflow: hidden; /* Hides the parts of the image that zoom out */
    color: #fff; /* White text for better contrast */
    text-align: center;
    padding: 8rem 2rem; /* Increased padding for more impact */
    border-bottom: none;
}

/* The animated background image */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero-background.jpg'); /* Add your image here */
    background-size: cover;
    background-position: center;
    z-index: -2; /* Place it behind the overlay and content */
    animation: zoomOut 2s ease-out forwards; /* Apply the animation */
}

/* The dark overlay for text readability */
#hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* A neutral dark overlay */
    z-index: -1; /* Place it between the image and the content */
}

#hero h1 {
    color: #fff;
    text-shadow: none;
}

#hero .subheading {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 1rem auto 2rem;
}

/* --- Keyframes for the Animation --- */
@keyframes zoomOut {
    from {
        transform: scale(1.1);
    }
    to {
        transform: scale(1);
    }
}

/* --- How It Works Section --- */
#how-it-works { background: var(--light-accent); }
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.step {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
}

/* --- What We Can Help With Section --- */
.help-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Create 6 equal columns */
    gap: 1.5rem;
    margin-top: 2rem;
}

/* --- Flip Card Customization for Help Section --- */
.flip-card {
    background-color: transparent;
    height: 180px;
    perspective: 1000px; /* Gives the 3D effect */
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.1);
    border-radius: 10px;
}

.flip-card:hover .flip-card-inner, .flip-card-inner.is-flipped {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.flip-card-front {
    background-color: var(--light-accent);
}

.flip-card-front i {
    font-size: 2.5rem; /* Make the icon a bit bigger */
    color: var(--pink-color); /* Use the primary brand color */
    margin-bottom: 0.5rem; /* Add some space between icon and title */
}

.flip-card-back {
    background-color: var(--primary-color);
    color: white;
    transform: rotateY(180deg);
}

.flip-card-back h3 { color: white; }
.flip-card-back p { color: white; font-size: 0.9rem; }

/* --- Therapists Page --- */
.therapist-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.therapist-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.therapist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.therapist-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
}

.therapist-info { padding: 1.5rem 2rem 2rem; }
.therapist-info h3 { margin-top: 0; }
.session-details { margin: 1rem 0; font-weight: bold; }

/* --- Services Page --- */
.service-section {
    padding: 3rem 0;
    text-align: center;
}

.service-section.alternate-bg {
    background-color: var(--light-accent);
    border-radius: 10px;
    padding: 4rem 2rem;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.feature-item h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.feature-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.styled-list {
    list-style: none;
    padding: 0;
    max-width: 500px;
    margin: 2rem auto 0;
    text-align: left;
}

.styled-list li { padding-left: 1.5rem; position: relative; margin-bottom: 0.75rem; }
.styled-list li::before { content: '✓'; color: var(--primary-color); position: absolute; left: 0; font-weight: bold; }

/* --- FAQ Page --- */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e0e0e0;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1.5rem 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: var(--heading-font);
    cursor: pointer;
    position: relative;
    color: var(--dark-primary);
}

.faq-question::after { content: '+'; position: absolute; right: 1rem; font-size: 1.5rem; transition: transform 0.3s ease; }
.faq-question.active::after { transform: rotate(45deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* --- Contact Page --- */
.contact-form {
    max-width: 700px;
    margin: 2rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--body-font);
}

.form-success { background: #d4edda; color: #155724; padding: 1rem; border-radius: 5px; margin-bottom: 1rem; text-align: center; }
.form-error { background: #f8d7da; color: #721c24; padding: 1rem; border-radius: 5px; margin-bottom: 1rem; text-align: center; }

/* --- Static Content Pages (Privacy, Terms) --- */
.static-content {
    max-width: 800px;
    margin: 0 auto;
}

.static-content h2 {
    text-align: left;
    margin-top: 2.5rem;
}

/* --- Articles Page --- */
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.article-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    overflow: hidden;
    text-decoration: none;
    color: var(--dark-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-content {
    padding: 1.5rem;
}

.article-card-content h3 {
    margin-top: 0;
}

.article-card-content p {
    color: #333;
}

.read-more {
    font-weight: bold;
    color: var(--primary-color);
}

/* --- Single Article Page --- */
.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-meta {
    font-style: italic;
    color: #6c757d;
    margin-bottom: 2rem;
}

.article-content p {
    margin-bottom: 1.5rem; /* Adds space between paragraphs */
    line-height: 1.7; /* Increases space between lines for readability */
    text-align: justify; /* Justifies the text for a cleaner look */
    text-indent: 2rem; /* Adds space at the beginning of each paragraph */
}

.article-image {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 2rem;
}

/* --- Social Media Icons in Footer --- */
.social-media {
    margin: 1.5rem 0;
}

.social-media a {
    display: inline-block;
    height: 40px;
    width: 40px;
    line-height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--yellow-color);
    margin: 0 8px;
    text-align: center;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-media a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* --- Footer --- */
footer {
    background: var(--dark-primary);
    color: var(--light-accent);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}
footer a {
    color: var(--yellow-color);
    text-decoration: none;
}

/* --- Floating WhatsApp Button --- */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.25);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.1);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }

    .therapist-card {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    .therapist-card img {
        height: 200px;
    }


    /* --- Mobile Navigation --- */
    .nav-toggle {
        display: block; /* Show the hamburger button on mobile */
        background: transparent;
        border: 0;
        cursor: pointer;
        padding: 0.5em;
        position: absolute;
        right: 1.5rem;
        top: 1.2rem;
        z-index: 1001;
    }

    .hamburger {
        display: block;
        position: relative;
        background: var(--primary-color);
        width: 2em;
        height: 3px;
        border-radius: 1em;
        transition: transform 250ms ease-in-out;
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        background: var(--primary-color);
        width: 2em;
        height: 3px;
        border-radius: 1em;
        transition: transform 250ms ease-in-out, opacity 250ms linear;
    }

    .hamburger::before { top: -8px; }
    .hamburger::after { bottom: -8px; }

    /* Hide nav links by default on mobile */
    #nav-menu, #nav-menu.active {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(5px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%); /* Start off-screen */
        transition: transform 350ms ease-in-out;
        margin: 0;
        padding: 0;
    }

    #nav-menu.active {
        transform: translateX(0); /* Bring into view */
    }

    #nav-menu ul {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    #nav-menu li {
        margin-left: 0;
    }

    #nav-menu li a {
        font-size: 1.5rem;
    }

    .nav-cta {
        display: none; /* Hide the main nav CTA, as the menu is full screen */
    }

    /* Stack the "How it works" steps */
    .steps {
        grid-template-columns: 1fr;
    }

    .help-grid {
        grid-template-columns: repeat(2, 1fr); /* Show 2 cards per line on mobile */
    }

    .help-grid {
        grid-template-columns: repeat(2, 1fr); /* Show 2 cards per line on mobile */
    }

    .language-switcher {
        position: absolute;
        top: 1.5rem;
        left: 1.5rem;
        z-index: 1002;
    }

    html[dir="rtl"] .language-switcher {
        left: auto;
        right: 1.5rem;
    }
}

@media (min-width: 992px) {
    .therapist-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .therapist-card {
        flex-direction: row;
    }
    .therapist-card img { width: 40%; height: auto; }
}

/* --- RTL (Arabic) Styles --- */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] nav ul li {
    margin-left: 0;
    margin-right: 25px;
}

html[dir="rtl"] .language-switcher {
    margin-left: 0;
    margin-right: 1rem;
}

html[dir="rtl"] .nav-toggle {
    right: auto;
    left: 1.5rem;
}

html[dir="rtl"] .faq-question::after {
    right: auto;
    left: 1rem;
}

html[dir="rtl"] .styled-list li {
    padding-left: 0;
    padding-right: 1.5rem;
}

html[dir="rtl"] .styled-list li::before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .read-more .fa-arrow-right {
    transform: scaleX(-1); /* Flips the arrow horizontally */
}