/* --- Global Styles & Variables --- */
:root {
    --primary-blue: #005A9C; /* A professional blue */
    --secondary-blue: #3E8EDE;
    --light-gray: #f4f7fa;
    --dark-text: #333;
    --light-text: #fff;
    --border-color: #ddd;
    --red-accent: #d9534f; /* From logo */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    background-color: var(--primary-blue);
    color: var(--light-text);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--secondary-blue);
}


/* --- Header --- */
.main-header {
    background: var(--light-text);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    height: 50px;
    margin-right: 10px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    color: var(--primary-blue);
    font-weight: bold;
}
.logo-text span:first-child {
    font-size: 1.2rem;
}
.logo-text span:last-child {
    font-size: 0.8rem;
    color: var(--dark-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 600;
    padding-bottom: 5px;
    transition: color 0.3s, border-bottom 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--dark-text);
    border-bottom: 2px solid var(--primary-blue);
}

.header-contact {
    display: flex;
    align-items: center;
}

.phone-number {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: bold;
    margin-right: 20px;
}

.social-icons a {
    color: var(--primary-blue);
    margin-left: 15px;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--secondary-blue);
}

.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-blue);
    cursor: pointer;
}

/* --- Hero Video Section --- */
.hero-video-section {
    position: relative;
    height: 80vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    text-align: center;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: -2;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 90, 156, 0.5); /* Blue overlay */
    z-index: -1;
	display: none;
}

.hero-content {
    color: var(--light-text);
    z-index: 1;
    padding-bottom: 10vh; /* Создает отступ от верхнего края */
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--light-text);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: 
      fadeInUp 1s ease-out 5s forwards,
      fadeOut 1s ease-out 30s forwards;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--light-text);
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.6);
    opacity: 0; /* Добавили, чтобы он был невидимым до анимации */
    animation: fadeInUp 1s ease-out 5.5s forwards; /* Синхронизировали задержку */
}

.video-controls {
    margin-top: 2rem;
}

#playPauseBtn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--light-text);
    color: var(--light-text);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s;
}

#playPauseBtn:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* --- Content Sections --- */
.page-header {
    background-color: var(--light-gray);
    padding: 3rem 0;
    text-align: center;
}
.page-header h1 {
    font-size: 2.8rem;
}
.page-header p {
    font-size: 1.1rem;
    color: #666;
}

.how-it-works-section, .about-us-snippet, .about-main-section, .mission-vision-section {
    padding: 4rem 0;
}

.how-it-works-section h2, .about-us-snippet h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.steps-container {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    text-align: center;
}

.step {
    flex: 1;
    padding: 1.5rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1.5rem auto;
}
.step h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.about-us-snippet {
    background-color: var(--light-gray);
    text-align: center;
}
.about-us-snippet p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

/* --- About Page --- */
.about-main-section .about-content {
    display: flex;
    gap: 3rem;
    align-items: center;
}
.about-main-section .text-content {
    flex: 1;
}
.about-main-section .image-content {
    flex: 1;
}
.about-main-section img {
    max-width: 100%;
    border-radius: 10px;
}
.mission-vision-section {
    background: var(--light-gray);
}
.mission-vision-section .container {
    display: flex;
    gap: 3rem;
}
.mission, .vision {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.vision ul {
    list-style: none;
}
.vision li {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}
.vision .fa-check {
    color: var(--secondary-blue);
    margin-right: 10px;
    margin-top: 5px;
}


/* --- Services Page --- */
/* Стили для нового макета с карточками-аккордеонами */

.services-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

.services-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    align-items: start; /* Исправление, чтобы карточки не растягивались */
}

.service-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden; 
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.service-header-button {
    width: 100%;
    background-color: var(--light-gray);
    border: none;
    padding: 20px 25px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.service-header-button h3 {
    margin: 0;
    font-size: 1.4rem;
    /* Цвет заголовка уже задан глобально для h3 */
}

.service-header-button:hover {
    background-color: #e9ecef; /* Альтернативный серый для ховера */
}

/* Иконка "+"/"x" */
.service-header-button .icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue); 
    transition: transform 0.4s ease;
}

.service-header-button.active .icon {
    transform: rotate(45deg);
}

/* Раскрывающийся контент */
.service-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    background-color: #ffffff;
}

.service-content-inner {
    padding: 25px;
    border-top: 1px solid var(--border-color);
}

.service-content-inner p {
    color: #555;
}

.service-content-inner ul {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
}

.service-content-inner ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 12px;
}

.service-content-inner ul li i {
    position: absolute;
    left: 0;
    top: 5px;
    color: #28a745; 
}

/* Адаптивность для карточек услуг */
@media (max-width: 992px) {
    .services-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* --- Contact Page --- */
.contact-section .container {
    display: flex;
    gap: 3rem;
    padding: 4rem 20px;
}
.contact-info, .contact-form-container {
    flex: 1;
}
.contact-info h3, .contact-form-container h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}
.contact-info p {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}
.contact-info i {
    color: var(--primary-blue);
    margin-right: 15px;
    width: 20px;
    text-align: center;
    margin-top: 4px;
}
.contact-info a {
    color: var(--secondary-blue);
    text-decoration: none;
}
.contact-info a:hover {
    text-decoration: underline;
}

