/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --merigi-teal: #29b6a6;
    --merigi-blue: #003b5c;
    --merigi-red: #ce1126;
    --light-bg: #f4f7f9;
    --white: #ffffff;
    --text-main: #2b2d42;
    --text-muted: #6c757d;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. NAVIGATION & HEADER
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo { display: flex; align-items: center; gap: 15px; }
.logo img { height: 60px; width: auto; }

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--merigi-blue);
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active { color: var(--merigi-teal); }

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--merigi-blue);
    transition: var(--transition);
}

/* ==========================================================================
   3. HERO & PAGE HEADERS
   ========================================================================== */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 5%;
    background: linear-gradient(135deg, #ffffff 0%, #eef9f9 100%);
    gap: 40px;
}

.hero-content h1 {
    font-size: 3rem;
    color: var(--merigi-blue);
    margin-bottom: 20px;
}

.hero-image img {
    width: 100%;
    max-width: 550px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.page-header {
    background: linear-gradient(rgba(0, 59, 92, 0.85), rgba(0, 59, 92, 0.85)), 
                url('../../public/images/building-exterior.jpg') center/cover;
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

/* ==========================================================================
   4. SHARED COMPONENTS (Cards, Buttons, Forms)
   ========================================================================== */
.card, .feature-card, .team-card, .service-card-full, .blog-card, .contact-form-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover, .feature-card:hover, .team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.btn-primary, .btn-submit {
    background-color: var(--merigi-blue);
    color: var(--white);
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary:hover, .btn-submit:hover { 
    background-color: var(--merigi-teal);
    transform: translateY(-2px);
}

/* Form Styling */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--merigi-blue); }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--merigi-teal);
    box-shadow: 0 0 0 3px rgba(41, 182, 166, 0.1);
}

/* ==========================================================================
   5. SECTIONS (Services, Team, Contact)
   ========================================================================== */
.services-grid-detailed, .team-grid, .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

/* Contact Specific Layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 60px 0;
    align-items: start;
}

/* Updated Contact Info Styles - More Spacious & Organized */
.contact-info {
    max-width: 100%;
}

.contact-info h2 {
    color: var(--merigi-blue);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.info-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 59, 92, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .icon {
    font-size: 1.5rem;
    min-width: 2rem;
    color: var(--merigi-teal);
    background: rgba(41, 182, 166, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.info-item .content {
    flex: 1;
    line-height: 1.6;
}

.info-item strong {
    color: var(--merigi-blue);
    font-weight: 600;
    display: inline-block;
    margin-right: 0.5rem;
}

.info-item a {
    color: var(--merigi-teal);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    word-break: break-word;
}

.info-item a:hover {
    color: var(--merigi-blue);
    text-decoration: underline;
}

.info-item span:not(.icon):not(.content) {
    color: var(--text-main);
}

/* Address specific styling */
.info-item.address .content {
    font-style: normal;
    line-height: 1.7;
}

/* Contact details list (if still needed) */
.contact-details-list { 
    list-style: none; 
    margin: 25px 0; 
}

.contact-details-list li { 
    margin-bottom: 15px; 
    font-size: 1.1rem; 
}

.contact-details-list a { 
    color: var(--merigi-teal); 
    text-decoration: none; 
    font-weight: 600; 
}

.map-container {
    margin-top: 30px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
}

.contact-form-card { 
    padding: 40px; 
    border: 1px solid #f0f0f0; 
}

.contact-form-card h3 { 
    margin-bottom: 25px; 
    color: var(--merigi-blue); 
}

/* Maternity Highlight */
.highlight-maternity { background: #fffafa; border: 1px solid #ffecec; }
.highlight-maternity h3 { color: var(--merigi-red); }

/* Timeline */
.timeline {
    border-left: 3px solid var(--merigi-teal);
    padding-left: 30px;
    margin: 40px auto;
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item::before {
    content: ''; position: absolute; left: -38px; top: 5px;
    width: 14px; height: 14px; background: var(--merigi-teal);
    border-radius: 50%; border: 3px solid var(--white);
}
/* ==========================================================================
   6. MODAL & UI TOOLS
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0, 59, 92, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn { from { transform: translateY(-30px); opacity: 0; } }

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 30px; 
    right: 30px;
    width: 50px; 
    height: 50px;
    background-color: var(--merigi-teal);
    color: var(--white);
    border: none; 
    border-radius: 50%;
    cursor: pointer;
    
    /* Layout & Layering */
    display: flex; 
    align-items: center; 
    justify-content: center;
    z-index: 9999; 
    box-shadow: var(--shadow);
    font-size: 24px;

    /* Animation State (Hidden) */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: 
        opacity 0.4s ease, 
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
        background-color 0.3s ease,
        visibility 0.4s;
}

/* Animation State (Visible) */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Interaction State */
.back-to-top:hover {
    background-color: var(--merigi-blue);
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.back-to-top:active {
    transform: translateY(0);
}
/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.main-footer {
    padding: 40px 0 20px;
    background: var(--merigi-blue);
    color: white;
    text-align: center;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px; padding-top: 20px;
}

/* ==========================================================================
   8. MOBILE RESPONSIVE (768px)
   ========================================================================== */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: white;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        gap: 0;
    }

    .nav-links.mobile-active { display: flex; }
    .nav-links li { width: 100%; border-bottom: 1px solid #f0f0f0; }
    .nav-links li a { display: block; padding: 18px 25px; width: 100%; text-align: left; }
    .nav-links li a:active { background: #f8fafc; color: var(--merigi-teal); }

    .hero { flex-direction: column; text-align: center; padding: 40px 5%; }
    .hero h1 { font-size: 2.2rem; }
    
    .contact-grid, .join-content { grid-template-columns: 1fr; gap: 40px; }
    .contact-form-card { padding: 25px; }

    .hamburger.toggle span:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
    .hamburger.toggle span:nth-child(2) { opacity: 0; }
    .hamburger.toggle span:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }
}