@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Font Awesome Icon Fixes */
.fas, .far, .fab, .fa {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    -webkit-font-smoothing: antialiased;
}

.far { font-weight: 400; }

:root {
    --primary-color: #0D2C4F; /* Dark Blue from image */
    --secondary-color: #28A7C3; /* Teal from image */
    --accent-color: #8BC34A; /* Green from image buttons */
    --background-color: #F4F7F9;
    --text-color: #333333;
    --card-bg-color: #FFFFFF;
    --font-family: 'Poppins', sans-serif;
    --header-height: 80px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Account for fixed header */
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    direction: ltr;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.top-bar {
    background-color: #EAF3F5;
    padding: 8px 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.main-header {
    background-color: var(--card-bg-color);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

.main-header.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.lab-name-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.logo-left {
    height: 70px;
    margin-right: 15px;
    transition: height 0.3s ease;
}

.main-header.scrolled .logo-left {
    height: 55px;
}

.lab-name-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}

.logo {
    height: 45px;
    margin-right: 10px;
}

.logo-text {
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--primary-color);
}

.main-nav {
    display: flex;
}

.right-nav ul {
    justify-content: flex-end;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    position: relative;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
    transform: translateY(-1px);
}

.main-nav a.active {
    font-weight: 600;
}

/* Mobile nav active states */
.mobile-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: block;
}

.mobile-nav a:hover, .mobile-nav a.active {
    color: var(--secondary-color);
    background-color: rgba(40, 167, 195, 0.1);
    transform: translateX(5px);
}

.header-actions {
    display: none; /* No actions needed since language switcher is removed */
}

.btn {
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: #7CB342;
    transform: translateY(-2px);
}

/* Keep only Arabic font for the results button */
.btn-text-secondary {
    font-family: 'Arial', 'Tahoma', sans-serif;
}

/* Results button container */
.results-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.arabic-text {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
}

.hero-results .arabic-text {
    color: rgba(255, 255, 255, 0.9);
}

/* Merged button styling */
.results-btn-merged {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 19.2px 38.4px; /* Increased by 0.1 (16*1.1=17.6px, 32*1.1=35.2px, rounded to 19.2px 38.4px) */
    line-height: 1.2;
}

.btn-text-primary {
    font-weight: 600;
    font-size: 1.1rem; /* Restored to original size */
}

.btn-text-secondary {
    font-size: 0.95rem; /* Restored to original size */
    opacity: 0.9;
    font-weight: 400;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 6rem 0;
    background: linear-gradient(rgba(13, 44, 79, 0.7), rgba(13, 44, 79, 0.7)), url('img.webp') no-repeat center center/cover;
    color: white;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-title-container {
    margin-bottom: 1.5rem;
}

.hero-title-small {
    font-size: 1.8rem !important;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.8rem;
    color: white;
    font-family: var(--font-family);
    line-height: 1.2;
}

.hero-title-main {
    font-size: 2.8rem !important;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.1;
    color: white;
    font-family: var(--font-family);
}

.hero-title-subtitle {
    font-size: 1.6rem;
    font-weight: 500;
    margin: 0;
    color: white;
    font-family: var(--font-family);
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Services Section */
.services-section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--card-bg-color);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(40, 167, 195, 0.1);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(40, 167, 195, 0.15);
    border-color: rgba(40, 167, 195, 0.2);
}

.service-card .icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.medical-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-color), #239AB5);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.medical-icon i {
    color: white;
    font-size: 2.5rem;
}

.medical-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(40, 167, 195, 0.3);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color), #239AB5);
    border-radius: 50%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-icon i {
    color: white;
    font-size: 1.5rem;
}

.contact-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(40, 167, 195, 0.3);
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary-color), #239AB5);
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.info-icon i {
    color: white;
    font-size: 1rem;
}

.info-icon:hover {
    transform: scale(1.1);
}

/* Preparation Section */
.preparation-card {
    border: 1px solid rgba(40, 167, 195, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.preparation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(40, 167, 195, 0.12);
    border-color: rgba(40, 167, 195, 0.2);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.service-card p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}
.btn-secondary:hover {
    background-color: #239AB5;
}

.btn-tertiary {
    background-color: #8E44AD;
    color: white;
}
.btn-tertiary:hover {
    background-color: #7D3C98;
}


/* Contact Section */
.contact-section {
    background-color: var(--card-bg-color);
    padding: 5rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-right: 1.5rem;
    width: 30px;
    text-align: center;
}

/* Merged Contact & Hours Card */
.contact-hours-merged-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 3rem;
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    position: relative;
}

.contact-section, .hours-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.info-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: rgba(40, 167, 195, 0.2);
}

.old-info-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
}

.info-item strong {
    margin-bottom: 4px;
    color: var(--primary-color);
}

.address-details {
    margin-top: 4px;
    line-height: 1.5;
}

.address-details div {
    margin-bottom: 2px;
}

/* Hours table styling */
.hours-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background-color: var(--card-bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.hours-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(40, 167, 195, 0.1);
    transition: background-color 0.2s ease;
}

