/* Common styles for all pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
}

.logo-icon {
    transition: all 0.3s ease;
}

.logo:hover .logo-icon {
    transform: scale(1.1) rotate(10deg);
}

.logo-text {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    transition: width 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: #ffffff;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 30px;
    height: 24px;
    justify-content: space-between;
    z-index: 1001;
}

.burger-line {
    width: 100%;
    height: 3px;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(12, 12, 12, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
    z-index: 999;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 1rem 2rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding: 4rem 0;
}

.page-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInDown 1s ease-out;
}

/* Search and Filters - Common Styles */
.search-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: #ffffff;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-btn {
    padding: 15px 30px;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    border: none;
    border-radius: 15px;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 107, 107, 0.4);
}

.search-btn.clear-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-btn.clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.filters-section {
    margin-top: 1.5rem;
}

.filters-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 20px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    font-weight: 600;
}

.filters-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.filters-toggle i:last-child {
    transition: transform 0.3s ease;
}

.filters-toggle.active i:last-child {
    transform: rotate(180deg);
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 1;
    padding: 0;
}

.filters.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    color: #cccccc;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-select, .filter-input {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.filter-select:focus, .filter-input:focus {
    outline: none;
    border-color: #ff6b6b;
}

.filter-select option {
    background: #1a1a1a;
    color: #ffffff;
}

.filter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Common Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Common Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Desktop specific styles */
@media (min-width: 769px) {
    .filters-toggle {
        display: none; /* Hide toggle button on desktop */
    }
    
    .filters {
        max-height: none; /* Remove height limit on desktop */
        opacity: 1; /* Always visible on desktop */
        padding: 1rem 0;
    }
    
    .filters.collapsed {
        max-height: none;
        opacity: 1;
        padding: 1rem 0;
    }
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    .page-title {
        font-size: 2rem;
        padding: 0 10px;
        line-height: 1.2;
    }

    .container {
        padding: 0 15px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .header-content {
        padding: 0.75rem 0;
    }

    .main-content {
        margin-top: 70px;
        padding: 1rem 0;
    }

    /* Search section mobile fixes */
    .search-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }

    .search-container {
        flex-direction: column;
        gap: 1rem;
    }

    .search-input {
        min-width: unset;
        width: 100%;
        padding: 12px 16px;
        font-size: 1rem;
    }

    .search-btn {
        padding: 12px 20px;
        font-size: 1rem;
        justify-content: center;
    }

    .search-btn.clear-btn {
        margin-top: 0;
    }

    /* Filters mobile optimization */
    .filters-section {
        margin-top: 1rem;
    }

    .filters-toggle {
        display: flex; /* Show toggle button on mobile */
        width: 100%;
        justify-content: center;
    }

    .filters {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 0;
    }

    .filters.collapsed {
        max-height: 0;
        opacity: 0;
        padding: 0;
    }

    .filter-group {
        gap: 0.75rem;
    }

    .filter-select, .filter-input {
        padding: 12px 16px;
        font-size: 1rem;
    }

    /* Modal mobile fixes */
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
        border-radius: 15px;
    }

    .modal-header {
        padding: 1rem;
        flex-direction: row;
        align-items: center;
    }

    .modal-title {
        font-size: 1.2rem;
        flex-grow: 1;
    }

    .close-btn {
        font-size: 1.5rem;
        padding: 5px;
        min-width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Text improvements for mobile */
    .page-subtitle {
        font-size: 1rem;
        padding: 0 10px;
        margin-bottom: 1.5rem;
    }

    /* Button improvements */
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        min-height: 44px; /* iOS рекомендуемый размер для touch */
    }

    /* Form elements */
    input, select, textarea {
        font-size: 16px !important; /* Предотвращаем зум на iOS */
    }
}

/* Additional mobile styles for very small screens */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .logo-text {
        font-size: 1rem;
    }

    .search-section {
        padding: 0.75rem;
    }

    .filters {
        padding: 0.75rem;
    }
} 