@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}
html{
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body{
    background: #f0f4f8;
    color:#333;
    overflow-x:hidden;
}

body.no-scroll {
    overflow-x:hidden;
}

.overlay{
    display: none; /* Disabling the dark overlay */
}

.top-bar {
    background-color: #cf1a2c;
    color: white;
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 101;
}

.top-bar p {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 35s linear infinite;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-150%); /* Adjust based on text length */
    }
}

header{
    position:fixed;
    top:36px; /* Fallback, will be set by JS */
    left:0;
    width:100%;
    padding:15px 7%;
    z-index:100;
    transition: padding .4s, background .4s, box-shadow .4s;
    background: #ffffff;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,.07);
}

header.scrolled{
    padding: 12px 7%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,.2);
}

nav{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.logo-container{
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo{
    width:65px;
    border-radius:50%;
    background:#0a81f8;
    padding:2px;
    box-shadow:0 2px 10px rgba(19, 161, 255, 0.35);
    transition: transform .3s;
}

.logo-text{
    color: #dc3545;
    margin-left: 12px;
    font-weight: 900;
    font-size: 20px;
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
}

.call-btn{
    text-decoration:none;
    color:#fff;
    background:#ff182f;
    padding:10px 22px;
    border-radius:40px;
    font-weight:600;
    transition:.35s;
}

.call-btn:hover{
    background:#fff;
    color:#dc3545;
}

.nav-links{
    list-style:none;
    display:flex;
    gap:35px;
}

.nav-links a{
    text-decoration:none;
    color:#333;
    font-weight:500;
    position:relative;
    transition:.3s;
}

.nav-links a:hover{
    color:#007bff;
}

.nav-links a::after{
    content:'';
    position:absolute;
    bottom:-5px;
    left:0;
    width:0;
    height:2px;
    background:#007bff;
    transition:width .3s;
}

.close-btn {
    display: none;
    position: fixed;
    top: 25px;
    right: 25px;
    background: transparent;
    border: none;
    color: #333;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001; /* Above nav-links */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.menu-btn{
    display: none;
    background: transparent;
    border: none;
    color: #333;
    font-size: 24px;
    cursor: pointer;
}

.nav-links a:hover::after{
    width:100%;
}

.logo-container:hover .logo{
    transform: rotate(15deg);
}

.hero{
    height: 90vh; /* ব্যানার উচ্চতা */
    position: relative;
    overflow: hidden;
}

.hero-slider {
    display: flex;
    width: 400%; /* 4 slides */
    height: 100%;
    transition: transform 0.7s ease-in-out;
}

.slide {
    width: 25%; /* 100% / 4 slides. JS will handle this dynamically if needed. */
    height: 100%;
    background-size: contain; /* Ensure the whole image is visible */
    background-position: center;
    background-repeat: no-repeat; /* Prevent image from repeating */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 10%;
    background-color: white; /* Add a background color to fill empty space */
}

.slide h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}
.slide p {
    font-size: 1.2rem;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(1);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn { left: 15px; }
.next-btn { right: 15px; }

.buttons{
    display:flex;
    justify-content:center;
    gap:18px;
    flex-wrap:wrap;
    margin-top:30px;
}

.buttons a{
    text-decoration:none;
    padding:16px 34px;
    border-radius:50px;
    font-weight:600;
    transition:.35s;
}

.btn1{
    background:#007bff;
    color:#fff;
}

.btn2{
    border:2px solid #fff;
    color:#fff;
}

.btn1:hover,
.btn2:hover{
    transform:translateY(-5px);
}

.hero .btn2:hover {
    background: #fff;
    color: #333;
}

.hero-coming-soon{
    display:flex;
    align-items:center;
    justify-content:center;
    padding:140px 20px 80px;
    background: url(assets/hmshospital.jpeg) center center/cover no-repeat fixed;
    position: relative;
}

.hero-coming-soon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(42, 61, 111, 0.85), rgba(15, 25, 45, 0.9));
}