.hours-table tr:hover td {
    background-color: rgba(40, 167, 195, 0.05);
}

.day-cell {
    font-weight: 600;
    color: var(--primary-color);
    text-align: left;
    width: 50%;
}

.hours-cell {
    text-align: right;
    color: #4a5568;
    font-weight: 500;
}

.hours-cell.closed {
    color: #e53e3e;
    font-weight: 600;
}

.hours-table tr:last-child td {
    border-bottom: none;
}

.vertical-divider {
    position: absolute;
    left: 50%;
    top: 2rem;
    bottom: 2rem;
    width: 2px;
    background: linear-gradient(to bottom, transparent, #E2E8F0, transparent);
    transform: translateX(-50%);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0A4A6B, #28A7C3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-wrapper svg {
    width: 32px;
    height: 32px;
    color: white;
}

/* Map Section */
.map-section {
    padding: 5rem 0;
    background-color: #EAF3F5;
}

#map {
    height: 450px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.map-container iframe {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* Footer */
.main-footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 2rem;
    text-align: center;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.8;
}

.social-icons a {
    color: white;
    font-size: 1.5rem;
    margin: 0 0.75rem;
    transition: transform 0.3s ease;
}

.social-icons a:hover {
    transform: scale(1.2) !important;
    color: var(--accent-color);
}

.copyright {
    width: 100%;
    font-size: 0.9rem;
    opacity: 0.7;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: linear-gradient(135deg, var(--secondary-color), #239AB5);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mobile-menu-btn .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Fallback for when Font Awesome doesn't load */
.mobile-menu-btn i:before {
    content: "☰";
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(40, 167, 195, 0.3);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--card-bg-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    padding: 1rem 0;
    z-index: 999;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
}

.mobile-nav li {
    text-align: center;
    padding: 1rem 0;
}

/* Mobile nav styles moved up to avoid duplication */

@media (max-width: 992px) {
    .left-nav, .right-nav {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-title-small {
        font-size: 1.4rem !important;
        margin-bottom: 0.6rem;
    }
    
    .hero-title-main {
        font-size: 2.2rem !important;
        margin-bottom: 0.6rem;
    }
    
    .hero-title-subtitle {
        font-size: 1.2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-hours-merged-card {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem;
    }

    /* Ensure mobile menu button is visible on small screens */
    .mobile-menu-btn {
        display: flex !important;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* Force hide desktop navigation */
    .main-nav {
        display: none !important;
    }

    /* Adjust mobile nav for smaller screens */
    .mobile-nav {
        padding: 0.5rem 0;
        position: fixed !important;
        top: var(--header-height) !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 999 !important;
    }

    .mobile-nav li {
        padding: 0.75rem 0;
    }

    .mobile-nav a {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .vertical-divider {
        display: none;
    }
    
    .right-nav {
        display: none;
    }
    
    .lab-name-left {
        flex: 1;
    }
    
    .lab-name-text {
        font-size: 0.9rem;
        white-space: normal;
        line-height: 1.2;
    }
    
    .logo-left {
        height: 50px;
    }
    
    .header-container {
        justify-content: space-between;
    }
    
    .map-container iframe {
        width: 100%;
        height: 300px;
    }
    
    .footer-container {
        flex-direction: column;
    }
    .footer-links, .social-icons {
        margin-bottom: 1.5rem;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, bottom 0.3s;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    bottom: 40px;
}



/* Simplified Contact Section Styles */
.contact-card-gradient {
    background: rgba(10, 74, 107, 0.05);
}

.hours-row {
    transition: all 0.2s ease;
}

.hours-row:hover {
    transform: translateX(4px);
}



/* Better typography for the enhanced section */
.contact-enhanced h4 {
    font-weight: 600;
    letter-spacing: -0.025em;
}

.contact-enhanced .phone-link {
    font-weight: 600;
    text-decoration: none;
    position: relative;
}

.contact-enhanced .phone-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.contact-enhanced .phone-link:hover::after {
    width: 100%;
}



/* Contact Cards Size Optimization */
#contact .grid.lg\\:grid-cols-2 > div {
    padding: 1.5rem !important; /* Reduce padding from 2rem to 1.5rem */
}

#contact .grid.lg\\:grid-cols-2 > div .p-8 {
    padding: 1.5rem !important; /* Reduce padding from 2rem to 1.5rem */
}

#contact .grid.lg\\:grid-cols-2 > div .space-y-6 {
    gap: 1rem !important; /* Reduce spacing between items */
}

#contact .grid.lg\\:grid-cols-2 > div .space-y-3 {
    gap: 0.5rem !important; /* Reduce spacing in hours list */
}

#contact .grid.lg\\:grid-cols-2 > div .py-3 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

#contact .grid.lg\\:grid-cols-2 > div .text-2xl {
    font-size: 1.5rem !important; /* Make headings slightly smaller */
}

@media (max-width: 768px) {
    #contact .grid.lg\\:grid-cols-2 > div .p-8 {
        padding: 1rem !important; /* Even smaller on mobile */
    }
}
