/* Simplified Modern CSS for Titan.uz - Clean and Stylish */
/* Only element styling, no root or body updates */

/* Предотвращение горизонтальной прокрутки всей страницы */
html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

* {
    box-sizing: border-box;
}

/* Header/Navbar */
#top-bar {
    background: #f0f4f8 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 3px solid #0066cc;
}

/* Logo */
#top-bar img {
    display: block;
}

/* Slogan */
#top-bar .h3 {
    color: #0066cc;
    font-weight: 600;
    line-height: 1.4;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 12px;
    font-weight: 500;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn:not(.btn-outline-primary) {
    border: none;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline-primary {
    border: 2px solid #0066cc !important;
    color: #0066cc;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary:hover {
    background: #0066cc;
    color: white;
    border-color: #0066cc !important;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Cards */
.card {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    border-radius: 8px 8px 0 0;
    width: 100%;
    height: auto;
    display: block;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: #1a202c;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-text {
    color: #4a5568;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Headings */
h1, h2, h3, .h1, .h2, .h3 {
    color: #1a202c;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1, .h1 {
    color: #0066cc;
}

h2, .h2 {
    color: #0066cc;
}

/* Links */
a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #00a8e8;
    text-decoration: none;
}

.text-muted {
    color: #6c757d;
    line-height: 1.7;
}

.text-muted a {
    text-decoration: none;
}

.text-muted a:hover {
    color: #0066cc;
    text-decoration: none;
}

/* Footer - full width dark background */
footer {
    background: #1a202c;
    color: #e0e0e0;
    border-top: 4px solid #0066cc;
    margin-top: 4rem !important;
    padding-top: 3rem !important;
    padding-bottom: 2rem !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    position: relative;
}

/* Footer content wrapper */
footer .row {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

footer h2 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

footer a {
    color: #d0d0d0;
    transition: color 0.2s ease;
    text-decoration: none;
}

footer a:hover {
    color: #00a8e8;
    text-decoration: none;
}

footer .text-muted {
    color: #b0b0b0 !important;
    line-height: 1.7;
}

footer img {
    display: block;
}

/* Container */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Product Cards */
.card-deck .card {
    margin-bottom: 2rem;
}

/* Phone Links */
.ahreftel {
    font-weight: 600;
    text-decoration: none !important;
}

.ahreftel:hover {
    text-decoration: none !important;
}

/* Navigation */
nav a {
    margin: 0 0.25rem;
    text-decoration: none !important;
}

nav a:hover {
    text-decoration: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    #top-bar {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    h1, h2, h3, .h1, .h2, .h3 {
        font-size: 1.3rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0066cc;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0052a3;
}

/* Selection */
::selection {
    background: #0066cc;
    color: white;
}

/* Focus States */
*:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Images
img {
    display: block;
    max-width: 100%;
    height: auto;
}

Card images - allow centering
.card-header img,
.card-header a {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.card-img-top2 {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
*/


/* Borders */
.border-top {
    border-top: 1px solid rgba(0, 102, 204, 0.1) !important;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Text */
.text-small {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #4a5568;
}

p {
    color: #2c3e50;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Lists */
ul, ol {
    color: #2c3e50;
    line-height: 1.7;
}

li {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}
/*
.list-unstyled li {
    padding: 0.5rem 0;
    color: #2c3e50;
    line-height: 1.7;
}
*/

.list-unstyled li{
    padding: 0;
    margin: 0;
}
.list-unstyled li a {
    text-decoration: none;
}


/* Contact Section */
#contact-bottom {
    background: rgba(0, 102, 204, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

#contact-bottom a {
    text-decoration: none;
}

#contact-bottom a:hover {
    text-decoration: none;
}

/* Remove all underlines */
a, a:visited, a:active, a:focus {
    text-decoration: none !important;
    border-bottom: none !important;
}

a:hover {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* ============================================
   TABLE STYLES - Beautiful and Responsive
   ============================================ */

/* Автоматическое оборачивание таблиц в контейнер для прокрутки */
table {
    display: table;
    width: 100%;
    max-width: 100%;
}

/* Table Container - для горизонтальной прокрутки на мобильных */
/* Автоматически применяется ко всем таблицам через JavaScript или можно обернуть вручную */
.table-wrapper,
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 100%;
    position: relative;
    /* Важно: контейнер не должен выходить за границы страницы */
    box-sizing: border-box;
}

/* Автоматическое оборачивание таблиц для предотвращения прокрутки всей страницы */
/* Если таблица не обернута, создаем виртуальный контейнер через CSS */
@media (max-width: 768px) {
    /* Все таблицы автоматически получают ограничение ширины */
    table {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Родительский контейнер таблицы (если есть) также ограничиваем */
    * > table {
        max-width: 100%;
    }
}

/* Основные стили таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 0.95rem;
    display: table;
    /* На десктопе таблица занимает 100% ширины контейнера */
    min-width: 100%;
    box-sizing: border-box;
}

/* Заголовок таблицы */
table thead {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
}

table thead th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 1rem;
    text-transform: none;
    border: none;
    color: white;
    letter-spacing: 0.3px;
}

table thead th:first-child {
    border-top-left-radius: 8px;
}

table thead th:last-child {
    border-top-right-radius: 8px;
}

/* Тело таблицы */
table tbody {
    background: white;
}

table tbody tr {
    border-bottom: 1px solid #e8e8e8;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

table tbody tr:last-child {
    border-bottom: none;
}

/* Чередующиеся строки */
table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

table tbody tr:nth-child(odd) {
    background-color: white;
}

/* Hover эффект для строк */
table tbody tr:hover {
    background-color: #f0f7ff;
    box-shadow: inset 4px 0 0 #0066cc;
}

/* Ячейки таблицы */
table td {
    padding: 1rem 1.25rem;
    border: none;
    color: #2c3e50;
    line-height: 1.6;
    vertical-align: top;
}

table td:first-child {
    font-weight: 600;
    color: #1a202c;
    width: 25%;
    min-width: 150px;
}

/* Ссылки в таблице */
table a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

table a:hover {
    color: #00a8e8;
    text-decoration: underline;
}

/* Стили для таблиц сравнения (специальные) */
table.comparison-table,
table[class*="comparison"] {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

table.comparison-table thead,
table[class*="comparison"] thead {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
}

/* Мобильная адаптация таблиц */
@media (max-width: 768px) {
    /* Контейнер для прокрутки - ограничивает ширину и создает прокрутку только для таблицы */
    .table-wrapper,
    .table-responsive {
        margin: 1rem 0;
        padding: 0;
        -webkit-overflow-scrolling: touch;
        position: relative;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        /* Важно: контейнер не должен выходить за границы страницы */
        box-sizing: border-box;
    }
    
    /* Подсказка о прокрутке */
    .table-wrapper::after,
    .table-responsive::after {
        content: "← Прокрутите для просмотра →";
        display: block;
        text-align: center;
        padding: 0.5rem;
        color: #6c757d;
        font-size: 0.85rem;
        background: #f8f9fa;
        border-radius: 4px;
        margin-top: 0.5rem;
    }
    
    /* Таблица на мобильных - внутри контейнера */
    /* Таблица может быть шире контейнера, но прокрутка будет только внутри контейнера */
    .table-wrapper table,
    .table-responsive table {
        min-width: 600px; /* Минимальная ширина для горизонтальной прокрутки */
        font-size: 0.9rem;
        margin: 0;
        display: table;
        width: auto;
        /* Таблица может быть шире контейнера - это нормально, прокрутка будет внутри контейнера */
    }
    
    /* Если таблица не обернута в контейнер, применяем ограничения */
    /* Важно: таблица не должна вызывать горизонтальную прокрутку всей страницы */
    table:not(.table-wrapper table):not(.table-responsive table) {
        /* На мобильных без контейнера таблица должна быть адаптивной */
        width: 100%;
        max-width: 100%;
        font-size: 0.9rem;
        display: table;
        /* Ограничиваем ширину, чтобы не вызывать прокрутку страницы */
        box-sizing: border-box;
    }
    
    /* Предотвращаем горизонтальную прокрутку всей страницы */
    body, html {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
    }
    
    /* Контейнер страницы также ограничиваем */
    .container {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Заголовки на мобильных */
    table thead {
        display: table-header-group;
    }
    
    table thead th {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
        display: table-cell;
    }
    
    /* Тело таблицы */
    table tbody {
        display: table-row-group;
    }
    
    table tbody tr {
        display: table-row;
    }
    
    /* Ячейки на мобильных */
    table td {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        display: table-cell;
    }
    
    table td:first-child {
        min-width: 120px;
        font-size: 0.85rem;
    }
    
    /* Альтернативный вариант: карточки на очень маленьких экранах */
    @media (max-width: 480px) {
        .table-wrapper,
        .table-responsive {
            overflow-x: auto;
        }
        
        .table-wrapper table,
        .table-responsive table {
            min-width: 500px;
        }
        
        table thead th,
        table td {
            padding: 0.6rem 0.8rem;
            font-size: 0.85rem;
        }
    }
}

/* Стили для таблиц с данными (мощность, площадь и т.д.) */
table.data-table {
    border: 1px solid #e0e0e0;
}

table.data-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #0066cc;
}

table.data-table thead th {
    color: #1a202c;
    background: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #0066cc;
}

table.data-table tbody tr:hover {
    background-color: #f0f7ff;
}

/* Стили для таблиц с числовыми данными */
table.data-table td {
    text-align: left;
}

table.data-table td:not(:first-child) {
    text-align: left;
    color: #4a5568;
}

/* Улучшенные стили для таблиц сравнения */
table tbody tr:first-child td {
    padding-top: 1.25rem;
}

table tbody tr:last-child td {
    padding-bottom: 1.25rem;
}

/* Выделение важных ячеек */
table td strong {
    color: #1a202c;
    font-weight: 600;
}

/* Стили для вложенных списков в таблицах */
table td ul,
table td ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

table td li {
    margin-bottom: 0.3rem;
    line-height: 1.5;
}

/* Улучшенная читаемость на мобильных */
@media (max-width: 768px) {
    table td ul,
    table td ol {
        padding-left: 1.2rem;
        font-size: 0.85rem;
    }
}
