/* Variables */
:root {
    --primary-color: #007bff; /* Medical blue */
    --secondary-color: #28a745; /* Success green */
    --accent-color: #17a2b8; /* Info blue */
    --dark-color: #343a40; /* Dark grey */
    --light-color: #f8f9fa; /* Light grey */
    --white-color: #ffffff;
    --text-color: #333;
    --heading-color: #222;
    --border-color: #dee2e6;
    --transition-speed: 0.3s;
    --shadow-light: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden; /* Prevent horizontal scroll due to animations */
    -webkit-text-size-adjust: 100%; /* Ensure text doesn't auto-resize on iOS Safari */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--dark-color);
}

ul {
    list-style: none;
}

/* Global Image Responsiveness */
img {
    max-width: 100%; /* Ensures images don't overflow their containers */
    height: auto; /* Maintains aspect ratio */
    display: block; /* Removes extra space below images */
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white-color);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background var(--transition-speed) ease, transform 0.2s ease;
    text-align: center;
    margin: 5px;
}

.btn:hover {
    background: var(--dark-color);
    transform: translateY(-2px);
    color: white;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--dark-color);
    color: white;
}

.text-center {
    text-align: center;
}

.bg-light-blue {
    background-color: #eaf4ff; /* A very light blue */
}

.section-description {
    font-size: 1.1rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

/* --- Header --- */
header {
    background: var(--white-color);
    color: var(--dark-color);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 1; /* Allows the logo container to reduce its size if space is limited */
    min-width: 0;   /* Prevents the logo content (like the H1 text) from setting an inflexible minimum width */
}

.logo img {
    height: 40px;
    margin-right: 10px;
    flex-shrink: 0; /* Ensures the logo image itself doesn't shrink more than intended */
}

.logo h1 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--primary-color);
    white-space: nowrap; /* Keep this for larger screens; it will be overridden for smaller ones */
    overflow: hidden; /* Helps prevent overflow if text is too long before wrapping */
    text-overflow: ellipsis; /* Adds "..." if text is cut off */
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-left: 25px;
}

.main-nav ul li a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    left: 0;
    bottom: -5px;
    transition: width var(--transition-speed) ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--dark-color);
    flex-shrink: 0; /* Prevents the toggle button from shrinking */
}

/* Mobile Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: -250px; /* Hidden by default */
    width: 250px;
    height: 100%;
    background-color: var(--dark-color);
    padding: 20px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    transition: right 0.3s ease-in-out;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    right: 0; /* Show sidebar */
}

.sidebar .close-btn {
    text-align: right;
    margin-bottom: 20px;
    font-size: 1.8rem;
    color: var(--white-color);
    cursor: pointer;
}

.sidebar nav ul {
    display: flex;
    flex-direction: column;
}

.sidebar nav ul li {
    margin: 10px 0;
}

.sidebar nav ul li a {
    color: var(--white-color);
    font-size: 1.1rem;
    display: block;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* --- Hero Section --- */
.hero, .page-hero {
    height: 70vh; /* Shorter for specific pages */
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    text-align: center;
    position: relative;
    padding: 20px;
}

.hero::before, .page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Dark overlay */
    z-index: 1;
}

.hero .container, .page-hero .container {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.hero-title, .page-hero .hero-title {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: var(--white-color);
    line-height: 1.2;
}

.hero-subtitle, .page-hero .hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

.hero .btn {
    margin: 10px;
    min-width: 150px;
}

/* --- NEW/MODIFIED: Contact Page Hero Specific Height --- */
.contact-page-banner {
    height: 40vh; /* Makes the contact page hero shorter */
    min-height: 280px; /* Ensures a minimum height even on very small screens */
}


/* --- Sections Styling --- */
section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-color);
}

section:last-of-type {
    border-bottom: none;
}

/* --- About Us Preview (Homepage) --- */
.about-us-preview .about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}

.about-us-preview .about-img {
    flex: 1;
    min-width: 300px;
    max-width: 500px; /* Max size on larger screens */
    border-radius: 10px; /* Added border-radius */
    box-shadow: var(--shadow-medium);
    height: auto;
    transition: transform var(--transition-speed) ease; /* Added transition for hover */
    /* *** ADDED/UPDATED FOR IPAD/IPHONE DISPLAY *** */
    object-fit: cover;
    object-position: center;
}

