/* ==========================
   MedContact
   Автор: Тим + Жахонгир
========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Inter',sans-serif;
}

body{
    background:#f4f8fc;
    color:#333;
}

/* Контейнер */

.container{
    width:90%;
    max-width:1200px;
    margin:auto;
}

/* ==========================
        HEADER
========================== */

header{
    background:#0f4c81;
    color:#fff;
    padding:18px 0;
    box-shadow:0 3px 10px rgba(0,0,0,.15);
    position:sticky;
    top:0;
    z-index:1000;
}

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

.logo{
    display:flex;
    align-items:center;
    gap:15px;
    margin-right:80px;
}

.logo i{
    font-size:42px;
}

.logo h2{
    font-size:28px;
}

.logo span{
    font-size:13px;
    opacity:.9;
}

nav{
    display:flex;
    gap:25px;
}

nav a{
    color:white;
    text-decoration:none;
    font-weight:500;
    transition:.3s;
}

nav a:hover{
    color:#8fd3ff;
}

/* ==========================
          HERO
========================== */

.hero{
    background:linear-gradient(135deg,#0f4c81,#2f80ed);
    color:white;
    text-align:center;
    padding:90px 20px;
}

.hero h1{
    font-size:48px;
    margin-bottom:20px;
}

.hero p{
    font-size:20px;
    opacity:.9;
    margin-bottom:40px;
}

/* ==========================
      SEARCH BOX
========================== */

.search-box{
    max-width:700px;
    margin:auto;
    display:flex;
    background:white;
    border-radius:60px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,.15);
}

.search-box input{
    flex:1;
    border:none;
    outline:none;
    padding:18px 25px;
    font-size:18px;
}

.search-box button{
    width:70px;
    border:none;
    background:#2ecc71;
    color:white;
    cursor:pointer;
    font-size:22px;
    transition:.3s;
}

.search-box button:hover{
    background:#27ae60;
}

/* ==========================
    INSTITUTIONS
========================== */

.institutions{
    padding:80px 0;
}

.institutions h2{
    text-align:center;
    font-size:38px;
    margin-bottom:45px;
    color:#0f4c81;
}

.cards{

    display:flex;

    flex-wrap:wrap;

    justify-content:center;

    gap:30px;

    margin-top:40px;

}

.card{

    width:320px;

    background:#fff;

    border-radius:18px;

    overflow:hidden;

    box-shadow:0 10px 25px rgba(0,0,0,.08);

    transition:.3s;

    display:flex;

    flex-direction:column;

}

.card:hover{
    transform:translateY(-8px);
    box-shadow:0 20px 40px rgba(0,0,0,.15);
}

.card i{
    font-size:55px;
    color:#2f80ed;
    margin-bottom:20px;
}

.card h3{
    font-size:23px;
    margin-bottom:12px;
}

.card p{
    color:#666;
    margin-bottom:25px;
}

.card a{
    display:inline-block;
    padding:12px 25px;
    background:#0f4c81;
    color:white;
    text-decoration:none;
    border-radius:10px;
    transition:.3s;
}

.card a:hover{
    background:#2f80ed;
}

/* ==========================
         FOOTER
========================== */

footer{
    background:#0f4c81;
    color:white;
    text-align:center;
    padding:25px;
    margin-top:50px;
}

/* ==========================
      RESPONSIVE
========================== */

@media(max-width:900px){

header .container{
    flex-direction:column;
    gap:20px;
}

nav{
    flex-wrap:wrap;
    justify-content:center;
}

.hero h1{
    font-size:36px;
}

.hero p{
    font-size:18px;
}

}

@media(max-width:600px){

.logo h2{
    font-size:22px;
}

.hero{
    padding:60px 20px;
}

.hero h1{
    font-size:30px;
}

.search-box input{
    font-size:16px;
    padding:15px;
}

.search-box button{
    width:60px;
}

.institutions h2{
    font-size:28px;
}

.card{
    padding:25px;
}

}/* ==========================
     АНИМАЦИИ КАРТОЧЕК
========================== */

.hidden{
    opacity:0;
    transform:translateY(40px);
    transition:0.8s;
}

.show{
    opacity:1;
    transform:translateY(0);
}



/* ==========================================
   HOSPITAL PAGE
========================================== */

.doctor-page{
    padding:70px 0;
    background:#f4f8fc;
}

.doctor-card{
    background:#fff;
    border-radius:20px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
    padding:40px;
    display:flex;
    gap:40px;
    align-items:center;
    margin-bottom:50px;
    flex-wrap:wrap;
}

.doctor-photo{
    flex:1;
    text-align:center;
}

.doctor-photo img{
    width:250px;
    height:250px;
    border-radius:50%;
    object-fit:cover;
    border:6px solid #0f4c81;
}

.doctor-info{
    flex:2;
}

.doctor-info h2{
    font-size:34px;
    color:#0f4c81;
    margin-bottom:10px;
}

.doctor-info h4{
    color:#2f80ed;
    margin-bottom:20px;
    font-weight:600;
}

.doctor-info p{
    line-height:1.8;
    color:#555;
    margin-bottom:30px;
}

.buttons{
    display:flex;
    gap:15px;
    flex-wrap:wrap;
}

.btn{
    padding:14px 22px;
    border-radius:10px;
    text-decoration:none;
    color:#fff;
    font-weight:600;
    transition:.3s;
}

.phone{
    background:#0f4c81;
}

.telegram{
    background:#229ED9;
}

.whatsapp{
    background:#25D366;
}

.email{
    background:#ff6b35;
}

.btn:hover{
    transform:translateY(-3px);
    opacity:.9;
}

.info-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:25px;
}

