/*
 * StopNarcotics - CSS Redesign v2.3
 * 
 */

/* --- 1. Шрифты и базовые стили --- */
 
:root {
    --font-primary:   Verdana, sans-serif;
    --font-secondary: "Times New Roman", serif;
    --color-background: #f9fafb; 
    --color-surface: #ffffff; 
    --color-text-primary: #1f2937; 
    --color-text-secondary: #6b7280;
    --color-accent-blue: #2563eb;
    --color-accent-blue-hover: #1d4ed8;
    --color-accent-red: #ef0021; 
    --color-accent-red-hover:#b00018;
    --color-accent-green: #16a34a;
    --color-border: #e5e7eb;
}

* {    box-sizing: border-box;}

body {
    background: linear-gradient(111deg, #fcfcfc 0%, #f0f5f1 40%, #e9ebee 69%, #e8e8e8 100%);
    padding: 0;    margin: 0;    font-family: var(--font-primary);    font-size: 16px;    color: var(--color-text-primary);    line-height: 1.6;}

h1, h2, h3, h4, h5, h6 {    font-family: var(--font-secondary);    font-weight: 700;    color: #111827;    margin: 0;}
h1 { font-size: 2.25rem; text-align: center; margin-bottom: 2rem; }
h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; margin: 0.5rem 0; }
h4 { font-size: 1.125rem; margin: 0; }

/* --- 2. Шапка (Header) --- */

.head-info-line {    background: #1f2937;    color: #e5e7eb;    font-size: 0.8rem;    padding: 6px 0;    border-bottom: 1px solid rgba(255,255,255,0.1);}
.container-wide {    max-width: 1400px;    margin: 0 auto;    padding: 0 1rem;    display: flex;    justify-content: space-between;    align-items: center;}
.trust-badge {    display: flex;    align-items: center;    gap: 6px;    color: #10b981;     font-weight: 500;}
.icon-tiny {    width: 14px;    height: 14px;    fill: currentColor;}
.head {    background-color: rgba(255, 255, 255, 0.95);    backdrop-filter: blur(12px);    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);    position: sticky;    top: 0;    z-index: 1000;}
.head-wrap {    max-width: 1400px;    margin: 0 auto;    padding: 0.6rem 1rem;    display: flex;    justify-content: space-between;    align-items: center;}
.head-nav {    display: flex;    gap: 1.5rem;}
.head-nav a {    color: var(--color-text-primary);    text-decoration: none;    font-weight: 600;    font-size: 0.95rem;    display: flex;    align-items: center;    gap: 0.5rem;    padding: 0.5rem 0.75rem;    border-radius: 8px;    transition: all 0.2s ease;}
.head-nav a:hover {    background-color: #f3f4f6;    color: var(--color-accent-red);}
.head-nav a:hover .icon {    fill: var(--color-accent-red);}
.head .icon {    width: 1.25rem;    height: 1.25rem;    fill: #6b7280;}
.logo img {    max-height: 42px;    display: block;}
.head-actions {    display: flex;    align-items: center;    gap: 1rem;}
.btn-help {    display: flex;    align-items: center;    gap: 8px;   color : var(--color-accent-blue);     border: 2px solid var(--color-accent-blue);    background: #fff !important;     padding-left:14px;    border-radius: 20px;    font-weight: 700 !important;    font-size: 0.9rem !important;    transition: all 0.3s ease;    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2); text-decoration: none;}
.btn-help-icon {    color: #fff;    background: var(--color-accent-blue);     width: 32px;    height: 32px;    border-radius: 50%;    display: flex;    align-items: center;    justify-content: center;    font-size: 1.1rem;    transition: all 0.3s ease;}
.btn-help:hover {   color : #fff;     background: var(--color-accent-blue) !important;     transform: translateY(-1px);    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.25);}
.btn-help:hover .btn-help-icon {   color : var(--color-accent-blue);     background: #fff;}
.btn-profile {    color: var(--color-text-secondary) !important;    font-weight: 600;    text-decoration: none;    font-size: 0.95rem;}
.btn-profile.active {    color: var(--color-accent-red) !important;}
.btn-profile:hover {    color: var(--color-text-primary) !important;}




 



/* --- 3. Основной макет --- */
.container {    display: grid;    grid-template-columns: 1fr;    gap: 2rem;    max-width: 1400px;    margin: 2rem auto;    padding: 0 1rem;}
.rightblok {        order: -1;      }


/* --- 4. Карточка клиники --- */
.centerlist {    position: relative;    display: flex;    flex-direction: column;    background-color: var(--color-surface);    border: 1px solid var(--color-border);    border-radius: 12px;    margin-bottom: 1.5rem;    box-shadow: 0 1px 2px rgba(0,0,0,0.04);    transition: all 0.3s ease;}
.centerlist:hover {    box-shadow: 0 10px 20px rgba(0,0,0,0.07);    transform: translateY(-4px);    border-color: #d1d5db;}
.listfoto { position: relative; flex-shrink: 0; }
.listfoto img { display: block; width: 100%; height: 250px; object-fit: cover; border-radius: 11px 11px 0 0; }
.listfoto b {    position: absolute; top: 1rem; right: 1rem;    background-color: rgba(255, 255, 255, 0.9);    color: var(--color-accent-red);    border: 2px solid rgba(0, 0, 0, 0.1);    border-radius: 50%; width: 48px; height: 48px;    display: flex; align-items: center; justify-content: center;    font-size: 1.2rem; font-weight: 700;    box-shadow: 0 2px 8px rgba(0,0,0,0.15);}
.listdes { display: flex; flex-direction: column; padding: 1.5rem; width: 100%; }
.listdes h4 a {    color: var(--color-text-primary);    text-decoration: none;    font-size: 1.2rem;}
.listdes h4 a:hover { color: var(--color-accent-red); }
h4 a span {    font-size: 0.75rem;    color:#fff;    background-color: rgba(30, 160, 36, 0.7);    margin-right: 0.5rem;    padding: 3px 10px;    vertical-align: middle;    border-radius: 12px;    font-family: var(--font-primary);}
h4 a:hover span { background-color: rgba(30, 160, 36, 1); }
.listdes p { margin: 0.25rem 0; color: var(--color-text-secondary); }
.listadr { margin-top: auto;  border-top: 1px solid var(--color-border); }
.listadr div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.listdes a { color: #4b5563; text-decoration: none; }
.listdes a:hover { color: var(--color-accent-red); }
.spaa {padding-top: 8px;}
a.knopka {    background-color: rgba(234, 76, 98, 0.1);    color: #9f1239;    padding: 0.5rem 1rem;    border-radius: 6px;    font-size: 0.9rem;    font-weight: 600;}
a.knopka:hover { background-color: rgba(234, 76, 98, 0.2); text-decoration: none; }
.listdes .on, .listdes .off {      position: absolute; top: 1rem;       font-size: 0.8rem; font-weight: 600; padding: 0.25rem 0.75rem;    border-radius: 12px;}
.listdes .on { background-color: #dcfce7; color: var(--color-accent-green); }
.listdes .off { background-color: #f3f4f6; color: var(--color-text-secondary); }


/* --- 5. Сайдбар --- */
.rightblok > h3 { text-align: center; }
.rightblok button {display: block; margin:20px auto;}
.otzs { position: sticky; top: 90px; }
.otzs h3, .newclinic h3 { border-bottom: 2px solid var(--color-border); padding-bottom: 0.5rem; }
.otz {    border: 1px solid var(--color-border); padding: 1rem;    margin-bottom: 1rem; border-radius: 8px;     overflow-wrap: anywhere;}
.otz a { color: #111827; text-decoration: none; font-weight: 600;}
.otz a:hover { color: var(--color-accent-red); }
.otz.red { background-color: #fff1f2; border-left: 4px solid var(--color-danger); }
.otz.green { background-color: #f0fdf4; border-left: 4px solid var(--color-success); }
.otz p { color: #4b5563; margin: 0.25rem 0 0 0; }
.otz i { font-style: normal; font-weight: 600; color: var(--color-text-primary); }
.otz small { display: block; margin-top: 0.5rem; font-size: 0.8rem; color: #9ca3af; }
.newclinic { background-color: #fefce8; border: 1px solid #fde047; border-radius: 8px; padding: 1rem 1rem 0 1rem;  }
.newclinic p::after {  content: "";  display: table;  clear: both;}
.newclinic p { margin: 0; padding: 0.5rem 0; border-bottom: 1px solid #fde047;  }
.newclinic p:last-child { border-bottom: none; }
.newclinic a { color: #854d0e; font-weight: 500; }
.newclinic span {padding-left: 20px; white-space: nowrap; font-weight: 100; color: #636b13; font-size: 0.9em;  float:right; }

/* --- 6. Пагинация --- */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin: 2rem 0; }
.pagination a, .pagination span { color: #374151; padding: 0.5rem 1rem; text-decoration: none; border: 1px solid #d1d5db; border-radius: 8px; background-color: #fff; }
.pagination a:hover { background-color: #f3f4f6; border-color: #9ca3af; text-decoration: none; }
.pagination a.active { background-color: var(--color-accent-green); color: white; border-color: var(--color-accent-green); }

/* --- 7. Футер и фильтры --- */
footer { background-color: #111827; color: #9ca3af; padding: 3rem 1rem; margin-top: 2rem; position:relative; }
.footer-container { max-width: 1400px; margin: 0 auto; display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.footer-column h3 , .city h3 { color: #fff; font-size: 1.1rem; border-bottom: 1px solid #4b5563; padding-bottom: 0.75rem; margin-bottom: 1rem; }
.footer-list, .footer-links { list-style: none; padding: 0; margin: 0; }
/* Стили для фильтров по услугам и годам */
.footer-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.footer-list li a { display: block; padding: 0.25rem 0.75rem; border: 1px solid #374151; border-radius: 6px; color: #9ca3af; text-decoration: none; font-size: 0.9rem; }
.footer-list li a:hover { background-color: #374151; color: #fff; text-decoration: none; }
.footer-list li a.active { background-color: var(--color-accent); color: #fff; border-color: var(--color-accent); }
/* Стили для фильтра по городам */
footer .city p { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; line-height: 1.8; }
footer .city a { color: #9ca3af; text-decoration: none; border: none; padding: 0; }
footer .city a:hover { color: #fff; }
footer .city a sup { color: #6b7280; }
footer .city a.active { font-weight: 600; color: #fff; }
.footer-bottom { text-align: center; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #374151; font-size: 0.9rem; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-top: 0.5rem; }
.footer-links a { color: #9ca3af; text-decoration: none; }
.footer-links a:hover { color: #fff; }

/* --- 8. Форма поиска --- */
.site-search-form { margin-top: 2rem; padding:0 16px;}
.site-search-form form { display: flex; max-width: 1360px; margin: 0 auto; }
.site-search-form input[type="search"] { flex-grow: 1; border: 1px solid var(--color-border); border-right: none; padding: 0.75rem 1rem; font-size: 1rem; border-radius: 25px 0 0 25px; }
.site-search-form input[type="search"]:focus { outline: 2px solid var(--color-accent); outline-offset: -2px;}
.site-search-form button { background-color: var(--color-accent-blue); color: white; border: none; padding: 0 1.5rem; cursor: pointer; font-weight: 600; border-radius: 0 25px 25px 0; }
.site-search-form button:hover { background-color: var(--color-accent-blue-hover); }

.about-site-block { max-width: 1400px;  }
.about-site-content { background-color: var(--color-surface);  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); border: 1px solid var(--color-border); }
.about-site-content h2 { font-family: var(--font-secondary); font-size: 1.75rem; color: var(--color-text-primary); margin-bottom: 1.25rem; text-align: center; }
.about-site-content p { font-family: var(--font-primary); font-size: 1rem; color: var(--color-text-secondary); line-height: 1.7; margin-bottom: 1rem; }
.about-site-content p:last-child { margin-bottom: 0; }
.about-site-content strong { color: var(--color-text-primary); font-weight: 700; }

.related-block h2 { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--color-text-primary); }
.related-item { background-color: var(--color-surface); border: 1px solid var(--color-border); padding: 1rem 1.25rem; border-radius: 8px; margin-bottom: 1rem; border-left: 4px solid var(--color-accent-blue); transition: box-shadow 0.2s ease; }
.related-item:hover { box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.related-item h3.related-title { font-size: 1.1rem; font-family: var(--font-primary); font-weight: 600; margin: 0 0 0.5rem 0; }
.related-item h3.related-title a { color: var(--color-text-primary); text-decoration: none; }
.related-item h3.related-title a:hover { color: var(--color-accent-blue); text-decoration: underline; }
.related-snippet { margin: 0 0 0.75rem 0; font-size: 0.95rem; color: var(--color-text-secondary); line-height: 1.5; }
.related-meta { font-size: 0.8rem; color: #9ca3af; }

.filter-toggle-wrapper { text-align: center; }
#toggle-filters-btn { background-color: var(--color-accent-red); color: white; border: none; padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }
#load-more-clinics-btn, .cookie-banner button { background-color: var(--color-accent-blue); color: white; border: none; padding: 0.5rem 1.5rem; font-size: 1rem; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }
#toggle-filters-btn:hover { background-color: var(--color-accent-red-hover); transform: translateY(-2px); }
#load-more-clinics-btn:hover, .cookie-banner button:hover { background-color: var(--color-accent-blue-hover); transform: translateY(-2px); }
#filters-container { display: none; padding-top: 2rem; }
#filters-container.loading { text-align: center; color: #fff; padding: 2rem; }

.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: #f8f8f8; border-top: 1px solid #ccc; font-size: 14px; color: #333; padding: 10px; z-index: 9999; box-shadow: 0 -2px 6px rgba(0,0,0,0.1); transition: transform 0.3s ease, opacity 0.3s ease; }
.cookie-banner-inner { max-width: 1000px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.cookie-banner a { color: var(--color-accent-blue); text-decoration: underline; }
.cookie-banner.hidden { opacity: 0; transform: translateY(100%); pointer-events: none; }
.time-loadd {position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.4); color: #556ba9; padding: 3px 8px; font-size: 11px; z-index: 9999; border-radius: 5px;}

/* Адаптивность */

@media (max-width: 768px) {
    .btn-help-text { display: none; }
    .btn-help { padding:0; border-radius: 50%; }
    .logo img { max-height: 32px; }
    .listdes .on, .listdes .off { left: 1rem; }
}

@media (min-width: 768px) {
    .centerlist { flex-direction: row; }
    .listfoto img { width: 250px; height: auto; min-height: 100%; border-radius: 11px 0 0 11px; }
    .listdes .on, .listdes .off { right: 1rem; }
    .related-blocks-wrapper {        grid-template-columns: 1fr 1fr;    }
}

@media (max-width: 960px) {
    .lefttopmenu span { display: none; }
    .about-site-block { margin: 2rem auto 1rem auto;    }
    .about-site-content {    padding: 1.5rem;    }
    .about-site-content h2 {        font-size: 1.5rem;    }
    .about-site-block {  margin: 3rem auto 1rem auto; padding: 0 0.3rem; }
    .about-site-content { background-color: var(--color-surface); padding: 1rem; border-radius: 8px; }
    .head-nav span { display: none; }
    .head-nav { gap: 0.5rem; }
    .head-info-line { display: none; }
}
@media (min-width: 960px) {
    .about-site-block { margin: 3rem auto 2rem auto; padding: 0 1rem; }
    .about-site-content {padding: 2.5rem; border-radius: 12px;}
    .container {        grid-template-columns: minmax(0, 3fr) minmax(300px, 1fr);    }
    .rightblok {        order: 0;     }
}
