/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
}

:root {
    --primary-color: #1d4052; /* Miramichi - deep blue-gray */
    --primary-dark: #16333e; /* Darker Miramichi */
    --secondary-color: #8cc8a8; /* Polar Jade - soft mint green */
    --accent-color: #6bb88a; /* Darker Polar Jade */
    --light-color: #faf8f6; /* Light Gray Cashmere */
    --gray-cashmere: #e8e4e0; /* Gray Cashmere */
    --dark-color: #2c2c2c;
    --text-color: #4a4a4a;
    --danger-color: #d4574a;
    --success-color: #8cc8a8;
    --warning-color: #e6a756;
    --gray-light: #f5f3f1;
    --gray-medium: #d6d2ce;
    --white: #ffffff;
    --box-shadow: 0 5px 15px rgba(29, 64, 82, 0.08);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--white);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 2.2rem;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background-color: var(--primary-color);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
    text-align: center;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
    border-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(29, 64, 82, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    box-shadow: 0 2px 15px rgba(29, 64, 82, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(29, 64, 82, 0.1));
}

.logo {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(29, 64, 82, 0.85), rgba(22, 51, 62, 0.9)), 
                url('../images/main.jpg') no-repeat center center/cover;
    color: var(--white);
    text-align: center;
    padding: 180px 20px 120px;
    position: relative;
}

.hero h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 20px;
    animation: fadeIn 0.8s ease forwards;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px;
    animation: fadeIn 1s ease 0.3s forwards;
    opacity: 0;
}

.hero .btn {
    animation: fadeIn 1.2s ease 0.6s forwards;
    opacity: 0;
    margin-top: 15px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: 2px solid var(--secondary-color);
    font-size: 1.1rem;
    padding: 15px 40px;
    font-weight: 600;
}

.hero .btn:hover {
    background-color: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero .btn-secondary {
    background-color: transparent;
    border: 2px solid var(--gray-cashmere);
    color: var(--gray-cashmere);
}

.hero .btn-secondary:hover {
    background-color: var(--gray-cashmere);
    color: var(--primary-color);
}

/* About Section */
.about {
    padding: 100px 0;
    background-color: var(--white);
}

.about-fancy {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.about-image {
    width: 100%;
    max-height: 450px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    position: relative;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.03);
}

.about-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.about-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    padding: 25px 20px;
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    height: 100%;
    border-top: 4px solid var(--secondary-color);
}

.about-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(29, 64, 82, 0.12);
}

.about-icon {
    font-size: 24px;
    color: var(--secondary-color);
    margin-right: 12px;
    padding-top: 5px;
    flex-shrink: 0;
}

.about-card-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.about-card-content p {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Services Section */
.services-list {
    margin-top: 70px;
    background-color: var(--light-color);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
}

.services-list h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.service-item {
    padding: 18px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(29, 64, 82, 0.05);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(29, 64, 82, 0.1);
}

.service-item i {
    color: var(--secondary-color);
    margin-right: 12px;
    font-size: 1.1rem;
}

/* Doctors Section */
.doctors {
    padding: 100px 0;
    background-color: var(--light-color);
}

.doctors-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 35px;
}

.doctor-compact {
    display: flex;
    align-items: flex-start;
    background-color: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    min-height: 220px;
    border-left: 4px solid var(--secondary-color);
}

.doctor-compact:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(29, 64, 82, 0.1);
}

.doctor-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 25px;
    flex-shrink: 0;
    border: 4px solid var(--gray-cashmere);
    box-shadow: 0 5px 15px rgba(29, 64, 82, 0.1);
}

.doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.doctor-compact:hover .doctor-avatar img {
    transform: scale(1.08);
}

.doctor-details {
    flex: 1;
}

.doctor-details h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.doctor-details .specialty {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    font-size: 0.9rem;
    padding: 5px 15px;
    border-radius: 50px;
    margin-bottom: 15px;
    font-weight: 500;
}

