/* ========================================
   STYLES-ADAPTIVE.CSS V28 ОКОНЧАТЕЛЬНЫЙ
   Contact, Footer, Floating Buttons, Responsive Design
   ======================================== */

/* ========================================
   CONTACT SECTION
   ======================================== */

.contact {
    padding: 100px 0;
    background: var(--primary-black);
    color: var(--pearl-white);
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.contact-info h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.contact-slogan {
    font-size: 1.3rem;
    color: var(--gold);
    font-style: italic;
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
}

.contact-info p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.8;
}

.contact-details {
    display: grid;
    gap: 2rem;
}

.contact-item strong {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    color: var(--gold);
}

.contact-item a {
    color: var(--pearl-white);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--gold);
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 100%;
}

.form-row {
    margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--pearl-white);
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.05);
}

.contact-form select {
    cursor: pointer;
}

.contact-form select option {
    background: var(--primary-black);
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--gold);
    color: var(--primary-black);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--pearl-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.form-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    opacity: 0.6;
    text-align: center;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--soft-black);
    padding: 3rem 0;
    color: var(--pearl-white);
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    width: 100%;
}

.footer-logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    opacity: 0.7;
    font-size: 0.9rem;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--pearl-white);
    text-decoration: none;
    opacity: 0.7;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--gold);
}

.footer-legal {
    text-align: right;
}

.footer-legal p {
    font-size: 0.85rem;
    opacity: 0.5;
}

.social-tags {
    display: none;
}

/* ========================================
   FLOATING BUTTONS - ПО УМОЛЧАНИЮ ВИДНЫ
   ======================================== */

.floating-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 998;
    max-width: 60px;
    animation: slideInRight 0.5s ease;
}

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

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-elevated);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
    text-decoration: none;
}

.floating-btn:hover {
    transform: scale(1.1);
}

.floating-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-black);
    color: var(--pearl-white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.floating-btn:hover::before {
    opacity: 1;
}

.floating-btn::after {
    content: '';
    position: absolute;
    right: 62px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--primary-black);
    opacity: 0;
    transition: opacity 0.3s;
}

.floating-btn:hover::after {
    opacity: 1;
}

.floating-call-btn {
    background: var(--gold);
    color: white;
}

.floating-call-btn:hover {
    background: var(--primary-black);
}

.floating-contact-btn {
    background: var(--primary-black);
    color: var(--pearl-white);
}

.floating-contact-btn:hover {
    background: var(--gold);
}

.floating-telegram-btn {
    background: #0088cc;
    color: white;
}

.floating-telegram-btn:hover {
    background: #0077b3;
}

.floating-maks-btn {
    background: #FF6B35;
    color: white;
}

.floating-maks-btn:hover {
    background: #E85D2A;
}

.floating-max-btn {
    background: #4A90E2;
    color: white;
}

.floating-max-btn:hover {
    background: #357ABD;
}

.floating-top-btn {
    background: rgba(0, 0, 0, 0.7);
    color: var(--pearl-white);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.floating-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.floating-top-btn:hover {
    background: var(--gold);
}

/* ========================================
   RESPONSIVE DESIGN - ПЛАНШЕТЫ (901-1024px)
   ======================================== */

@media (min-width: 901px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
    }
    
    .timeline-marker {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 100px);
        margin-left: 80px !important;
        text-align: left !important;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .documents-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 🔥 ПЛАНШЕТЫ: только меню, БЕЗ телефона и кнопки */
    .mobile-phone-header {
        display: none !important;
        visibility: hidden !important;
    }

    .nav-menu {
        display: flex !important;
        gap: 1.8rem !important;
    }

    .nav-menu a {
        font-size: 0.9rem !important;
    }

    /* ❌ СКРЫВАЕМ header-contact (телефон + кнопка) на планшетах */
    .header-contact {
        display: none !important;
        visibility: hidden !important;
    }

    .mobile-menu-toggle {
        display: none !important;
    }

    /* Боковые кнопки ВИДНЫ */
    .floating-buttons {
        display: flex !important;
    }

    .container {
        padding: 0 1.5rem;
    }
}

/* ========================================
   RESPONSIVE DESIGN - ДЕСКТОП (от 1025px)
   ======================================== */

