* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    /* Ensure body doesn't interfere with fixed elements */
    position: relative;
}

/* Greek font support */
body.lang-el {
    font-family: 'Noto Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    /* Ensure container doesn't interfere with fixed elements */
    position: relative;
    z-index: 1;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.language-label {
    font-weight: 500;
    color: #555;
    margin-right: 10px;
}

.language-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-radius: 25px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
}

.language-btn:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1976d2;
    transform: translateY(-1px);
}

.language-btn.active {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border-color: #2196f3;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.header {
    text-align: center;
    margin-bottom: 30px;
    background: white;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.address {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-top: 10px;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    justify-content: center;
}

.category-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 50px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-btn.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-color: #3498db;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.category-btn.active:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-3px) scale(1.05);
}

.advertisements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.advertisement {
    background: white;
    border-radius: 16px;
    padding: 10px 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 6px solid;
    position: relative;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
}

.advertisement::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, rgba(52, 152, 219, 0.3) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.advertisement:hover::before {
    transform: translateX(100%);
}

.advertisement:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Color variants with enhanced gradients */
.white-ad {
    border-left-color: #bdc3c7;
}

.yellow-ad {
    border-left-color: #f39c12;
    background: linear-gradient(135deg, #fff 0%, #fffbf0 50%, #fff9f0 100%);
}

.yellow-ad:hover {
    background: linear-gradient(135deg, #fffbf0 0%, #fff6e1 50%, #fff9f0 100%);
}

.green-ad {
    border-left-color: #27ae60;
    background: linear-gradient(135deg, #fff 0%, #f8fff8 50%, #f0fff4 100%);
}

.green-ad:hover {
    background: linear-gradient(135deg, #f8fff8 0%, #f0fff0 50%, #f0fff4 100%);
}

.red-ad {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #fff 0%, #fffafa 50%, #fef5f5 100%);
}

.red-ad:hover {
    background: linear-gradient(135deg, #fffafa 0%, #fef0f0 50%, #fef5f5 100%);
}

.ad-header {
    /*display: flex;*/
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.ad-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    flex: 1;
    margin-right: 15px;
}

.ad-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    /*justify-content: flex-end;*/
    gap: 10px;
}

.ad-date {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
    background: linear-gradient(135deg, #f8f9fa, #ecf0f1);
    padding: 6px 14px;
    border-radius: 25px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ad-language {
    font-size: 0.8rem;
    color: #fff;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.ad-image {
    margin: 15px -25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ad-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ad-image:hover img {
    transform: scale(1.08);
}

.ad-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 5px;
    word-wrap: break-word;
}

.ad-category {
    display: inline-block;
    background: linear-gradient(135deg, #ecf0f1, #d5dbdb);
    color: #2c3e50;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.ad-category:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.ad-priority {
    display: inline-block;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.no-ads {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.5s ease-in-out;
}

.no-ads p {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 500;
}

.footer {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.footer-links {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-links a:hover {
    color: #2980b9;
}

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

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

/* Плавная анимация загрузки */
.advertisement {
    animation: fadeIn 0.6s ease-out backwards;
}

.advertisement:nth-child(1) { animation-delay: 0.1s; }
.advertisement:nth-child(2) { animation-delay: 0.2s; }
.advertisement:nth-child(3) { animation-delay: 0.3s; }
.advertisement:nth-child(4) { animation-delay: 0.4s; }
.advertisement:nth-child(5) { animation-delay: 0.5s; }
.advertisement:nth-child(6) { animation-delay: 0.6s; }

/* RTL support for languages that need it */
.lang-ar, .lang-he {
    direction: rtl;
}

/* Greek language specific adjustments */
.lang-el .ad-header h3,
.lang-el .ad-content {
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .language-switcher {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 12px 15px;
    }
    
    .language-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
        min-width: 70px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .advertisements-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-filter {
        justify-content: flex-start;
        overflow-x: auto;
        /*padding-bottom: 10px;*/
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .category-filter::-webkit-scrollbar {
        display: none;
    }
    
    .category-btn {
        flex-shrink: 0;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .ad-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .ad-header h3 {
        margin-right: 0;
    }
    
    .ad-meta {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed !important;
    bottom: 0;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999 !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid #3498db;
    /* Prevent any inheritance issues */
    display: none;
    box-sizing: border-box;
    /* iOS Safari fixes */
    -webkit-overflow-scrolling: touch;
    /* Ensure banner stays fixed on iOS */
    @supports (-webkit-touch-callout: none) {
        position: -webkit-sticky;
        position: fixed !important;
    }
}

.cookie-banner.show {
    transform: translateY(0) !important;
    -webkit-transform: translateY(0) !important;
    -moz-transform: translateY(0) !important;
    -ms-transform: translateY(0) !important;
    -o-transform: translateY(0) !important;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    min-width: 280px;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.cookie-btn-decline {
    background: transparent;
    color: #bdc3c7;
    border: 2px solid #7f8c8d;
}

.cookie-btn-decline:hover {
    background: #7f8c8d;
    color: white;
    transform: translateY(-2px);
}

.cookie-btn-learn {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
    font-size: 0.85rem;
    padding: 8px 16px;
    min-width: auto;
}

.cookie-btn-learn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* Cookie Modal */
.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.cookie-modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-content h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.cookie-category {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category h3 {
    color: #34495e;
    font-size: 1.2rem;
    margin: 0;
}

.cookie-required {
    background: #e74c3c;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: #27ae60;
}

.cookie-switch input:focus + .cookie-slider {
    box-shadow: 0 0 1px #27ae60;
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(26px);
}

.cookie-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 16px 24px;
    border-radius: 25px;
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
    font-weight: 500;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1002;
}

.notification.show {
    transform: translateX(0);
}

/* Cookie Banner Responsive */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 15px !important;
        /* Extra insurance for mobile positioning */
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        /* Ensure it's not affected by viewport issues on mobile */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .cookie-banner-text {
        text-align: center;
        font-size: 0.9rem;
        min-width: auto;
    }
    
    .cookie-banner-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 120px;
        padding: 12px 16px;
    }
    
    .cookie-btn-learn {
        flex: 0 0 auto;
        min-width: 100px;
    }
} 