.glass{
    max-width:850px;
    width:100%;
    text-align:center;
    background:rgba(255,255,255,.10);
    border:1px solid rgba(255,255,255,.20);
    backdrop-filter:blur(18px);
    border-radius:28px;
    padding:60px;
    box-shadow:0 25px 60px rgba(0,0,0,.45);
    position: relative;
    z-index: 1;
}

.glass h4{
    color:#fff;
    letter-spacing:3px;
    margin-bottom:15px;
}

.glass h1{
    font-size:52px;
    font-weight:800;
    line-height:1.2;
    color: #fff;
}

.glass p{
    margin:20px auto;
    max-width:650px;
    color:#fff;
    line-height:1.8;
}

.glass h2{
    font-size:64px;
    color:#fff;
    margin:25px 0;
    animation:pulse 1.6s infinite;
}

@keyframes pulse{
    50%{ transform:scale(1.04); }
}

.ecg{
    width:220px;
    height:4px;
    background:rgba(255,255,255,.15);
    margin:25px auto;
    overflow:hidden;
    border-radius:10px;
}

.line{
    width:80px;
    height:4px;
    background:#fff;
    animation:ecg 2s linear infinite;
}

@keyframes ecg{
    from{transform:translateX(-90px);}
    to{transform:translateX(240px);}
}

.departments {
    padding: 80px 8%;
    text-align: center;
    background: #ffffff;
}

.section-title h2 {
    font-size: 42px;
    color: #004a99;
    margin-bottom: 10px;
}

.section-title p {
    font-size: 18px;
    color: #555;
    margin-bottom: 50px;
}

.department-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.department-card {
    background: #f0f4f8;
    padding: 30px;
    border-radius: 20px;
    transition: all .4s;
    border: 1px solid transparent;
}

.department-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.department-card i {
    font-size: 50px;
    margin-bottom: 20px;
    color: #007bff;
    transition: color .4s;
}

.department-card h3 {
    font-size: 17px;
    font-weight: 600;
}

.services{
    padding:80px 8%;
    text-align:center;
}

.services h2{
    font-size:42px;
    margin-bottom:45px;
}

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:25px;
}

.card{
    background:#ffffff;
    border:1px solid #e0e0e0;
    padding:35px;
    border-radius:20px;
    transition:.4s;
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
}

.card:hover{
    transform:translateY(-10px);
    border-color: #dc3545;
}

.card i{
    font-size:46px;
    margin-bottom:18px;
    transition: color .4s;
}

.card:hover i{
    color: #dc3545;
}

.doctors-section {
    padding: 80px 8%;
    background: #ffffff;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.doctor-card {
    text-align: center;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all .4s;
    background: #fff;
    padding: 40px 20px;
    border: 1px solid #e0e0e0;
}

.doctor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.doctor-card i {
    font-size: 60px;
    color: #007bff;
}

.doctor-info {
    margin-top: 20px;
}

.doctor-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: #004a99;
    margin-bottom: 5px;
}

.page-section {
    padding-top: 120px; /* header height + extra space */
    padding-bottom: 80px;
}

.about-us{
    padding:80px 8%;
}

.about-content{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:40px;
    align-items:center;
}

.about-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,.1);
}

.slider-container {
    width: 100%;
    height: 100%;
}

.slider-wrapper {
    display: flex;
    width: 300%; /* 3 images */
    height: 100%;
    /* animation: slide 15s infinite; */ /* Disabled for mobile */
}

.slider-wrapper img {
    width:100%;
    height: 100%;
    object-fit: cover;
}

@keyframes slide {
    0%, 25% { transform: translateX(0); }
    33%, 58% { transform: translateX(-33.33%); }
    66%, 91% { transform: translateX(-66.66%); }
    100% { transform: translateX(0); }
}

.about-text h2{
    font-size:42px;
    color:#004a99;
    margin-bottom:15px;
}

.about-text h3{
    font-size:24px;
    color:#007bff;
    margin-bottom:20px;
    font-weight:600;
}

.contact{
    padding:60px 8%;
    text-align:center;
}

.contact h2{
    font-size:42px;
    margin-bottom:45px;
}