.doctor-details p {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 18px;
}

.doctor-credentials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.credential {
    background-color: var(--gray-cashmere);
    color: var(--primary-color);
    font-size: 0.85rem;
    padding: 5px 12px;
    border-radius: 50px;
    font-weight: 500;
}

/* Contact Section */
.contact {
    background-color: var(--white);
    padding: 100px 0;
}

.contact-info-full {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.contact-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    border-bottom: 4px solid var(--secondary-color);
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(29, 64, 82, 0.1);
}

.contact-card-icon {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    background-color: var(--gray-cashmere);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.contact-card:hover .contact-card-icon {
    background-color: var(--secondary-color);
    color: var(--white);
}

.contact-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--dark-color);
}

.contact-card p {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 8px;
}

.emergency-contact {
    display: flex;
    align-items: center;
    background-color: rgba(212, 87, 74, 0.05);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    border-left: 5px solid var(--danger-color);
    box-shadow: var(--box-shadow);
}

.emergency-icon {
    font-size: 2.8rem;
    color: var(--danger-color);
    margin-right: 25px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    70% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

.emergency-info h3 {
    color: var(--danger-color);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.emergency-info p {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.emergency-info strong {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--danger-color);
}

/* Map Card Specific Styles */
.map-card-full {
    background-color: var(--white);
    border-radius: 12px;
    padding: 35px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-top: 30px;
}

.map-card-full:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(29, 64, 82, 0.1);
}

.map-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.map-card-header .map-card-icon {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-right: 18px;
    background-color: var(--gray-cashmere);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.map-card-header h3 {
    font-size: 1.6rem;
    margin-bottom: 0;
    color: var(--dark-color);
}

.map-container-full {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(29, 64, 82, 0.08);
    margin-bottom: 20px;
    border: 5px solid var(--gray-cashmere);
}

.map-text {
    font-size: 1.05rem;
    color: var(--primary-color);
    font-weight: 500;
    text-align: center;
    margin-top: 15px;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 70px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
}

.footer-column {
    flex: 1;
    margin-right: 40px;
}

.footer-column:last-child {
    margin-right: 0;
}

.footer-column h3 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.3rem;
    position: relative;
    display: inline-block;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: var(--secondary-color);
    bottom: -10px;
    left: 0;
}

.footer-column p {
    color: var(--gray-cashmere);
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: var(--gray-cashmere);
    transition: var(--transition);
    display: block;
}

.footer-column ul li a:hover {
    color: var(--white);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--gray-cashmere);
    color: var(--gray-cashmere);
}

/* Media Queries */
@media (max-width: 992px) {
    .doctors-compact {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
    
    .footer-content {
        flex-wrap: wrap;
    }
    
    .footer-column {
        flex: 0 0 calc(50% - 20px);
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .header-container {
        padding: 15px;
    }
    
    .logo-icon {
        height: 28px;
    }
    
    .logo {
        font-size: 22px;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 15px rgba(29, 64, 82, 0.1);
        transition: var(--transition);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 15px 20px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        padding: 150px 20px 100px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .about-card, .doctor-compact {
        flex-direction: column;
        text-align: center;
    }
    
    .about-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .doctor-avatar {
        margin: 0 auto 20px;
    }
    
    .doctor-details {
        text-align: center;
    }
    
    .doctor-credentials {
        justify-content: center;
    }
    
    .emergency-contact {
        flex-direction: column;
        text-align: center;
    }
    
    .emergency-icon {
        margin: 0 0 20px 0;
    }
    
    .doctors-compact {
        grid-template-columns: 1fr;
    }
    
    .footer-column {
        flex: 0 0 100%;
    }
}

@media (max-width: 992px) {
    .about-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .about-info, .services-grid, .contact-cards {
        grid-template-columns: 1fr;
    }
    
    .hero-cta {
        flex-direction: column;
    }
}