.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 5px rgba(0, 90, 156, 0.3);
}

/* --- Footer --- */
.main-footer {
    background: var(--primary-blue);
    color: var(--light-text);
    padding-top: 3rem;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 2rem;
    flex-wrap: wrap;
}
.footer-contact, .footer-links {
    flex: 1;
    min-width: 250px;
}
.footer-contact h4, .footer-links h4 {
    color: var(--light-text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--secondary-blue);
}
.footer-contact p {
    color: #e0e0e0;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}
.footer-contact i {
    margin-right: 10px;
}
.footer-links ul {
    list-style: none;
}
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-contact a, .footer-links a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-contact a:hover, .footer-links a:hover {
    color: var(--light-text);
}
.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--secondary-blue);
}

/* --- Responsive Design --- */
@media(max-width: 992px) {
    .main-header .container {
        flex-wrap: wrap;
    }
    .header-contact {
        display: none; /* Hide on smaller screens, can be moved to menu */
    }
    .main-nav {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 15px;
        background: #fff;
    }
    .main-nav.active {
        display: block;
    }
    .nav-links {
        flex-direction: column;
    }
    .nav-links li {
        margin: 0;
        text-align: center;
    }
    .nav-links a {
        display: block;
        padding: 15px;
        border-bottom: 1px solid var(--light-gray);
    }
    .nav-links a:hover, .nav-links a.active {
        background: var(--light-gray);
        border-bottom: 1px solid var(--light-gray);
    }
    .mobile-menu-button {
        display: block;
    }
    
    .contact-section .container, .mission-vision-section .container {
        flex-direction: column;
    }
}

@media(max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
    }
    .steps-container, .about-main-section .about-content {
        flex-direction: column;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
     .footer-contact p, .footer-contact i {
        justify-content: center;
    }
}

/* --- Стили для фоновых изображений --- */

/* Фон для секции "How It Works" на главной странице (Home) */
.how-it-works-section {
    position: relative;
    background-image: url('../images/team.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Эффект параллакса */
    padding: 5rem 0;
	margin-top: 60px;
}

/* Фон для секции "Mission & Vision" на странице "О нас" (About) */
.mission-vision-section {
    position: relative;
    background-image: url('../images/caring-hands.jpg');
    background-size: cover;
    background-position: center;
    padding: 5rem 0;
}

/* Фон для заголовка на странице "Услуги" (Services) */
.page-header.services-header {
    position: relative;
    background-image: url('../images/nurse-patient.jpg');
    background-size: cover;
    background-position: center;
    padding: 6rem 0;
}

/* Полупрозрачное наложение для читаемости текста */
.how-it-works-section::before,
.mission-vision-section::before,
.page-header.services-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 90, 156, 0.75); /* Синий полупрозрачный цвет */
    z-index: 1;
}

/* Делаем текст на фоне изображений белым и видимым */
.how-it-works-section > .container,
.mission-vision-section > .container,
.page-header.services-header > .container {
    position: relative;
    z-index: 2;
}

.how-it-works-section h2,
.how-it-works-section h3,
.how-it-works-section p,
.mission-vision-section h3,
.mission-vision-section p,
.mission-vision-section li,
.page-header.services-header h1,
.page-header.services-header p {
    color: var(--light-text);
}

/* Мелкие правки для лучшего вида */
.how-it-works-section .step {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2rem;
}

.mission-vision-section .mission,
.mission-vision-section .vision {
   background: none;
   box-shadow: none;
   padding: 0;
}

.mission-vision-section .vision ul {
    padding-left: 0;
}

/* --- Анимация для текста --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Стили для шапки страницы Контактов --- */

/* Устанавливаем фоновое изображение */
.page-header.contact-header {
    position: relative;
    background-image: url('../images/contact.jpg');
    background-size: cover;
    background-position: center;
    padding: 6rem 0; /* Делаем шапку немного выше */
}

/* Добавляем синее полупрозрачное наложение */
.page-header.contact-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 90, 156, 0.75);
    z-index: 1;
}

/* Делаем текст белым и видимым поверх наложения */
.page-header.contact-header .container {
    position: relative;
    z-index: 2;
}

.page-header.contact-header h1,
.page-header.contact-header p {
    color: var(--light-text);
}

/* --- Стили для шапки страницы "О нас" --- */

.page-header.about-header {
    position: relative;
    background-image: url('../images/about.jpg');
    background-size: cover;
    background-position: center;
    padding: 6rem 0;
}

.page-header.about-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 90, 156, 0.75);
    z-index: 1;
}

.page-header.about-header .container {
    position: relative;
    z-index: 2;
}

.page-header.about-header h1 {
    color: var(--light-text);
}

/* --- Стили для сертификатов в футере --- */

.footer-accreditations {
    flex: 1;
    min-width: 250px;
}

.footer-accreditations h4 {
    color: var(--light-text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--secondary-blue);
}

.accreditation-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.accreditation-logos img {
    height: 50px; /* Задаем одинаковую высоту для всех лого */
    width: auto;
    background: #ffffff; /* Белый фон для логотипов с прозрачностью */
    border-radius: 5px;
    padding: 5px;
}

/* Анимация для исчезновения текста */
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}