/* General Body Styles */
body {
    font-family: 'Heebo', sans-serif;
    line-height: 1.8;
    margin: 0;
    padding: 0;
    color: #333;
    direction: rtl;

    background-image: url('./math_background.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* START: Accessibility Fixes */
.skip-link {
    position: absolute;
    top: -1000px;
    left: 0;
    background: #fff;
    padding: 0.5rem 1rem;
    border: 2px solid #000;
    z-index: 9999;
    color: #000;
    font-weight: bold;
    text-decoration: none;
}
.skip-link:focus {
    top: 10px;
    left: 10px;
}

a:focus-visible, 
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #FFAB00;
  outline-offset: 2px;
  border-radius: 2px; /* Optional for better look */
}
/* END: Accessibility Fixes */

/* --- שינוי מרכזי --- */
/* סרגל ניווט עליון - רקע לבן ברוחב מלא */
.top-nav {
    background: #fff;
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-weight: 700;
    font-size: 1.5rem;
    color: #005A9C;
    text-decoration: none;
}

/* Header - עכשיו יש לו את רקע הטקסטורה */
header {
    background: url('./cubes_texture.png'), linear-gradient(to right, #eef5ff, #f8faff);
    color: #333;
}

/* העטיפה שמתחילה *מתחת* ל-header */
.site-wrapper {
    max-width: 1100px;
    margin: 20px auto;
    background-color: #f9f9f9;
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
}

.container {
    max-width: 960px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

/* Hero Section content styling */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
}

.hero h1 {
    margin: 0 0 15px 0;
    font-size: 2.8rem;
    color: #003366;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
}

.cta-button {
    background: #0D47A1; /* Contrast Fix */
    color: #fff;
    padding: 12px 25px;
    font-size: 1.1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background: #002171; /* Darker hover for the new color */
}

/* Navigation Buttons Style */
.nav-buttons {
    margin-top: 30px;
}

.nav-buttons ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-buttons a {
    display: block;
    background-color: rgba(0, 123, 255, 0.1);
    color: #0056b3;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid rgba(0, 123, 255, 0.2);
    transition: all 0.3s ease-in-out;
}

.nav-buttons a:hover {
    background-color: rgba(0, 123, 255, 0.2);
    transform: translateY(-2px);
}


/* Main Content Sections */
main {
    padding-top: 1px;
}
main section {
    background: #fff;
    margin: 20px 0;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

h2 {
    color: #005A9C;
    border-bottom: 3px solid #f0f0f0;
    padding-bottom: 15px;
    margin-top: 0;
    text-align: center;
    margin-bottom: 30px;
}

/* About Section */
#about .about-content {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

#about .about-text {
    flex: 2;
    min-width: 300px;
}

#about .about-image {
    flex: 1;
    text-align: center;
    min-width: 200px;
}

#about img {
    max-width: 250px;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Services Section */
.service-cards {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.card {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    border: 1px solid #eee;
    min-width: 250px;
}

.card h3 {
    margin-top: 0;
    color: #0645AD; /* Contrast Fix */
}

/* Why Me Section */
#why-me ul {
    list-style: none;
    padding: 0;
}

#why-me li {
    padding: 10px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #f0f0f0;
}

#why-me li:before {
    content: '✔';
    color: #2E7D32; /* Contrast Fix (darker green) */
    margin-left: 10px;
    font-weight: bold;
}

/* Testimonials Section */
#testimonials .testimonial {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-right: 5px solid #0645AD; /* Contrast Fix */
}

#testimonials cite {
    display: block;
    margin-top: 10px;
    font-style: normal;
    font-weight: bold;
    color: #555;
}


/* Contact Section */
#contact > p {
    text-align: center;
}

.contact-details {
    text-align: center;
    font-size: 1.2rem;
    margin-top: 40px;
}

.contact-details p {
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.contact-details a {
    color: #0645AD; /* Contrast Fix */
    text-decoration: none;
    font-weight: bold;
}

.contact-details a:hover {
    text-decoration: underline;
}

.contact-icon {
    width: 28px;
    height: 28px;
    vertical-align: middle;
}


/* Contact Form Style */
.contact-form {
    max-width: 600px;
    margin: 30px auto 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Heebo', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.form-group-checkbox input[type="checkbox"] {
    width: auto;
    flex-shrink: 0;
}
.form-group-checkbox label {
    margin-bottom: 0;
    font-weight: normal;
}
.form-group-checkbox a {
    color: #0645AD; /* Contrast Fix */
    text-decoration: underline;
}


.contact-form button[type="submit"] {
    display: block;
    width: 100%;
    padding: 12px;
    background: #2E7D32; /* Contrast Fix */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button[type="submit"]:hover {
    background: #1b5e20; /* Darker hover for the new color */
}

/* START: Styles for Phone Field */
.phone-group {
    display: flex;
    gap: 10px;
    flex-direction: row-reverse;
}

.phone-group select {
    flex-basis: 120px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Heebo', sans-serif;
    font-size: 1rem;
    background-color: #fff;
    box-sizing: border-box;
}

.phone-group input {
    flex-grow: 1;
    text-align: left;
}

.error-message {
    color: #d93025;
    font-size: 0.9rem;
    display: block;
    margin-top: 5px;
    min-height: 1em;
}
/* END: Styles for Phone Field */


/* Footer Styles */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    background: #333;
    color: #fff;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Styles for legal pages content */
.legal-page-content h2 {
    text-align: right;
    border-bottom: none;
    color: #003366;
    margin-top: 30px;
}

.legal-page-content p, .legal-page-content li {
    font-size: 1.1rem;
    line-height: 1.9;
}

.legal-page-content ul {
    padding-right: 20px;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 40px;
    font-size: 1.2rem;
    font-weight: bold;
}
.back-link a {
    color: #0645AD; /* Contrast Fix */
    text-decoration: none;
}
.back-link a:hover {
    text-decoration: underline;
}