.about-us-preview .about-img:hover {
    transform: scale(1.02); /* Added subtle zoom animation on hover */
}

.about-us-preview .about-content > div {
    flex: 2;
    min-width: 300px;
}

/* --- Mission, Vision, Values --- */
.mission-vision-section {
    background-color: var(--white-color);
    text-align: center;
}

.mission-vision-section h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

.mission-vision-section p, .mission-vision-section ul {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.mission-vision-section ul {
    list-style-type: disc; /* Use discs for bullet points */
    text-align: left;
    padding-left: 20px;
}

.mission-vision-section ul li {
    margin-bottom: 10px;
}

.mission-vision-section ul li strong {
    color: var(--heading-color);
}

/* --- Services Preview (Homepage) --- */
.services-preview .service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.services-preview .service-item {
    background: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.services-preview .service-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.services-preview .service-item .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.services-preview .service-item h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.services-preview .service-item p {
    color: #555;
}

/* --- Call to Action --- */
.call-to-action {
    background-size: cover;
    background-position: center;
    color: var(--white-color);
    text-align: center;
    padding: 70px 20px; /* MODIFIED: Reduced padding from 100px to 70px */
    position: relative;
}

.call-to-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Darker overlay */
    z-index: 1;
}

.call-to-action .container {
    position: relative;
    z-index: 2;
}

.call-to-action h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--white-color);
}

.call-to-action p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
}

/* --- ABOUT PAGE SPECIFIC STYLES --- */
.about-section {
    padding: 80px 0;
}

.about-section .story-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
}

.about-section .profile-img {
    flex: 1;
    min-width: 300px;
    max-width: 500px; /* Max size on larger screens */
    border-radius: 10px; /* Added border-radius */
    box-shadow: var(--shadow-medium);
    height: auto;
    transition: transform var(--transition-speed) ease; /* Added transition for hover */
    /* *** ADDED/UPDATED FOR IPAD/IPHONE DISPLAY *** */
    object-fit: cover;
    object-position: center;
}

.about-section .profile-img:hover {
    transform: scale(1.02); /* Added subtle zoom animation on hover */
}

.about-section .story-content > div {
    flex: 2;
    min-width: 300px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-section .principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.about-section .principle-item {
    background: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
}

.about-section .principle-item h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.6rem;
}

.about-section .principle-item p {
    font-size: 1.05rem;
    color: #555;
}

.about-section .core-values-detailed {
    margin-top: 40px;
}

.about-section .core-values-detailed ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    list-style: none; /* Remove default list style */
    padding: 0;
}

.about-section .core-values-detailed li {
    background-color: var(--white-color);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.about-section .core-values-detailed li .icon-small {
    font-size: 1.8rem;
    color: var(--primary-color);
    flex-shrink: 0; /* Prevent icon from shrinking */
    padding-top: 5px; /* Align icon better with text */
}

.about-section .core-values-detailed li strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1.2rem;
    color: var(--heading-color);
}

