*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    font-family: 'Poppins', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    height: auto;
}

nav{
  height: 9vh;
  width: 100%;
    background-color: #087F68;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
}

#logo-container{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-left: 20px;
  
}
#logo{
  height: 50px;
  width: 50px;
}
#logo-text{
    font-size: 1.5rem;
    color: white;
    margin-left: 10px;
}
span{
    font-size: 26px;
    font-weight: 800;
    color: #173B38;
    text-decoration: none;
   
}
#nav-links{
 display: flex;
  align-items: center;
  justify-content: space-evenly;
    gap: 93px;
    margin-right: 91px;
    
}
a{
    text-decoration: none;
    color: white;
}

#home{
    background-image: url('images/homebgpic.png');
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    padding: 0 20px;
    height: 62vh;
}
#left{
    height: 100%;
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    margin-left: 120px;
}
h6{
    font-size: 1.5rem;
    color: #4CAF50;
    /* height: 5vh;
    width: 90%;
    border: 1px solid #4CAF50;
    border-radius: 50px; */
}

#main-title{
   font-size: 3rem;
    font-weight: bold;
}
#main-description{
   font-size: 1.2rem;
    color: #555;
}
#search-bar{
   height: 7vh;
    width: 100%;
    border-radius: 20px;
    border: none;
    padding: 0 20px;
}
#main-button{
  height: auto;
    width: 40%;
    border-radius: 20px;
    border: none;
    background-color: #4CAF50;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px 20px;
}
#right{
    height: 100%;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
#main-image{
    height: 100%;
    width: 100%;
    
}

#services{
    margin-top: -9vh;
}
#heading-services{
    text-align: center;
    margin-top: 80px;
    font-size: 2rem;
    color: #173B38;
}

#health-services{
   background-color: #e0f2f1;
   display: flex;
   justify-content: center;
align-items: center;
   flex-wrap: wrap;
   gap: 20px;
   padding: 50px 0;
   margin-top: 2vh;
   
}
.card{
    height: 200px;
    width: 200px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;


}

.card-title{
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;

}

.card-description{
    font-size: 1rem;
    padding: 0 10px;
    text-align: center;
  
}

.card i,
.card svg {
    display: block;
    background-color:#173B38;
    width: 4rem;
    height: 4rem;
    padding: 10px;
    border-radius: 50%;
    color: white;
    margin: 0 auto 12px;
}

#dentist i {
    font-size: 2.5rem;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #173B38;
}

#doctors {
    width: 100%;
    padding: 30px 0;

}

#recomended-doctors{
    font-size: 2rem;
    color:#173B38;
}

.view-all {
    display:flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1px;
    color: #4CAF50;
    text-decoration: none;
    font-size: 16px;
    margin-right: 2vw;
}

#doctors-container {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    width: 150%;
    padding: 20px;
 
}

.doctor-card {
    height: 30vh;
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
       display: flex;
    flex-direction: row;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    
}

.doctor-card img {
   width: 208px;
    border-radius: 14px;
    height: 147px;
    object-fit: contain;
    margin-bottom: 12px;
}

.doctor-card h3 {
    color: #287d68;
    margin-bottom: 10px;
}

.doctor-card p {
    font-size: 14px;
    margin: 6px 0;
    color: #555;
}

#all-doctors{
    display: none;
}

#doctor-details-panel {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: white;
    padding: 30px;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow-y: auto;
}

#close-details {
    display: block;
    margin-left: auto;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
}


#doctor-details-content img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    display: block;
    margin: 20px auto;
    border-radius: 16px;
}
#doctor-details-content h2 {
    color: #287d68;
    margin-bottom: 15px;
}

#doctor-details-content p {
    margin: 12px 0;
    font-size: 14px;
}

.contact-clinic {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}


/* Hero button */
#main-button {
    width: auto;
    min-height: 50px;
    padding: 14px 24px;
    border-radius: 10px;
    background: #087F68;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: .25s ease;
}

#main-button:hover {
    background: #066B58;
    transform: translateY(-2px);
}

/* Hero search input */
#search-bar {
    width: 100%;
    min-height: 50px;
    border: 1px solid #D6E2DB;
    border-radius: 10px;
    background: #fff;
    outline: none;
}

#search-bar:focus {
    border-color: #087F68;
    box-shadow: 0 0 0 3px rgba(8,127,104,.12);
}

/* Recommended and All Doctors */
#doctors {
    width: 100%;
    padding: 40px 7%;
    overflow: hidden;
}

#doctors-container {
    width: 100%;
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding: 15px 4px 22px;
    scroll-behavior: smooth;
}

.doctor-card {
    flex: 0 0 340px;
    height: auto;
    min-height: 205px;
    padding: 16px;
    gap: 15px;
    text-align: left;
    background: #fff;
    border: 1px solid #E0EBE4;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(23,59,56,.07);
    transition: .25s ease;
}

.doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(23,59,56,.12);
}

.doctor-card img {
    width: 115px;
    height: 145px;
    flex-shrink: 0;
    object-fit: cover;
    object-position: center top;
    border-radius: 12px;
    margin: 0;
    background: #E5F4EC;
}

.doctor-info {
    min-width: 0;
}

.doctor-card h3 {
    color: #173B38;
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.doctor-card p {
    color: #647773;
    font-size: 13px;
    line-height: 1.5;
    margin: 5px 0;
}

/* View Details button — matches your JS class */
.doctor-card .view-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    margin-top: 10px;
    background: #087F68;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.doctor-card .view-details:hover {
    background: #066B58;
    transform: translateY(-2px);
}

