/**
 * MedEquip Aggregator Main Styles
 * Референс: https://medeq.ru/
 * 
 * @package MedEquip_Aggregator
 */

/* ==========================================================================
   VARIABLES (CSS Custom Properties)
   ========================================================================== */
:root {
    /* Цветовая схема (медицинский синий/зеленый) */
    --color-primary: #12356a;
    --color-primary-dark: #12356a;
    --color-primary-light: #12356a;
    --color-secondary: #00a859;
    --color-secondary-dark: #008047;
    
    /* Нейтральные цвета */
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-lighter: #999999;
    --color-border: #e0e0e0;
    --color-bg: #ffffff;
    --color-bg-gray: #f5f5f5;
    --color-bg-dark: #2c2c2c;
    
    /* Статусы */
    --color-success: #00a859;
    --color-warning: #ff9800;
    --color-error: #f44336;
    --color-info: #2196f3;
    
    /* Типографика */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Размеры */
    --border-radius: 4px;
    --border-radius-large: 8px;
    --container-width: 1600px;
    --spacing: 20px;
    
    /* Тени */
    --shadow-small: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-large: 0 8px 16px rgba(0,0,0,0.2);
    
    /* Transitions */
    --transition-base: all 0.3s ease;
}

@media (max-width: 1600px) {
    :root {
        --container-width: 1400px;
    }
}

@media (max-width: 1400px) {
    :root {
        --container-width: 1240px;
    }
}

@media (max-width: 1200px) {
    :root {
        --container-width: 100%;
    }
}


/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:-webkit-any-link:focus-visible {
    outline-offset: 0;
}

:focus-visible {
    outline: -webkit-focus-ring-color auto 0;
}

html {
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--color-primary-dark);
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

.site-content {
    flex: 1;
    padding: 40px 0;
}

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.skip-link:focus {
    clip: auto;
    height: auto;
    width: auto;
    display: block;
    padding: 15px;
    background: var(--color-primary);
    color: white;
    z-index: 122222200;
}

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

@media (min-width: 1280px) {
    .container {
        padding: 0 32px;
    }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: white;
}

.btn-secondary {
    background: var(--color-secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--color-secondary-dark);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.btn svg {
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

/* ==========================================================================
   CARDS
   ========================================================================== */
.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--color-bg-gray);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 15px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   BADGES
   ========================================================================== */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    line-height: 1;
}

.badge-success {
    background: var(--color-success);
    color: white;
}

.badge-warning {
    background: var(--color-warning);
    color: white;
}

.badge-error {
    background: var(--color-error);
    color: white;
}

.badge-info {
    background: var(--color-info);
    color: white;
}

.badge-russian {
    background: linear-gradient(to right, #0039a6, #d52b1e);
    color: white;
}

/* ==========================================================================
   GRID
   ========================================================================== */
.grid {
    display: grid;
    gap: var(--spacing);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: #12356a;
    color: #cccccc;
    margin-top: 60px;
}

.footer-copyright a {
    color: #ffffff;
    text-decoration: underline;
}

.footer-widgets {
    padding: 60px 0 40px;
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-widget-area h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-widget-area ul {
    list-style: none;
}

.footer-widget-area ul li {
    margin-bottom: 10px;
}

.footer-widget-area a {
    color: #cccccc;
}

.footer-widget-area a:hover {
    color: white;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 30px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    color: #999999;
    font-size: 14px;
}

.footer-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    font-size: 14px;
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.footer-phone,
.footer-email {
    color: #cccccc;
}

/* ==========================================================================
   NOTIFICATIONS
   ========================================================================== */
.medequip-notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 12222220;
    max-width: 350px;
}

.notification-toast {
    background: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-large);
    margin-bottom: 10px;
    border-left: 4px solid var(--color-info);
    animation: slideInRight 0.3s ease;
}

.notification-toast.success {
    border-left-color: var(--color-success);
}

.notification-toast.error {
    border-left-color: var(--color-error);
}

.notification-toast.warning {
    border-left-color: var(--color-warning);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 20px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-main-content {
        flex-wrap: wrap;
    }
    
    .main-navigation {
        display: none;
        width: 100%;
        order: 3;
    }
    
    .main-navigation.mobile-active {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-widgets-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-top-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .btn {
        width: 100%;
    }
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-page {
    padding: 40px 0 60px;
}

.faq-page .accordion-wrap {
    max-width: unset;
    padding-left: 25%;
    margin: 0;
}

.faq-group-title {
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
    font-size: 24px;
    font-weight: 700;
    margin: 48px 0 32px;
}

.faq-group-title:first-of-type {
    margin-top: 0;
}

.accordion-wrap {
    margin-bottom: 40px;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */

.about-stats {
    margin: 60px 0;
    padding: 60px 0;
    background-color: #f9f9f9;
    border-radius: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1222222px;
    margin: 0 auto;
    padding: 0 40px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 48px;
    font-weight: 700;
    color: #12356a;
    margin-bottom: 8px;
}

.stat-title {
    font-size: 18px;
    font-weight: 600;
    color: #222222;
    opacity: .5;
    margin-bottom: 4px;
}

.stat-description {
    font-size: 14px;
    color: #666666;
}

.about-content {
    padding-left: 25%;
}

.about-content p {
    margin: 16px 0;
    font-size: 16px;
    color: #222222;
    line-height: 1.6;
}

.about-content h2 {
    font-size: 32px;
    margin-bottom: 40px;
}

.about-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.about-features {
    margin: 40px 0 60px;
    padding-left: 25%;  
}

.about-features h2 {
    font-size: 32px;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 30px;
    background-color: #f7f7f7;
    border: none;
    border-radius: 0;
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: #12356a;
    box-shadow: 0 4px 12px rgba(65, 35, 155, 0.1);
    transform: translateY(-4px);
}

.feature-icon {
    margin: 0 auto 20px;
    width: 48px;
    height: 48px;
}

.feature-item h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #222222;
}

.feature-item p {
    font-size: 14px;
    color: #222222;
    opacity: .5;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .stats-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 36px;
    }
}

/* ==========================================================================
   PAGE CONTACTS
   ========================================================================== */

.contacts-page {
    padding: 40px 0;
}

.contacts-layout {
    max-width: 1160px;
    padding-left: 25%;
    width: 100%;
}

.contacts-content {
    margin-bottom: 60px;
    font-size: 16px;
    line-height: 1.8;
}

.contact-form-section {
    background-color: #f7f7f7;
    padding: 40px;
    border-radius: 0;
}

.contact-form-section h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.contact-form-section > p {
    color: #666666;
    margin-bottom: 32px;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333333;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    padding: 12px 16px;
    border: 1px solid #f7f7f7;
    border-radius: 0;
    font-size: 15px;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #12356a;
}

.contact-form textarea {
    resize: vertical;
    font-family: inherit;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-label a {
    color: #12356a;
    text-decoration: underline;
}

.btn--blue {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    background-color: #12356a;
    color: #ffffff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn--blue:hover {
    opacity: .9;
}

.form-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.form-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}


.alphabet-nav__letter.active {
    border-color: #12356a;
    background-color: #12356a;
    color: #ffffff;
}

@media (max-width: 768px) {
    .contact-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-form-section {
        padding: 24px;
    }
}