.contact-form{
    max-width:600px;
    margin:0 auto;
    display:flex;
    flex-direction:column;
    gap:15px;
}

.contact-form input,
.contact-form textarea{
    width:100%;
    padding:15px;
    border-radius:10px;
    border:1px solid #ccc;
    background:#fff;
    color:#333;
    font-family:'Poppins', sans-serif;
    font-size:16px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder{
    color:#888;
}

.contact-form button{
    padding:16px 34px;
    border-radius:50px;
    border:none;
    background:#0058b6;
    color:#fff;
    font-weight:600;
    font-size:16px;
    cursor:pointer;
    transition:.35s;
}

.contact-form button:hover{
    background:#004a99;
    transform:translateY(-5px);
}

footer{
    padding: 60px 8% 20px;
    background:#004a99;
    color: #b8d3dc;
}

.footer-container{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about img{
    width: 85px;
    margin-bottom: 15px;
}

.footer-about h3{
    font-size: 18px;
    margin-bottom: 10px;
    color: #fff;
}

.footer-about p, .footer-contact p {
    font-size: 14px;
    line-height: 1.8;
}

.footer-contact p {
    margin-bottom: 10px;
}

.footer-contact i {
    margin-right: 10px;
    color: #87ceeb;
}

.footer-links h4,
.footer-social h4,
.footer-contact h4 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 20px;
}

.footer-links ul{
    list-style: none;
}

.footer-links ul li a{
    text-decoration: none;
    color: #b8d3dc;
    margin-bottom: 12px;
    display: block;
    transition: .3s;
}

.footer-links ul li a:hover{
    color: #fff;
    transform: translateX(5px);
}

.social-icons a{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #fff;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    margin-right: 10px;
    transition: .3s;
}

.social-icons a:hover{
    background: #fff;
    color: #041c2d;
}

.footer-map {
    margin-top: 40px;
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid #0058b6;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.footer-bottom{
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
}

@media(max-width:768px){

.body.no-scroll {
    overflow: hidden;
}

.top-bar p {
    font-size: 16px;
    animation: scroll-left 45s linear infinite;
}

.glass{
    padding:35px 25px;
}

.glass h1{
    font-size:32px;
}

.glass h2{ font-size:42px; }

.hero{
    height: 500px;
}

header {
    padding: 15px 5%;
}

.logo{
    width:60px;
}

.call-btn{
    padding:10px 16px;
    font-size:14px;
}

.menu-btn {
    display: block;
}

.nav-links.active + .close-btn {
    display: block;
    opacity: 1;
}

.nav-links{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #086990;
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transform: translateY(-100%);
    transition: transform 0.5s ease-in-out;
    z-index: 1000;
    display: flex;
}

.nav-links.active {
    transform: translateY(0);
}

.nav-links a {
    font-size: 22px;
}

.section-title h2,
.about-text h2,
.services h2,
.contact h2 {
    font-size: 32px;
}

.section-title p {
    font-size: 16px;
}

.buttons a {
    padding: 14px 28px;
    font-size: 14px;
}

.about-content{
    grid-template-columns:1fr;
}

.about-text{ order:-1; }

.slide h1 {
    font-size: 2.5rem;
}

.slide p {
    font-size: 1rem;
}

.slider-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

}

@media (max-width: 480px) {
    .top-bar {
        padding: 6px 0;
    }
    .top-bar p {
        font-size: 14px;
    }
    header {
        padding: 10px 4%;
    }
    .logo-text {
        font-size: 18px;
    }
    .departments, .services, .doctors-section, .about-us, .contact {
        padding: 60px 5%;
    }
    .department-card {
        padding: 20px;
    }
    .doctor-card {
        padding: 30px 15px;
    }
    .footer-bottom {
        text-align: left;
        padding-left: 5%;
    }
    .glass h1, .slide h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
}

/* Countdown Timer Fix */
.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px; /* Minimum width for each item */
}

.countdown-item .number {
    font-size: clamp(2rem, 10vw, 3.5rem); /* Responsive font size */
    line-height: 1;
    color: #fff; /* Set text color to white */
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Add shadow for better readability */
}