.info-box{
    background:#fff;
    padding:30px;
    border-radius:18px;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
    transition:.3s;
    cursor:pointer;
    user-select:none;
}

.info-box:hover{
    transform:translateY(-5px);
}

.info-box h3{
    color:#0f4c81;
    margin-bottom:15px;
    font-size:22px;
}

.info-box h3 i{
    margin-right:10px;
}

.info-box p{
    color:#555;
    line-height:1.8;
}

@media(max-width:900px){

.doctor-card{
    flex-direction:column;
    text-align:center;
}

.buttons{
    justify-content:center;
}

.doctor-info h2{
    font-size:28px;
}

}

@media(max-width:600px){

.doctor-photo img{
    width:180px;
    height:180px;
}

.btn{
    width:100%;
    text-align:center;
}

}

/* ==========================
      ADMIN FORM
========================== */

form input{
    width:100%;
    padding:14px;
    margin-top:10px;
    border:1px solid #d9d9d9;
    border-radius:10px;
    font-size:16px;
}

form button,
#clearAll{

    background:#0f4c81;
    color:white;
    border:none;
    padding:14px 25px;
    border-radius:10px;
    cursor:pointer;
    font-size:16px;
    transition:.3s;

}

form button:hover,
#clearAll:hover{

    background:#2f80ed;

}

#hospitalList button{

    background:#0f4c81;
    color:white;
    border:none;
    padding:10px 16px;
    border-radius:8px;
    cursor:pointer;

}

#hospitalList button:hover{

    background:#2f80ed;

}

/* ===========================
   Карточки учреждений
=========================== */

.card{
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hospital-image{

    width:100%;

    height:220px;

    object-fit:cover;

    display:block;

    background:#e8edf5;

}

.card-content{

    padding:20px;

    display:flex;

    flex-direction:column;

    flex:1;

}

.card-content h3{

    margin-bottom:12px;

    font-size:22px;

}

.card-content p{

    margin:6px 0;

    line-height:1.5;

}

.details-btn{

    margin-top:auto;

    display:inline-block;

}

.card-content h3{

    color:#0f4c81;

    font-size:23px;

    margin-bottom:15px;

    min-height:60px;

}

.card-content p{

    color:#555;

    margin-bottom:12px;

    line-height:1.6;

}

.details-btn{

    margin-top:auto;

    display:inline-block;

    text-align:center;

    padding:12px;

    background:#0f4c81;

    color:#fff;

    border-radius:10px;

    text-decoration:none;

    transition:.3s;

}

.details-btn:hover{

    background:#2f80ed;

}

/* ======================================
   Модальное окно обращения
====================================== */

.modal{

    display:none;

    position:fixed;

    top:0;

    left:0;

    width:100%;

    height:100%;

    background:rgba(0,0,0,.45);

    justify-content:center;

    align-items:center;

    z-index:9999;

}

.modal-content{

    width:90%;

    max-width:550px;

    background:#fff;

    border-radius:15px;

    padding:30px;

    box-shadow:0 15px 40px rgba(0,0,0,.2);

}

.modal-content h2{

    color:#0f4c81;

    margin-bottom:20px;

}

.modal-content input,

.modal-content textarea{

    width:100%;

    padding:14px;

    margin-bottom:15px;

    border:1px solid #ddd;

    border-radius:10px;

    font-size:16px;

}

.modal-content textarea{

    min-height:160px;

    resize:vertical;

}

.modal-buttons{

    display:flex;

    gap:10px;

    justify-content:flex-end;

    flex-wrap:wrap;

}


/* ==========================
      Оценка учреждения
========================== */

.rating-stars{

    display:flex;

    justify-content:center;

    gap:12px;

    margin:30px 0;

}

.rating-stars .star{

    font-size:42px;

    cursor:pointer;

    transition:.2s;

    user-select:none;

}

.rating-stars .star:hover{

    transform:scale(1.15);

}

/* ==========================
      Таблица графика работы
========================== */

.worktime-table{
    width:100%;
    border-collapse:collapse;
    margin:20px 0;
}

.worktime-table td{
    padding:12px 0;
    border-bottom:1px solid #e8edf5;
}

.worktime-table td:first-child{
    width:55%;
    font-weight:600;
    color:#0f4c81;
}

.worktime-table td:last-child{
    text-align:right;
    color:#555;
}

/* ==========================
      Модальное окно
========================== */

.modal{

    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.45);
    justify-content:center;
    align-items:center;
    z-index:9999;

}

.modal-content{

    width:420px;
    max-width:90%;
    background:#fff;
    border-radius:18px;
    padding:35px;
    box-shadow:0 20px 40px rgba(0,0,0,.25);

}

.modal-content h2{

    color:#0f4c81;
    margin-bottom:25px;
    text-align:center;

}

.modal-content input{

    width:100%;
    margin-bottom:15px;

}

.modal-buttons{

    display:flex;
    gap:15px;
    justify-content:flex-end;
    margin-top:20px;

}

/* ===== Модальное окно карты ===== */

.modal{

display:none;

position:fixed;

left:0;

top:0;

width:100%;

height:100%;

background:rgba(0,0,0,.45);

justify-content:center;

align-items:center;

z-index:9999;

}

.modal-content{

background:#fff;

width:700px;

max-width:90%;

padding:30px;

border-radius:20px;

text-align:center;

box-shadow:0 20px 60px rgba(0,0,0,.2);

}

.modal-buttons{

margin-top:20px;

display:flex;

justify-content:center;

gap:15px;

}

.map-link{

color:#0d6efd;

font-weight:600;

text-decoration:none;

cursor:pointer;

}

.map-link:hover{

text-decoration:underline;

}