/**
 * Main Stylesheet
 * czinios.com - Classifieds Portal
 */

/* CSS Variables */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #dfe6e9;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--light-bg);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

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

/* Header */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
}

.logo a {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo img {
    height: 40px;
    width: auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.lang-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: var(--light-bg);
    border-radius: 5px;
    font-size: 14px;
    transition: var(--transition);
}

.lang-button:hover {
    background: var(--border-color);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    min-width: 150px;
    display: none;
    z-index: 100;
}

.language-switcher:hover .lang-dropdown {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    transition: var(--transition);
}

.lang-option:hover {
    background: var(--light-bg);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.btn-secondary:hover {
    background: #1a252f;
}

.btn-donate,
.btn-donate-footer {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-donate:hover,
.btn-donate-footer:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 15px 30px;
    font-size: 18px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Search Bar */
.search-bar {
    max-width: 800px;
    margin: 0 auto 40px;
}

.search-form {
    display: flex;
    gap: 10px;
    background: var(--white);
    padding: 10px;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
}

.search-category {
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--white);
    min-width: 200px;
}

.search-form .btn {
    padding: 12px 30px;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Sections */
.categories-section,
.listings-section {
    padding: 60px 0;
}

.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.category-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.listing-count {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.listing-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.listing-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    font-size: 64px;
    opacity: 0.3;
}

.badge-featured {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--warning-color);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

.listing-content {
    padding: 20px;
}

.listing-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.listing-title a {
    color: var(--text-primary);
}

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

.listing-category {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.listing-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.listing-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.listing-location {
    color: var(--text-secondary);
    font-size: 14px;
}

.listing-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--secondary-color), #1a252f);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Footer */
.site-footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3,
.footer-column h4 {
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 15px;
    font-size: 24px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
}

.newsletter-form .btn {
    padding: 10px 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 5px 0;
    opacity: 0.8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    max-width: 600px;
    margin: 50px auto;
    background: var(--white);
    border-radius: 10px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 30px;
    background: none;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-header {
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
}

.modal-body {
    padding: 30px;
}

.donation-options {
    display: grid;
    gap: 15px;
    margin: 30px 0;
}

.donation-button {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: var(--transition);
}

.donation-button:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.donation-icon {
    font-size: 32px;
}

.donation-info {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.donation-info ul {
    list-style: none;
    margin-top: 15px;
}

.donation-info li {
    margin-bottom: 10px;
}

.donation-thanks {
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 20px;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    background: #2980b9;
    transform: translateY(-5px);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 20px;
}

.mt-4 {
    margin-top: 30px;
}

.mb-3 {
    margin-bottom: 20px;
}

.mb-4 {
    margin-bottom: 30px;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    background: var(--white);
    padding: 20px;
    box-shadow: var(--shadow);
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu li {
    margin-bottom: 15px;
}

.mobile-menu a {
    display: block;
    padding: 10px;
    color: var(--text-primary);
    font-weight: 500;
}

.mobile-menu.active {
    display: block;
}
/* Language Switcher Fix */
.language-switcher { position: relative; }
.lang-dropdown { display: none; position: absolute; top: 100%; right: 0; background: white; border: 1px solid #ddd; border-radius: 5px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); min-width: 150px; z-index: 1000; }
.language-switcher:hover .lang-dropdown { display: block; }
.lang-dropdown:hover { display: block; }
.lang-option { display: block; padding: 10px 15px; text-decoration: none; color: #2c3e50; }
.lang-option:hover { background: #f0f0f0; }