.about-section .core-values-detailed li p {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

.about-section .choose-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.about-section .choose-us-item {
    background: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-section .choose-us-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.about-section .choose-us-item .icon-large {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-section .choose-us-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.about-section .choose-us-item p {
    color: #555;
    font-size: 1.05rem;
}

/* --- SERVICES PAGE SPECIFIC STYLES --- */
.services-intro .intro-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}

.services-intro .intro-image {
    flex: 1;
    min-width: 300px;
    max-width: 500px; /* Max size on larger screens */
    border-radius: 10px; /* Added border-radius */
    box-shadow: var(--shadow-medium);
    height: auto;
    transition: transform var(--transition-speed) ease; /* Added transition for hover */
    /* *** ADDED/UPDATED FOR IPAD/IPHONE DISPLAY *** */
    object-fit: cover;
    object-position: center;
}

.services-intro .intro-image:hover {
    transform: scale(1.02); /* Added subtle zoom animation on hover */
}

.services-intro .intro-content > div {
    flex: 2;
    min-width: 300px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.services-list {
    padding: 80px 0;
}

.services-list .service-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.services-list .service-category-card {
    background: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.services-list .service-category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.services-list .service-category-card .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
}

.services-list .service-category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
    color: var(--primary-color);
}

.services-list .service-category-card ul {
    list-style: none; /* Remove default browser bullet */
    padding: 0;
    margin-top: 10px;
}

.services-list .service-category-card ul li {
    padding: 8px 0;
    border-bottom: 1px dotted var(--border-color);
    font-size: 1.05rem;
    color: #555;
    display: flex;
    align-items: center;
}

.services-list .service-category-card ul li:last-child {
    border-bottom: none;
}

.services-list .service-category-card ul li::before {
    content: "\f00c"; /* Font Awesome checkmark icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--secondary-color);
    margin-right: 10px;
    font-size: 0.9em;
}

/* --- TEAM PAGE SPECIFIC STYLES --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.team-member-card {
    background: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-member-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.team-member-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover; /* Crucial for circular images */
    object-position: center; /* Ensures the focus of the image is centered */
    margin-bottom: 20px;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 0 5px rgba(0, 123, 255, 0.2);
}

.team-member-card h3 {
    font-size: 1.6rem;
    margin-bottom: 5px;
    color: var(--heading-color);
}

.team-member-card .title {
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.team-member-card p {
    font-size: 1rem;
    color: #555;
    flex-grow: 1; /* Allow text to grow and push social links down */
}

.team-member-card .social-links {
    margin-top: 20px;
}

.team-member-card .social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    border-radius: 50%;
    background: var(--light-color);
    color: var(--primary-color);
    margin: 0 5px;
    transition: background 0.3s ease, color 0.3s ease;
}

.team-member-card .social-links a:hover {
    background: var(--primary-color);
    color: var(--white-color);
}

/* --- FAQ PAGE SPECIFIC STYLES --- */
.faq-accordion {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.faq-item {
    background: var(--white-color);
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    overflow: hidden; /* Hide overflow from content */
    transition: all 0.3s ease;
}

.faq-item.active {
    box-shadow: var(--shadow-medium);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px 25px;
    background-color: var(--white-color);
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #f0f0f0;
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--heading-color);
    flex-grow: 1;
}

.accordion-header .toggle-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.active .accordion-header .toggle-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0; /* Hidden by default */
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 25px; /* Only apply horizontal padding */
    box-sizing: border-box;
}

.accordion-content p {
    padding-bottom: 20px; /* Spacing for text when open */
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
}

/* --- CONTACT PAGE SPECIFIC STYLES --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.contact-item {
    background: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.contact-item .icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.contact-item p {
    color: #555;
    font-size: 1.05rem;
}

.contact-item a {
    color: var(--primary-color);
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Contact Form Styling */
.form-container {
    background: var(--white-color);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-medium);
    max-width: 700px;
    margin: 40px auto; /* Center the form */
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--heading-color);
    font-size: 1.05rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); /* Light blue shadow on focus */
    outline: none;
}

.contact-form textarea {
    resize: vertical; /* Allow vertical resizing only */
    min-height: 120px;
}

.contact-form button[type="submit"] {
    width: auto; /* Allow button to size naturally */
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: block; /* Make it a block element to control alignment */
    margin: 0 auto; /* Center the button */
}

.contact-form button[type="submit"]:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
}

/* Map Section */
#location-map {
    padding: 0; /* Remove top/bottom padding as iframe handles height */
    overflow: hidden; /* Ensure no scrollbars from iframe */
    width: 100%; /* Ensure map container takes full width */
    margin-top: 40px; /* Space from contact form */
    margin-bottom: 40px;
}
#location-map iframe {
    width: 100%; /* Ensure iframe takes full width of its container */
    height: 400px; /* Set a default height for the map */
    border-radius: 10px; /* Match other section designs */
    box-shadow: var(--shadow-medium);
    display: block; /* Remove extra space below iframe */
}
.sr-only { /* Screen reader only text */
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


/* --- Footer --- */
footer {
    background: var(--dark-color);
    color: var(--white-color);
    padding: 40px 0 20px 0;
    font-size: 0.95rem;
}

footer .footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section ul li a:hover {
    color: var(--white-color);
    text-decoration: underline;
}

.footer-section.contact-info p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-section.contact-info .fas {
    color: var(--primary-color);
    font-size: 1.1em;
    padding-top: 2px;
}

.footer-section.contact-info a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section.contact-info a:hover {
    color: var(--white-color);
}

.footer-section .social-links a {
    display: inline-block;
    width: 38px;
    height: 38px;
    line-height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white-color);
    text-align: center;
    margin-right: 10px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.footer-section .social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding-top: 20px;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    display: none; /* Hidden by default, controlled by JS */
    z-index: 999;
}

