/* VPN Rate Homepage Styles - Полная адаптивность */

/* CSS Variables */
:root {
    /* Цвета */
    --primary-color: #ff6b35;
    --primary-dark: #e55a2b;
    --primary-light: #ff8c5a;
    --secondary-color: #2563eb;
    --accent-color: #10b981;
    --accent-dark: #059669;
    
    /* Текст */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    /* Фон */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-light: #f3f4f6;
    --surface-color: #ffffff;
    
    /* Границы */
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    /* Тени */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Радиусы */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    
    /* Переходы */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    font-size: 16px;
}

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

/* Header */
.header {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo__text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo__accent {
    color: var(--primary-color);
}

.nav {
    display: flex;
    align-items: center;
}

.nav__list {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav__link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav__link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
}

.mobile-toggle span {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero__title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero__subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat__number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat__label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Sections */
.rating-section,
.articles-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* VPN Table */
.vpn-table {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.vpn-row {
    display: grid;
    grid-template-columns: 60px 1fr 200px 120px 100px 80px 120px;
    gap: 1rem;
    padding: 1.5rem;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.vpn-row:last-child {
    border-bottom: none;
}

.vpn-row--header {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.vpn-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
}

.vpn-provider {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vpn-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    flex-shrink: 0;
}

.vpn-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.vpn-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-light);
    color: var(--text-secondary);
}

.feature-badge--active {
    background: var(--accent-color);
    color: white;
}

.vpn-rating {
    text-align: center;
}

.rating-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.rating-stars {
    font-size: 0.8rem;
}

.vpn-price {
    text-align: center;
}

.price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.price-period {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.vpn-trial {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn--primary {
    background: var(--primary-color);
    color: white;
}

.btn--primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background: var(--surface-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Адаптивность для articles-grid */
@media (min-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

@media (max-width: 1199px) and (min-width: 769px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

.article-card {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.article-category {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-title {
    margin-bottom: 1rem;
}

.article-title a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
}

.footer__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer__brand .logo__text {
    color: white;
    margin-bottom: 1rem;
}

.footer__description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer__column h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer__list {
    list-style: none;
}

.footer__list li {
    margin-bottom: 0.5rem;
}

.footer__list a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer__list a:hover {
    color: var(--primary-color);
}

.footer__bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* АДАПТИВНЫЕ СТИЛИ */

/* Улучшенная типографика для разных экранов */
@media (min-width: 1200px) {
    .section-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .section-subtitle {
        font-size: 1.25rem;
        line-height: 1.5;
    }
    
    .hero__title {
        font-size: 3.5rem;
        line-height: 1.1;
    }
    
    .hero__subtitle {
        font-size: 1.375rem;
        line-height: 1.4;
    }
    
    .article-title a {
        font-size: 1.375rem;
        line-height: 1.3;
    }
    
    .article-excerpt {
        font-size: 1.125rem;
        line-height: 1.6;
    }
}

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        padding: 0 20px;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero__title {
        font-size: 2.75rem;
        line-height: 1.2;
    }
    
    .hero__subtitle {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }
    
    .hero__stats {
        gap: 2.5rem;
        margin-top: 2rem;
    }
    
    .stat__number {
        font-size: 2rem;
    }
    
    .stat__label {
        font-size: 0.875rem;
    }
    
    /* VPN Table для планшетов */
    .vpn-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .vpn-row {
        grid-template-columns: 40px 1fr 140px 90px 70px 60px 90px;
        gap: 0.75rem;
        padding: 1rem;
        min-width: 700px;
    }
    
    .vpn-logo {
        width: 35px;
        height: 35px;
    }
    
    .vpn-name {
        font-size: 0.9375rem;
    }
    
    .feature-badge {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }
    
    .rating-number {
        font-size: 1.125rem;
    }
    
    .price-current {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    /* Sections для планшетов */
    .rating-section,
    .articles-section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }
    
    .section-subtitle {
        font-size: 1.125rem;
        margin-bottom: 2.5rem;
    }
    
    /* Articles Grid для планшетов */
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .article-card {
        padding: 1.25rem;
    }
    
    .article-title a {
        font-size: 1.125rem;
        line-height: 1.4;
    }
    
    .article-excerpt {
        font-size: 0.9375rem;
        line-height: 1.5;
    }
    
    /* Footer для планшетов */
    .footer__content {
        gap: 3rem;
    }
    
    .footer__links {
        gap: 2rem;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    /* Header Mobile */
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface-color);
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        padding: 1rem;
        z-index: 1001;
    }
    
    .nav.nav--active {
        display: block;
    }
    
    .nav__list {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .nav__link {
        padding: 0.75rem 1rem;
        border-radius: var(--border-radius);
        text-align: left;
        width: 100%;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .header__content {
        position: relative;
    }
    
    .logo__text {
        font-size: 20px;
    }
    
    /* Hero Mobile */
    .hero {
        padding: 2rem 0;
    }
    
    .hero__title {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .hero__subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero__stats {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .stat__number {
        font-size: 1.5rem;
    }
    
    /* Sections Mobile */
    .rating-section,
    .articles-section {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
        line-height: 1.25;
        letter-spacing: -0.02em;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.5;
    }
    
    /* VPN Table Mobile - Карточки вместо таблицы */
    .vpn-table {
        display: block;
    }
    
    .vpn-row {
        display: block;
        margin-bottom: 1rem;
        padding: 1.25rem;
        border-radius: var(--border-radius-large);
        border: 1px solid var(--border-color);
        background: var(--surface-color);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
        position: relative;
    }
    
    .vpn-row:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
    }
    
    .vpn-row--header {
        display: none;
    }
    
    .vpn-rank {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: var(--primary-color);
        color: white;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        font-size: 0.875rem;
    }
    
    .vpn-provider {
        margin-bottom: 1.25rem;
        justify-content: flex-start;
        padding-right: 50px;
    }
    
    .vpn-logo {
        width: 60px;
        height: 60px;
        border-radius: var(--border-radius);
    }
    
    .vpn-name {
        font-size: 1.375rem;
        font-weight: 600;
        margin-bottom: 0.25rem;
    }
    
    .vpn-features {
        margin-bottom: 1.25rem;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .feature-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .vpn-rating {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1.25rem;
        text-align: left;
        background: var(--bg-light);
        padding: 0.75rem;
        border-radius: var(--border-radius);
    }
    
    .rating-number {
        font-size: 1.5rem;
        font-weight: bold;
        color: var(--primary-color);
    }
    
    .rating-stars {
        font-size: 1rem;
    }
    
    .vpn-price {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1.25rem;
        text-align: left;
        background: var(--success-light);
        padding: 0.75rem;
        border-radius: var(--border-radius);
    }
    
    .price-current {
        font-size: 1.5rem;
        font-weight: bold;
        color: var(--success-color);
    }
    
    .price-period {
        font-size: 0.875rem;
        color: var(--text-secondary);
    }
    
    .vpn-trial {
        text-align: center;
        margin-bottom: 1.25rem;
        background: var(--warning-light);
        padding: 0.5rem;
        border-radius: var(--border-radius);
        font-size: 0.875rem;
        font-weight: 500;
    }
    
    .vpn-trial::before {
        content: '🎁 Гарантия: ';
        font-weight: bold;
    }
    
    .vpn-action {
        text-align: center;
    }
    
    .btn {
        width: 100%;
        padding: 1rem 1.25rem;
        font-size: 1.125rem;
        font-weight: 600;
        border-radius: var(--border-radius-large);
    }
    
    /* Articles Mobile */
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-card {
        padding: 1.25rem;
        border-radius: var(--border-radius);
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .article-category {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .article-title {
        margin-bottom: 1.25rem;
    }
    
    .article-title a {
        font-size: 1.125rem;
        line-height: 1.4;
    }
    
    .article-excerpt {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
        line-height: 1.5;
    }
    
    .read-more {
        font-size: 0.9rem;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer__content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer__links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero__title {
        font-size: 1.75rem;
        line-height: 1.2;
        letter-spacing: -0.015em;
    }
    
    .hero__subtitle {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    .section-title {
        font-size: 1.5rem;
        line-height: 1.25;
        letter-spacing: -0.02em;
    }
    
    .section-subtitle {
        font-size: 0.8125rem;
        line-height: 1.5;
    }
    
    .article-title a {
        font-size: 1.125rem;
        line-height: 1.3;
        letter-spacing: -0.01em;
    }
    
    .article-excerpt {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .vpn-row {
        padding: 1rem;
        margin-bottom: 0.875rem;
    }
    
    .vpn-rank {
        width: 25px;
        height: 25px;
        font-size: 0.75rem;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .vpn-provider {
        padding-right: 35px;
        margin-bottom: 1rem;
    }
    
    .vpn-logo {
        width: 45px;
        height: 45px;
    }
    
    .vpn-name {
        font-size: 1.125rem;
    }
    
    .vpn-features {
        margin-bottom: 1rem;
    }
    
    .feature-badge {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }
    
    .vpn-rating {
        padding: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .rating-number {
        font-size: 1.25rem;
    }
    
    .rating-stars {
        font-size: 0.875rem;
    }
    
    .vpn-price {
        padding: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .price-current {
        font-size: 1.25rem;
    }
    
    .vpn-trial {
        margin-bottom: 1rem;
        font-size: 0.8125rem;
    }
    
    .btn {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .article-card {
        padding: 0.875rem;
    }
    
    .article-meta {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .article-category {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }
    
    .article-title {
        margin-bottom: 1rem;
    }
    
    .article-title a {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .article-excerpt {
        font-size: 0.8125rem;
        margin-bottom: 1rem;
        line-height: 1.4;
    }
    
    .read-more {
        font-size: 0.8125rem;
    }
}

/* Медиа-запросы для экстремально маленьких экранов */
@media (max-width: 360px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .vpn-row {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .vpn-rank {
        width: 22px;
        height: 22px;
        font-size: 0.6875rem;
    }
    
    .vpn-provider {
        padding-right: 30px;
    }
    
    .vpn-logo {
        width: 40px;
        height: 40px;
    }
    
    .vpn-name {
        font-size: 1rem;
    }
    
    .feature-badge {
        font-size: 0.625rem;
        padding: 0.1875rem 0.375rem;
    }
    
    .rating-number {
        font-size: 1.125rem;
    }
    
    .price-current {
        font-size: 1.125rem;
    }
    
    .btn {
        padding: 0.75rem;
        font-size: 0.9375rem;
    }
}

/* Очень большие экраны (от 1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero__title {
        font-size: 3.5rem;
    }
    
    .hero__subtitle {
        font-size: 1.375rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .vpn-row {
        grid-template-columns: 80px 1fr 250px 140px 120px 100px 140px;
        gap: 1.5rem;
        padding: 2rem;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* Улучшения для доступности */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Темная тема (если поддерживается) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-muted: #9ca3af;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-light: #374151;
        --surface-color: #1f2937;
        --border-color: #374151;
        --border-light: #4b5563;
    }
    
    .vpn-row--header {
        background: var(--bg-light);
    }
    
    .feature-badge {
        background: var(--bg-light);
        color: var(--text-secondary);
    }
}