@media (min-width: 1025px) and (max-width: 1180px) {
    /* 🔥 КОМПАКТНЫЙ ДЕСКТОП 1025-1180px: все элементы, но компактно */
    .mobile-phone-header {
        display: none !important;
        visibility: hidden !important;
    }

    .nav-menu {
        display: flex !important;
        gap: 1.5rem !important; /* Компактный gap */
    }

    .nav-menu a {
        font-size: 0.85rem !important; /* Меньше шрифт */
    }

    .header-contact {
        display: flex !important;
        visibility: visible !important;
        gap: 0.8rem !important; /* Компактный gap */
    }

    .phone-number {
        font-size: 0.85rem !important;
        white-space: nowrap !important;
    }

    .consultation-btn {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.8rem !important;
    }

    .mobile-menu-toggle {
        display: none !important;
    }

    .floating-buttons {
        display: flex !important;
    }

    .container {
        padding: 0 1.2rem;
    }

    .header-content {
        padding: 1.2rem 0 !important;
    }
}

@media (min-width: 1181px) {
    /* 🔥 ПОЛНЫЙ ДЕСКТОП от 1181px: все элементы стандартного размера */
    .mobile-phone-header {
        display: none !important;
        visibility: hidden !important;
    }

    .nav-menu {
        display: flex !important;
    }

    .header-contact {
        display: flex !important;
        visibility: visible !important;
    }

    .mobile-menu-toggle {
        display: none !important;
    }

    .floating-buttons {
        display: flex !important;
    }
}

/* ========================================
   RESPONSIVE DESIGN - МОБИЛЬНЫЕ И МАЛЫЕ ПЛАНШЕТЫ (до 900px)
   ======================================== */

