/**
 * APOSTLES GROUP - Custom Styles
 * Дополнительные стили для WordPress темы
 */

/* КРИТИЧЕСКИ ВАЖНЫЕ СТИЛИ ДЛЯ МОБИЛЬНОГО МЕНЮ */
/* Переопределяем все стили для мобильного меню с максимальным приоритетом */

@media (max-width: 767px) {
    /* Кнопка мобильного меню */
    .mobile-menu-btn {
        display: block !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        padding: 0.5rem !important;
        border-radius: 0.375rem !important;
        color: #fff !important;
    }

    .mobile-menu-btn:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }

    .mobile-menu-btn svg {
        width: 1.5rem !important;
        height: 1.5rem !important;
        stroke: currentColor !important;
        fill: none !important;
        stroke-width: 2 !important;
    }

    /* Десктопное меню скрыто на мобильных */
    .desktop-nav {
        display: none !important;
    }

    /* Мобильное меню */
    #mobile-menu {
        display: none !important;
        background-color: hsl(222, 22%, 8%) !important;
        margin-top: 1rem !important;
        padding-top: 1rem !important;
        border-top: 1px solid hsl(222, 22%, 18%) !important;
        width: 100% !important;
        position: relative !important;
        z-index: 10 !important;
        text-align: center !important;
    }

    #mobile-menu.show {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        max-height: none !important;
        overflow: visible !important;
    }

    #mobile-menu a {
        display: block !important;
        padding: 0.75rem 0 !important;
        color: hsl(240, 5%, 65%) !important;
        text-decoration: none !important;
        border-bottom: 1px solid transparent !important;
        transition: all 0.3s ease !important;
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }

    #mobile-menu a:hover {
        color: hsl(240, 10%, 98%) !important;
        border-bottom-color: hsl(222, 22%, 18%) !important;
        background: none !important;
    }

    /* Стили для контактов в мобильном меню */
    .mobile-contacts {
        margin-top: 1.5rem !important;
        padding-top: 1rem !important;
        border-top: 1px solid hsl(222, 22%, 18%) !important;
        text-align: center !important;
    }

    .mobile-contact-item {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        padding: 0.75rem 1rem !important;
        color: hsl(240, 5%, 65%) !important;
        text-decoration: none !important;
        font-size: 0.875rem !important;
        border-bottom: none !important;
        transition: all 0.3s ease !important;
        margin: 0.25rem auto !important;
        max-width: 280px !important;
        width: fit-content !important;
    }

    .mobile-contact-item:hover {
        color: hsl(4, 90%, 58%) !important;
        background: none !important;
    }

    .contact-icon {
        width: 1rem !important;
        height: 1rem !important;
        stroke: currentColor !important;
        fill: none !important;
        stroke-width: 2 !important;
        flex-shrink: 0 !important;
    }

    /* Специальная иконка для Telegram */
    .contact-icon[fill="currentColor"] {
        stroke: none !important;
        fill: currentColor !important;
    }

    /* Для WordPress меню в мобильной версии */
    #mobile-menu .menu,
    #mobile-menu .mobile-menu-list,
    #mobile-menu ul {
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        background: none !important;
    }

    #mobile-menu .menu li,
    #mobile-menu .mobile-menu-list li,
    #mobile-menu li {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        background: none !important;
    }

    #mobile-menu .menu a,
    #mobile-menu .mobile-menu-list a {
        display: block !important;
        padding: 0.75rem 0 !important;
        color: hsl(240, 5%, 65%) !important;
        text-decoration: none !important;
        border-bottom: 1px solid transparent !important;
        background: none !important;
    }

    #mobile-menu .menu a:hover,
    #mobile-menu .mobile-menu-list a:hover {
        color: hsl(240, 10%, 98%) !important;
        background: none !important;
    }
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex !important;
        align-items: center;
        gap: 2rem;
    }
    
    .mobile-menu-btn {
        display: none !important;
    }
    
    #mobile-menu {
        display: none !important;
    }
}

/* ИСПРАВЛЕНИЯ ДЛЯ ЛОГОТИПА */
/* Основные стили для контейнера логотипа */
.logo-container {
    width: 60px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
    background: transparent !important;
}

/* Стили для кастомного логотипа */
.custom-logo {
    max-width: 60px !important;
    max-height: 60px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
}

.custom-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 0.5rem !important;
    max-width: 60px !important;
    max-height: 60px !important;
    display: block !important;
}