#back-to-top:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    .main-nav {
        display: none; /* Hide main nav on smaller screens */
    }

    .menu-toggle {
        display: block; /* Show mobile menu icon */
        flex-shrink: 0;
    }

    .hero-title, .page-hero .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle, .page-hero .hero-subtitle {
        font-size: 1.2rem;
    }

    .about-us-preview .about-content,
    .services-intro .intro-content,
    .about-section .story-content {
        flex-direction: column;
        text-align: center;
    }

    .about-us-preview .about-img,
    .services-intro .intro-image,
    .about-section .profile-img {
        /* Adjusted for general mobile screens - mimicking team member image approach */
        max-width: 280px; /* Increased slightly for better visual on larger phones/small tablets */
        margin: 0 auto 30px auto; /* Center image when stacked */
        height: auto; /* Ensure height adjusts proportionally */
        object-fit: cover; /* Ensure it fills and crops if needed */
        object-position: center;
    }

    .about-us-preview .about-content > div,
    .services-intro .intro-content > div,
    .about-section .story-content > div {
        min-width: unset;
        width: 100%;
    }

    .mission-vision-section h3 {
        font-size: 1.6rem;
    }

    .services-preview .service-grid,
    .about-section .principles-grid,
    .about-section .choose-us-grid,
    .services-list .service-category-grid,
    .team-grid,
    .contact-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjusted minmax for better fit */
    }

    .call-to-action h2 {
        font-size: 2.2rem;
    }

    .call-to-action p {
        font-size: 1.1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-section {
        min-width: unset;
        width: 100%;
        margin-bottom: 25px;
    }

    .footer-section.contact-info p {
        justify-content: center;
    }

    .footer-section .social-links {
        display: flex;
        justify-content: center;
    }

    .accordion-header h3 {
        font-size: 1.1rem;
    }

    /* MODIFIED: Responsive adjustments for the contact-page-banner on smaller screens */
    .contact-page-banner {
        height: 35vh; /* Even shorter on tablets */
        min-height: 220px;
    }
}

/* --- Specific adjustment for wider mobile screens (e.g., iPhone 12 Pro Max) --- */
@media (min-width: 421px) and (max-width: 576px) {
    .about-us-preview .about-img,
    .services-intro .intro-image,
    .about-section .profile-img {
        max-width: 220px; /* Reduced max-width for tighter control on wider phones */
        margin: 0 auto 30px auto; /* Ensure it remains centered */
    }

    .team-member-card img {
        width: 130px; /* Slightly larger for visual balance */
        height: 130px;
    }
}

