/* General Styling */
:root {
    --primary-color: #5d0240; /* Deep Purple from Tay Law Logo */
    --secondary-color: #8c0364; /* Lighter Purple */
    --accent-color: #c0c0c0; /* Light Grey for accents */
    --text-color: #333;
    --light-bg: #f9f9f9;
    --dark-bg: #e9e9e9;
    --white: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    direction: rtl; /* Set text direction to Right-to-Left */
    text-align: right; /* Align text to the right for RTL */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.btn:hover {
    background: var(--secondary-color);
    text-decoration: none;
}

/* Header Styling */
header {
    background: var(--white);
    color: var(--text-color);
    padding: 10px 0;
    border-bottom: 1px solid var(--accent-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.logo-name {
    display: flex;
    align-items: center;
}

.logo {
    height: 60px; /* Adjust as needed */
    margin-left: 15px;
}

header h1 {
    margin: 0;
    font-size: 24px;
    color: var(--primary-color);
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-right: 20px;
}

header nav ul li a {
    color: var(--primary-color);
    font-weight: 700;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Hero Section */
#hero {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('Logo.jpeg') no-repeat center center/cover;
    /* You can replace 'background-image.jpg' with a more suitable image if available */
    text-align: center;
    padding: 100px 0;
    color: var(--primary-color);
}

#hero h2 {
    font-size: 3em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

#hero p {
    font-size: 1.2em;
    color: var(--text-color);
}

/* Sections Styling */
section {
    padding: 60px 0;
}

section.alt-bg {
    background: var(--light-bg);
}

/* About Section */
#about .description {
    font-size: 1.1em;
    line-height: 1.8;
}

#about .details {
    background: var(--dark-bg);
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

#about .details p {
    margin-bottom: 10px;
}

/* Services Section */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-item {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.5em;
}

/* Contact Section */
.contact-info p {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.contact-btn {
    background: #25D366; /* WhatsApp Green */
    color: var(--white);
}

.contact-btn:hover {
    background: #1DA851;
}

/* Hours Table */
.hours-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden; /* Ensures rounded corners apply to content */
}

.hours-table th,
.hours-table td {
    border: 1px solid var(--accent-color);
    padding: 12px 15px;
    text-align: center;
}

.hours-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 700;
}

.hours-table tr:nth-child(even) {
    background-color: var(--dark-bg);
}

/* Facilities Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-item {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.feature-item ul {
    list-style: none;
    padding: 0;
}

.feature-item ul li {
    margin-bottom: 8px;
    position: relative;
    padding-right: 25px; /* Space for custom bullet */
}

.feature-item ul li::before {
    content: '✓'; /* Checkmark for list items */
    color: var(--secondary-color);
    position: absolute;
    right: 0;
    top: 0;
}


/* Footer Styling */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.designed-by {
    margin-top: 20px;
    display: flex;
    align-items: center;
    flex-direction: column; /* Stack text and logo vertically */
}

.designed-by p {
    margin: 0 0 10px 0;
    font-size: 0.9em;
}

.sbay-logo {
    height: 40px; /* Adjust size as needed */
    filter: brightness(0) invert(1); /* Make the logo white for dark background if it's colorful */
}


/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    header nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    header nav ul li {
        margin: 0 10px 10px 10px;
    }

    .logo-name {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        margin: 0 auto 10px auto;
    }

    #hero h2 {
        font-size: 2em;
    }

    .service-grid, .features-grid {
        grid-template-columns: 1fr;
    }

    .hours-table th, .hours-table td {
        font-size: 0.9em;
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 20px;
    }

    #hero h2 {
        font-size: 1.5em;
    }

    .btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }

    .contact-info p {
        font-size: 1em;
    }

    .hours-table th, .hours-table td {
        font-size: 0.8em;
        padding: 5px 8px;
    }
}