/*
 * Public website styles for Alex Rehab Center
 * Modern, cool and elegant theme using red, blue, white and black colours.
 */

/* Colour palette */
:root {
    --color-primary: #e74c3c; /* red */
    --color-secondary: #3498db; /* blue */
    --color-light: #ffffff; /* white */
    --color-dark: #1a1a1a; /* black/dark grey */
    --color-muted: #f7f7f7; /* light grey for backgrounds */
}

html {
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: var(--color-light);
    color: var(--color-dark);
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation */
.site-header {
    background-color: var(--color-dark);
    color: var(--color-light);
}
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}
.brand {
    display: flex;
    align-items: center;
    color: var(--color-light);
    font-size: 1.4rem;
    text-decoration: none;
    font-weight: bold;
}
.brand .logo {
    width: 40px;
    height: 40px;
    margin-right: 8px;
}
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}
.nav-menu li {
    margin: 0;
}
.nav-menu a {
    color: var(--color-light);
    text-decoration: none;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}
.nav-menu a:hover,
.nav-menu a:focus {
    border-bottom-color: var(--color-primary);
}
.lang-switcher a {
    color: var(--color-light);
    margin-left: 10px;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.lang-switcher a.active {
    font-weight: bold;
    border-bottom-color: var(--color-primary);
}
.lang-switcher a:hover {
    border-bottom-color: var(--color-primary);
}

/* Hero section */
.hero {
    position: relative;
    height: 60vh;
    background-image: url('images/cover.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-light);
}
.hero-overlay {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 8px;
}
.hero h1 {
    margin: 0 0 10px;
    font-size: 2.5rem;
}
.hero p {
    margin: 0;
    font-size: 1.2rem;
}

/* Sections */
.section {
    padding: 40px 0;
}
.section-heading {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--color-primary);
}

/* Testimonials */
.testimonials {
    background-color: var(--color-muted);
    padding: 40px 20px;
}
.testimonial-item {
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.testimonial-item p {
    font-style: italic;
    color: #555;
}
.testimonial-item h4 {
    margin-top: 10px;
    font-weight: bold;
    color: var(--color-secondary);
}

/* Cards for stories */
.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}
.card {
    background-color: var(--color-light);
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 300px;
    display: flex;
    flex-direction: column;
}
.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.card-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card-body h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    color: var(--color-primary);
}
.card-body p {
    flex-grow: 1;
    color: #666;
    margin: 0 0 15px;
    line-height: 1.4;
}
.card-body a.read-more {
    align-self: flex-start;
    color: var(--color-secondary);
    font-weight: bold;
    text-decoration: none;
}
.card-body a.read-more:hover {
    text-decoration: underline;
}

/* Button for product cards (ask for details) */
.card-body a.ask-details {
    display: inline-block;
    background-color: var(--color-secondary);
    color: var(--color-light);
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s;
}
.card-body a.ask-details:hover {
    background-color: #2c80b5;
}

/* Make card titles clickable for product cards */
.card-body h3 a {
    color: var(--color-primary);
    text-decoration: none;
}
.card-body h3 a:hover {
    text-decoration: underline;
}

/* Product details images layout */
.product-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}
.product-images img {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

/* Pagination styles */
.pagination {
    margin-top: 20px;
    text-align: center;
}
.pagination a {
    display: inline-block;
    margin: 0 5px;
    padding: 6px 12px;
    border: 1px solid var(--color-secondary);
    color: var(--color-secondary);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}
.pagination a.active {
    background-color: var(--color-secondary);
    color: var(--color-light);
}
.pagination a:hover {
    background-color: var(--color-primary);
    color: var(--color-light);
}

/* Forms */
.form-section {
    background-color: var(--color-muted);
    padding: 40px 20px;
}
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-light);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}
button[type="submit"] {
    background-color: var(--color-primary);
    color: var(--color-light);
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}
button[type="submit"]:hover {
    background-color: #c0392b;
}

/* Footer */
.site-footer {
    background-color: var(--color-dark);
    color: var(--color-light);
    padding: 20px 0;
    margin-top: 40px;
}
.site-footer .footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.site-footer .footer-nav a {
    color: var(--color-light);
    text-decoration: none;
}
.site-footer .footer-nav a:hover {
    text-decoration: underline;
}
.site-footer .copyright {
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-menu {
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }
    .nav-menu a {
        display: block;
    }
    .lang-switcher {
        margin-top: 10px;
    }
    .hero {
        height: 40vh;
    }
    .card {
        width: 100%;
    }
}

/* RTL adjustments */
html[dir="rtl"] .navbar {
    flex-direction: row;
    /* Reverse the order: brand at right, menu before brand */
    justify-content: space-between;
}
html[dir="rtl"] .nav-menu {
    direction: rtl;
}
html[dir="rtl"] .brand .logo {
    margin-left: 8px;
    margin-right: 0;
}
html[dir="rtl"] .card-body {
    text-align: right;
}
html[dir="rtl"] .form-group label,
html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group textarea {
    text-align: right;
}