@media (max-width: 900px) {
    .container {
        padding: 0 1rem;
    }
    
    /* ❌ СКРЫВАЕМ ДЕСКТОПНОЕ МЕНЮ */
    .nav-menu {
        display: none !important;
        visibility: hidden !important;
    }

    /* ❌ СКРЫВАЕМ ДЕСКТОПНЫЕ КОНТАКТЫ */
    .header-contact {
        display: none !important;
        visibility: hidden !important;
    }

    /* ✅ ПОКАЗЫВАЕМ ГАМБУРГЕР */
    .mobile-menu-toggle {
        display: flex !important;
    }

    /* 🔥 ИЗМЕНЯЕМ LAYOUT HEADER - 3 КОЛОНКИ: лого | телефон | гамбургер */
    .header-content {
        display: grid !important;
        grid-template-columns: auto 1fr auto !important;
        gap: 0.5rem !important;
        align-items: center !important;
        padding: 1rem 0 !important;
    }

    /* Лого - слева (колонка 1) */
    .logo {
        grid-column: 1 !important;
        justify-self: start !important;
        gap: 0.5rem;
    }

    .logo-img {
        height: 40px;
    }

    .logo-text {
        display: none !important;
    }

    /* 🔥 ТЕЛЕФОН - ЦЕНТР (колонка 2) */
    .mobile-phone-header {
        display: flex !important;
        visibility: visible !important;
        grid-column: 2 !important;
        justify-self: center !important;
        align-items: center !important;
        gap: 0.5rem !important;
        color: var(--gold) !important;
        text-decoration: none !important;
        font-size: 1.4rem !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .mobile-phone-header:hover {
        color: var(--primary-black) !important;
    }

    .mobile-phone-header svg {
        width: 26px !important;
        height: 26px !important;
        flex-shrink: 0 !important;
    }

    /* Гамбургер - справа (колонка 3) */
    .mobile-menu-toggle {
        grid-column: 3 !important;
        justify-self: end !important;
        margin-left: 0 !important;
    }

    /* 🔥 СКРЫВАЕМ ВСЕ БОКОВЫЕ КНОПКИ на мобильных */
    .floating-buttons {
        display: none !important;
        visibility: hidden !important;
    }

    /* 🔥 ИСПРАВЛЕНИЕ TIMELINE для мобильных */
    .timeline {
        position: relative;
        padding-left: 0 !important;
    }

    .timeline::before {
        display: none !important; /* Убираем вертикальную линию */
    }

    .timeline-item {
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 2rem !important;
        padding: 1.5rem !important;
        background: white !important;
        border-radius: 8px !important;
        position: relative !important;
    }

    .timeline-marker {
        position: absolute !important;
        top: 1rem !important;
        right: 1rem !important;
        left: auto !important;
        width: 50px !important;
        height: 50px !important;
        margin: 0 !important;
        transform: none !important;
    }

    .timeline-content {
        width: 100% !important;
        margin: 0 !important;
        padding-right: 60px !important; /* Место для номера */
        text-align: left !important;
    }

    .timeline-content h3 {
        font-size: 1.3rem !important;
        margin-bottom: 0.8rem !important;
    }

    .timeline-content p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-slogan {
        font-size: 1.1rem;
    }

    .article-preview {
        padding: 2rem 1.5rem;
    }

    .key-points {
        grid-template-columns: 1fr;
    }

    .guarantee-banner {
        padding: 1.5rem 1rem;
    }

    .guarantee-banner h3 {
        font-size: 1.4rem;
    }

    #notificationContainer {
        top: 90px;
        right: 10px;
        left: 10px;
        max-width: none;
        width: auto;
    }

    .notification {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .notification-title {
        font-size: 1rem;
    }

    .notification-message {
        font-size: 0.85rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .primary-btn,
    .secondary-btn {
        width: 100%;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        max-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-form {
        max-width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-legal {
        text-align: center;
    }

    .expert-credentials {
        flex-direction: column;
    }

    .documents-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .document-item img {
        height: 150px;
    }

    .modal-close {
        top: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
    }

    section {
        max-width: 100%;
        overflow-x: hidden;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        max-width: 100%;
    }
}

/* ========================================
   RESPONSIVE DESIGN - SMALL MOBILE
   ======================================== */

@media (max-width: 480px) {
    .hero-badge {
        font-size: 0.7rem;
        padding: 0.4rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    /* Меньше телефон для маленьких экранов */
    .mobile-phone-header {
        font-size: 1.2rem !important;
    }

    .mobile-phone-header svg {
        width: 24px !important;
        height: 24px !important;
    }

    #notificationContainer {
        top: 80px;
        right: 5px;
        left: 5px;
        max-width: none;
        width: auto;
    }

    .notification {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .notification-title {
        font-size: 0.95rem;
    }

    .notification-message {
        font-size: 0.8rem;
    }

    .container {
        padding: 0 0.75rem;
        max-width: 100%;
    }

    .hero-content,
    .section-header,
    .article-container {
        max-width: 100%;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    img,
    video {
        max-width: 100%;
        height: auto;
    }
}

/* ========================================
   RESPONSIVE DESIGN - EXTRA SMALL (≤360px)
   ======================================== */

@media (max-width: 360px) {
    /* Компактный размер телефона в header */
    .mobile-phone-header {
        font-size: 1.1rem !important;
    }

    .mobile-phone-header svg {
        width: 22px !important;
        height: 22px !important;
    }

    /* Уменьшаем заголовки секций */
    .section-title {
        font-size: 1.8rem !important;
    }

    .section-subtitle {
        font-size: 0.9rem !important;
    }

    /* Компактные карточки услуг */
    .service-card {
        padding: 1.2rem !important;
    }

    .service-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.6rem !important;
    }

    .service-card p {
        font-size: 0.85rem !important;
    }

    .service-icon {
        width: 40px !important;
        height: 40px !important;
        margin-bottom: 0.8rem !important;
    }

    .service-icon svg {
        width: 36px !important;
        height: 36px !important;
    }

    .service-meta {
        font-size: 0.8rem !important;
    }

    /* Компактный timeline */
    .timeline-item {
        padding: 1.2rem !important;
    }

    .timeline-marker {
        width: 45px !important;
        height: 45px !important;
        font-size: 1rem !important;
        top: 0.8rem !important;
        right: 0.8rem !important;
    }

    .timeline-content {
        padding-right: 55px !important;
    }

    .timeline-content h3 {
        font-size: 1.1rem !important;
    }

    .timeline-content p {
        font-size: 0.85rem !important;
    }

    /* Уведомления */
    #notificationContainer {
        top: 75px;
        right: 3px;
        left: 3px;
    }

    .notification {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .notification-title {
        font-size: 0.9rem;
    }

    .notification-message {
        font-size: 0.75rem;
    }

    /* Компактный контейнер */
    .container {
        padding: 0 0.5rem;
    }

    /* Компактные кнопки hero */
    .primary-btn,
    .secondary-btn {
        padding: 0.9rem 1.5rem !important;
        font-size: 0.9rem !important;
    }

    /* Компактные статистики */
    .stat-number {
        font-size: 2rem !important;
    }

    .stat-text {
        font-size: 0.8rem !important;
    }
}

/* ========================================
   BROWSER SUPPORT
   ======================================== */

@supports not (backdrop-filter: blur(20px)) {
    header {
        background: rgba(255, 255, 255, 0.98);
    }
    
    .contact-form {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    header,
    .floating-call-btn,
    .hero-cta,
    .contact {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    .container {
        max-width: 100%;
    }
}