/* View All link */
.view-all {
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin: 0 0 10px;
    border-radius: 10px;
    color: #087F68;
    font-weight: 700;
}



/* All doctors section */
#all-doctors {
    width: 100%;
    padding: 30px 7%;
}

#all-doctors h2 {
    color: #173B38;
    margin-bottom: 15px;
}

#all-doctors-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#all-doctors-container .doctor-card {
    flex: 1 1 320px;
    max-width: 100%;
}

/* Doctor details panel */
#doctor-details-panel {
    width: min(420px, 100%);
    padding: 25px;
    background: #fff;
    border-left: 1px solid #E0EBE4;
    box-shadow: -8px 0 30px rgba(23,59,56,.14);
}

#close-details {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #E5F4EC;
    color: #087F68;
}

#doctor-details-content img {
    width: 190px;
    height: 210px;
    object-fit: cover;
    object-position: center top;
    border-radius: 16px;
    background: #E5F4EC;
}

#doctor-details-content h2 {
    color: #173B38;
}

#doctor-details-content p {
    padding: 10px 12px;
    background: #F8FBF8;
    border: 1px solid #E8EFEA;
    border-radius: 9px;
    color: #647773;
    line-height: 1.6;
}

.contact-clinic {
    min-height: 46px;
    border-radius: 10px;
    background: #087F68;
    font-weight: 700;
}

.contact-clinic:hover {
    background: #066B58;
}

/* Mobile */
@media (max-width: 600px) {
    #doctors {
        padding: 30px 5%;
    }

    .doctor-card {
        flex-basis: 290px;
        min-height: 180px;
        padding: 12px;
        gap: 12px;
    }

    .doctor-card img {
        width: 95px;
        height: 125px;
    }

    #all-doctors {
        padding: 25px 5%;
    }

    #all-doctors-container .doctor-card {
        flex-basis: 100%;
    }
}



/* Responsive Design */

/* Tablet */
@media (max-width: 1024px) {
    #nav-links {
        gap: 25px;
        margin-right: 20px;
    }

    #left {
        margin-left: 30px;
        width: 55%;
    }

    #main-title {
        font-size: 2.4rem;
    }

    #main-description {
        font-size: 1rem;
    }

    #right {
        width: 45%;
    }

    #main-button {
        max-width: 100%;
    }

    #health-services {
        padding: 35px 20px;
    }

    #doctors {
        padding: 30px 4%;
    }
}

/* Mobile */
@media (max-width: 600px) {
    nav {
        height: auto;
        min-height: 70px;
        padding: 10px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }

    #logo-container {
        margin-left: 0;
    }

    #logo {
        width: 40px;
        height: 40px;
    }

    #logo-text {
        font-size: 1.2rem;
    }

    #nav-links {
        width: 100%;
        margin: 0;
        gap: 0;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    #nav-links a {
        font-size: 13px;
        padding: 6px 2px;
    }

    #home {
        height: auto;
        min-height: auto;
        padding: 45px 20px;
        flex-direction: column;
        gap: 25px;
        background-position: center;
    }

    #left {
        width: 100%;
        height: auto;
        margin-left: 0;
        gap: 16px;
    }

    #main-title {
        font-size: 2rem;
        line-height: 1.25;
    }

    #main-description {
        font-size: 1rem;
        line-height: 1.6;
    }

    #search-bar {
        width: 100%;
        min-height: 48px;
    }

    #main-button {
        width: 100%;
        min-height: 48px;
        font-size: 15px;
    }

    #right {
        width: 100%;
        height: auto;
    }

    #main-image {
        width: 100%;
        height: auto;
        max-height: 300px;
        object-fit: contain;
    }
   
    #services {
        margin-top: 0;
    }

    #heading-services {
        margin-top: 35px;
        padding: 0 15px;
        font-size: 1.7rem;
    }

    #health-services {
        padding: 25px 10px;
        gap: 12px;
    }

    .card {
        width: calc(50% - 24px);
        height: 190px;
        margin: 6px;
        padding: 10px;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-description {
        font-size: 0.85rem;
    }

    #doctors {
        padding: 25px 15px;
    }

    #recomended-doctors {
        font-size: 1.5rem;
    }

    #doctors-container {
        width: 100%;
        gap: 15px;
        padding: 15px 2px 20px;
    }

    .doctor-card {
        flex: 0 0 285px;
        min-height: 175px;
        padding: 12px;
        gap: 10px;
    }

    .doctor-card img {
        width: 90px;
        height: 120px;
    }

    .doctor-card h3 {
        font-size: 14px;
    }

    .doctor-card p {
        font-size: 12px;
    }

    .doctor-card .view-details {
        padding: 8px 10px;
        font-size: 12px;
    }

    .view-all {
        margin-right: 0;
        font-size: 14px;
    }

    #all-doctors {
        padding: 25px 15px;
    }

    #all-doctors-container {
        gap: 15px;
    }

    #all-doctors-container .doctor-card {
        flex: 1 1 100%;
    }

    #doctor-details-panel {
        width: 100%;
        height: 100dvh;
        padding: 20px;
    }

    #doctor-details-content img {
        width: 170px;
        height: 180px;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    #main-title {
        font-size: 1.7rem;
    }

    .card {
        width: calc(100% - 20px);
    }

    .doctor-card {
        flex-basis: 260px;
    }
}

