/*!
Theme Name: ALMRNEW
Theme URI: https://almreg.kz/
Author: Medical Center
Author URI: https://almreg.kz/
Description: Современная тема для медицинского центра на основе дизайна ННЦХ
Version: 1.0.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: almrnew
Tags: medical, healthcare, responsive, custom-menu, custom-logo
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Reset & Normalize
# Typography
# Layout
    ## Header
    ## Navigation
    ## Content
    ## Footer
# Components
    ## Buttons
    ## Cards
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Reset & Normalize
--------------------------------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #088DD0;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #004999;
}

/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/*--------------------------------------------------------------
# Layout
--------------------------------------------------------------*/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
    padding: 40px 0;
}

/* На главной убираем верхний отступ, чтобы слайдер прилегал к меню */
.home .site-content {
    padding-top: 0;
}

/*--------------------------------------------------------------
## Header
--------------------------------------------------------------*/
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background-color: #f8f9fa;
    padding: 10px 0;
    font-size: 0.875rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-contacts {
    display: flex;
    gap: 20px;
}

.header-contacts a {
    color: #555;
}

.header-contacts a:hover {
    color: #088DD0;
}

.header-lang {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-lang ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-lang li {
    display: inline;
}

.header-lang li:not(:last-child)::after {
    content: "|";
    margin-left: 8px;
    color: #999;
}

.header-lang a {
    color: #555;
    text-transform: uppercase;
    font-weight: 500;
    padding: 2px 5px;
    transition: color 0.3s ease;
}

.header-lang a:hover {
    color: #088DD0;
}

.header-lang .current-lang,
.header-lang li.lang-item-first.current-lang a {
    color: #088DD0;
    font-weight: 600;
}

.header-main {
    padding: 15px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo,
.custom-logo,
.custom-logo-link img,
.site-branding img {
    max-height: 120px !important;
    width: auto !important;
    height: auto !important;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #088DD0;
    margin: 0;
}

.site-description {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

/*--------------------------------------------------------------
## Navigation
--------------------------------------------------------------*/
.main-navigation {
    background-color: #088DD0;
}

.main-navigation .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 15px 20px;
    color: #ffffff;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    background-color: #0052a3;
}

.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 250px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 999;
}

.main-navigation li:hover > .sub-menu {
    display: block;
}

/* Nested (3rd level) submenus should open to the side, not below,
   otherwise they overlap and block the next sibling item in the parent submenu. */
.main-navigation .sub-menu .sub-menu {
    top: 0;
    left: 100%;
}

.main-navigation .sub-menu a {
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 20px;
}

.main-navigation .sub-menu a:hover {
    background-color: #f8f9fa;
    color: #088DD0;
}

.menu-toggle {
    display: none;
    background-color: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

/*--------------------------------------------------------------
## Content
--------------------------------------------------------------*/
.content-area {
    padding: 40px 0;
}

.entry-header {
    margin-bottom: 30px;
}

.entry-title {
    color: #1a1a1a;
    margin-bottom: 10px;
}

.entry-meta {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.entry-content {
    line-height: 1.8;
}

.entry-content > * {
    margin-bottom: 1.5rem;
}

/*--------------------------------------------------------------
## Footer
--------------------------------------------------------------*/
.site-footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    color: #ffffff;
    font-size: 1.125rem;
    margin-bottom: 15px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 8px;
}

.footer-widget a {
    color: #cccccc;
}

.footer-widget a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 0.875rem;
    color: #999;
}

/*--------------------------------------------------------------
# Components
--------------------------------------------------------------*/

/*--------------------------------------------------------------
## Buttons
--------------------------------------------------------------*/
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #088DD0;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0052a3;
    color: #ffffff;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/*--------------------------------------------------------------
## Cards
--------------------------------------------------------------*/
.card {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.card-content {
    color: #555;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
    .header-top .container {
        flex-direction: column;
        gap: 10px;
    }

    .header-main .container {
        flex-direction: column;
        text-align: center;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .main-navigation.toggled ul {
        display: flex;
    }

    .main-navigation a {
        padding: 12px 20px;
    }

    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        background-color: #0052a3;
    }

    .main-navigation .sub-menu a {
        color: #ffffff;
        padding-left: 40px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .site-content {
        padding: 20px 0;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/*--------------------------------------------------------------
# Hero Slider
--------------------------------------------------------------*/
.hero-slider {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    background-color: #1a1a1a;
}

.hero-slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(8,25,50,0.75) 0%, rgba(8,25,50,0.35) 60%, rgba(8,25,50,0.15) 100%);
    z-index: 1;
}

.hero-slide .container {
    position: relative;
    z-index: 2;
}

.hero-slide-content {
    max-width: 650px;
    color: #ffffff;
}

.hero-slide-content h1 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-slide-text {
    font-size: 1.125rem;
    margin-bottom: 25px;
    line-height: 1.7;
}

.hero-slide-content .btn {
    background-color: #088DD0;
}

.hero-slide-content .btn:hover {
    background-color: #066aa3;
}

.hero-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255,255,255,0.2);
    border: none;
    color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.hero-slider-arrow:hover {
    background-color: rgba(255,255,255,0.4);
}

.hero-slider-prev {
    left: 20px;
}

.hero-slider-next {
    right: 20px;
}

.hero-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background-color: transparent;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s ease;
}

.hero-slider-dot.active,
.hero-slider-dot:hover {
    background-color: #ffffff;
}

@media screen and (max-width: 768px) {
    .hero-slider {
        height: 420px;
    }

    .hero-slide-content h1 {
        font-size: 1.75rem;
    }

    .hero-slide-text {
        font-size: 1rem;
    }

    .hero-slider-arrow {
        width: 38px;
        height: 38px;
    }
}

@media screen and (max-width: 480px) {
    .hero-slider {
        height: 360px;
    }

    .hero-slider-arrow {
        display: none;
    }
}

/*--------------------------------------------------------------
# News Section
--------------------------------------------------------------*/
.news-section {
    padding: 60px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.news-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.news-card-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.news-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-date {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 10px;
}

.news-card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.news-card-title a {
    color: #1a1a1a;
}

.news-card-title a:hover {
    color: #088DD0;
}

.news-card-excerpt {
    color: #555;
    flex: 1;
    margin-bottom: 15px;
}

.news-card .btn {
    align-self: flex-start;
}

.news-more {
    text-align: center;
    margin-top: 40px;
}

@media screen and (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