.custom-logo a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    line-height: 0 !important;
}

/* Фолбэк логотип */
.fallback-logo {
    width: 60px !important;
    height: 60px !important;
    background: var(--gradient-primary) !important;
    border-radius: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.fallback-logo span {
    color: hsl(var(--primary-foreground)) !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
}

/* Мобильные стили для логотипа */
@media (max-width: 767px) {
    .logo-container {
        width: 50px !important;
        height: 50px !important;
    }

    .custom-logo {
        max-width: 50px !important;
        max-height: 50px !important;
    }

    .custom-logo img {
        max-width: 50px !important;
        max-height: 50px !important;
    }

    .fallback-logo {
        width: 50px !important;
        height: 50px !important;
    }

    .fallback-logo span {
        font-size: 1.25rem !important;
    }
}

/* Дополнительные исправления для WordPress */
.custom-logo-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    line-height: 0 !important;
}

/* Улучшения для WordPress классов */
.wp-block-image {
    margin: 2rem 0;
}

.wp-block-quote {
    border-left: 4px solid hsl(4, 90%, 58%);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    background: hsl(222, 22%, 12%, 0.5);
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.wp-block-separator {
    border: none;
    height: 1px;
    background: hsl(222, 22%, 18%);
    margin: 3rem 0;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Утилитарные классы для анимаций */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Кастомные компоненты */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    box-shadow: 0 0 40px hsl(4, 90%, 58%, 0.15);
    transform: translateY(-4px);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Улучшения доступности */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Состояния фокуса */
*:focus {
    outline: 2px solid hsl(4, 90%, 58%);
    outline-offset: 2px;
}

/* Кастомные скроллбары */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(222, 22%, 12%);
}

::-webkit-scrollbar-thumb {
    background: hsl(4, 90%, 58%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(4, 90%, 52%);
}

/* Печать */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .gradient-primary,
    .gradient-hero,
    .gradient-card {
        background: white !important;
    }
}

/* Мобильные улучшения */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
    
    .text-7xl {
        font-size: 3.5rem;
    }
    
    .sm\\:flex-row {
        flex-direction: row;
    }
    
    .sm\\:flex {
        display: flex;
    }
}

/* Высококонтрастный режим */
@media (prefers-contrast: high) {
    :root {
        --border: 240 10% 50%;
        --muted-foreground: 240 10% 40%;
    }
}

/* Уменьшенное движение */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Кастомные селекторы WordPress */
.wp-post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid hsl(222, 22%, 18%);
}