@media (max-width: 576px) {
    /* Main logo heading adjustments for very small screens */
    .logo h1 {
        font-size: 1.3rem; /* Slightly smaller font size for tight spaces */
        white-space: normal; /* IMPORTANT: Allows the text to wrap onto multiple lines */
        line-height: 1.2;    /* Ensures good line spacing if text wraps */
        text-overflow: clip; /* Remove ellipsis when text is cut off */
    }

    /* Optional: Shrink logo image slightly for very small screens */
    .logo img {
        height: 35px;
        margin-right: 8px;
    }

    /* Adjust header container padding for maximum horizontal space */
    header .container {
        padding: 15px 10px; /* Reduced horizontal padding to give content more room */
    }

    /* General container padding adjustment for all sections on very small screens */
    .container {
        width: 95%; /* Use more of the available screen width */
        padding: 15px 10px; /* Add explicit horizontal padding */
    }

    /* Hero section font sizes */
    .hero-title, .page-hero .hero-title {
        font-size: 2rem; /* Adjusted for very small screens */
    }

    .hero-subtitle, .page-hero .hero-subtitle {
        font-size: 0.9rem; /* Adjusted for very small screens */
    }

    /* Button adjustments for hero section */
    .hero .btn {
        display: block;
        width: 90%; /* Buttons take up more width, stack vertically */
        margin: 8px auto;
    }

    /* Section padding adjustments */
    section {
        padding: 40px 0; /* Reduced vertical padding for compact layout */
    }

    /* Heading sizes within sections */
    h2 {
        font-size: 1.6rem;
    }
    h3 {
        font-size: 1.2rem;
    }

    /* Padding for various content cards/items */
    .services-preview .service-item,
    .about-section .principle-item,
    .about-section .choose-us-item,
    .team-member-card,
    .contact-item {
        padding: 15px; /* Reduced internal padding for smaller footprint */
    }

    /* Core values list items */
    .about-section .core-values-detailed li {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    /* Call to action section */
    .call-to-action h2 {
        font-size: 1.6rem;
    }

    .call-to-action p {
        font-size: 0.95rem;
    }

    /* Form container and button */
    .form-container {
        padding: 20px;
    }

    .contact-form button[type="submit"] {
        width: 100%;
    }

    /* MODIFIED: Responsive adjustments for the contact-page-banner on smaller screens */
    .contact-page-banner {
        height: 30vh; /* Shorter still on mobile phones */
        min-height: 180px;
    }
}

/* Even smaller breakpoint for very narrow screens like iPhone SE in portrait, iPhone 5 (320px) */
@media (max-width: 420px) {
    .container {
        width: 98%; /* Maximize space for content */
        padding: 10px 5px; /* Minimal padding */
    }

    .logo h1 {
        font-size: 1.1rem; /* Even smaller font for logo */
    }

    .logo img {
        height: 30px; /* Slightly smaller logo image */
        margin-right: 5px;
    }

    /* Adjust header container to ensure spacing */
    header .container {
        padding: 10px 5px; /* Even less horizontal padding for extremely narrow screens */
    }

    .hero-title, .page-hero .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle, .page-hero .hero-subtitle {
        font-size: 0.8rem;
    }

    .hero .btn {
        width: 95%; /* Even wider buttons */
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    section {
        padding: 30px 0; /* Reduced section padding */
    }

    h2 {
        font-size: 1.4rem;
    }
    h3 {
        font-size: 1.1rem;
    }

    /* Force single column layout for all relevant grids on smallest screens */
    .services-preview .service-grid,
    .about-section .principles-grid,
    .about-section .choose-us-grid,
    .services-list .service-category-grid,
    .team-grid,
    .contact-grid {
        grid-template-columns: 1fr; /* Force single column layout for smallest screens */
        gap: 15px;
    }

    /* Image specific adjustments for very small screens */
    .about-us-preview .about-img,
    .services-intro .intro-image,
    .about-section .profile-img {
        max-width: 160px; /* Adjusted to be slightly larger than team member images (150px) for visual hierarchy */
        margin: 0 auto 15px auto;
        /* object-fit: cover is inherited, ensuring good cropping */
    }

    .team-member-card img {
        width: 120px;
        height: 120px;
    }

    .accordion-header {
        padding: 15px 18px;
    }
    .accordion-header h3 {
        font-size: 1rem;
    }
    .accordion-content p {
        font-size: 0.95rem;
        padding-bottom: 15px;
    }

    .form-container {
        padding: 15px;
    }

    .contact-form label {
        font-size: 1rem;
    }

    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form input[type="tel"],
    .contact-form textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .contact-form button[type="submit"] {
        padding: 10px 20px;
        font-size: 1rem;
    }

    #location-map iframe {
        height: 300px; /* Slightly reduced map height */
    }

    /* MODIFIED: Responsive adjustments for the contact-page-banner on very small screens */
    .contact-page-banner {
        height: 25vh; /* Further reduction for very small screens */
        min-height: 150px;
    }

    /* Adjust footer social links alignment if needed, though they should center with flex */
    .footer-section .social-links {
        display: flex;
        justify-content: center;
        gap: 10px; /* Add a small gap between social icons */
    }
}