.wp-post-navigation a {
    color: hsl(4, 90%, 58%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-post-navigation a:hover {
    color: hsl(4, 90%, 52%);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination a {
    color: hsl(240, 5%, 65%);
}

.pagination a:hover {
    color: hsl(240, 10%, 98%);
    background-color: hsl(222, 22%, 12%);
}

.pagination .current {
    background-color: hsl(4, 90%, 58%);
    color: hsl(240, 10%, 98%);
}

/* Дополнительные утилиты */
.justify-start {
    justify-content: flex-start;
}

.flex-1 {
    flex: 1 1 0%;
}

.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }

.ml-2 { margin-left: 0.5rem; }

.rows-4 {
    grid-template-rows: repeat(4, minmax(0, 1fr));
}

.rows-5 {
    grid-template-rows: repeat(5, minmax(0, 1fr));
}

.resize-none {
    resize: none;
}

/* Дополнительные responsive классы */
@media (min-width: 640px) {
    .sm\\:flex {
        display: flex;
    }
    
    .sm\\:flex-row {
        flex-direction: row;
    }
}

/* Утилитарные классы */
.hidden {
    display: none !important;
}

.show {
    display: block !important;
}

.block {
    display: block !important;
}

.flex {
    display: flex !important;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.space-x-3 > * + * {
    margin-left: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.flex-col {
    flex-direction: column;
}

@media (max-width: 767px) {
    
    /* 1. ИСПРАВЛЕНИЕ КАРТОЧЕК УСЛУГ - текст рядом с иконкой */
    .services-grid > div {
        padding: 2rem 1.5rem !important;
    }
    
    /* Иконка и заголовок в одну строку */
    .services-grid .service-icon-header {
        display: flex !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .services-grid .service-icon {
        flex-shrink: 0 !important;
        margin-bottom: 0 !important;
    }
    
    .services-grid .service-title-container {
        flex: 1 !important;
    }
    
    .services-grid .service-title {
        margin-bottom: 0.5rem !important;
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }
    
    /* 2. КНОПКА "ПОЛУЧИТЬ КОНСУЛЬТАЦИЮ" - больше отступ */
    .services-get-consultation {
        margin-top: 4rem !important;
        padding-top: 2rem !important;
        border-top: 1px solid hsl(222, 22%, 18%) !important;
    }
    
    /* 3. ФОРМА КОНТАКТОВ - больше пространства */
    .contact-form-container .p-8 {
        padding: 2rem !important;
        margin: 0 -0.5rem !important;
    }
    
    /* Поля формы с большими отступами */
    .contact-form-container .space-y-6 > * + * {
        margin-top: 1.5rem !important;
    }
    
    /* Увеличиваем отступы внутри полей */
    .contact-form-container input,
    .contact-form-container textarea {
        padding: 1rem 1.25rem !important;
        font-size: 1rem !important;
    }
    
    /* Кнопка отправки с отступом */
    .contact-form-container button[type="submit"] {
        margin-top: 2rem !important;
        padding: 1rem 2rem !important;
        font-size: 1.1rem !important;
    }
    
    /* Заголовок формы */
    .contact-form-container h3 {
        margin-bottom: 2rem !important;
    }
    
    /* 4. ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ */
    
    /* Увеличиваем отступы между секциями */
    .contact-grid {
        gap: 3rem !important;
    }
    
    /* Карточки контактной информации */
    .contact-info-container .p-6 {
        padding: 1.5rem !important;
    }
    
    /* Описания услуг */
    .services-grid .service-description {
        margin-bottom: 1.5rem !important;
        line-height: 1.6 !important;
    }
    
    /* Список особенностей услуг */
    .services-grid ul {
        margin-bottom: 2rem !important;
    }
    
    .services-grid li {
        margin-bottom: 0.75rem !important;
        line-height: 1.5 !important;
    }
    
    /* Кнопки в карточках услуг */
    .services-grid .scroll-to-contact {
        margin-top: 1.5rem !important;
        padding: 1rem 1.5rem !important;
    }
    
    /* 5. УЛУЧШЕНИЯ ТИПОГРАФИКИ */
    
    /* Заголовки секций */
    .text-4xl.md\\:text-5xl {
        font-size: 2.25rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Подзаголовки секций */
    .text-xl {
        font-size: 1.125rem !important;
        line-height: 1.5 !important;
    }
    
    /* Текст в карточках */
    .services-grid p,
    .contact-info-container p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
}

@media (max-width: 480px) {
    /* Еще более мелкие экраны */
    
    .contact-form-container .p-8 {
        padding: 1.5rem !important;
        margin: 0 !important;
    }
    
    .services-grid > div {
        padding: 1.5rem 1rem !important;
    }
    
    .services-grid .service-title {
        font-size: 1.125rem !important;
    }
}

/* Все типы кнопок */
.btn-hero:hover,
.btn-premium:hover,
.btn-outline:hover,
.btn-xl:hover,
.btn-lg:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
a[class*="btn"]:hover {
    color: inherit !important;
}

/* Кнопки с градиентом */
.gradient-primary:hover,
.bg-primary:hover {
    color: inherit !important;
}

/* Кнопки в формах */
#submit-btn:hover,
#submit-btn-2:hover,
.contact-form button:hover,
form button[type="submit"]:hover {
    color: inherit !important;
}

/* Кнопки в сервисах */
.services-grid a:hover,
.service-card a:hover,
.scroll-to-contact:hover {
    color: inherit !important;
}

/* Кнопки навигации */
.mobile-contact-item:hover,
.desktop-nav a:hover {
    color: inherit !important;
}

/* Общее правило для всех интерактивных элементов */
[role="button"]:hover,
.button:hover,
.btn:hover {
    color: inherit !important;
}

/* Специфичные селекторы из твоих файлов */
.text-primary-foreground:hover {
    color: inherit !important;
}

/* Для групповых hover эффектов */
.group:hover .group-hover\:text-primary,
.group:hover .text-foreground {
    color: inherit !important;
}

/* Альтернативные hover эффекты БЕЗ изменения цвета текста */
.btn-hero:hover,
.btn-premium:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    filter: brightness(1.1) !important;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Для мобильного меню */
@media (max-width: 767px) {
    #mobile-menu a:hover,
    .mobile-contact-item:hover {
        color: inherit !important;
        background-color: rgba(255, 255, 255, 0.05) !important;
    }
}