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

html {
    direction: rtl;
    text-align: right;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    direction: rtl;
}

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

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    padding: 1rem 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2c5aa0;
    font-weight: bold;
    font-size: 1.2rem;
}

.nav-logo img {
    width: 40px;
    height: 40px;
    margin-left: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #2c5aa0;
}

/* Main Content */
.main {
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #1e3f73;
    transform: translateY(-2px);
}

/* Page Header */
.page-header {
    background: #f8f9fa;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.1rem;
    color: #666;
}

/* Sections */
.popular-comparisons,
.features,
.comparison-directory,
.content,
.contact-section {
    padding: 4rem 0;
}

.popular-comparisons h2,
.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #2c5aa0;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.comparison-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.comparison-card img {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.comparison-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2c5aa0;
}

.comparison-card .category {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.comparison-card p {
    color: #666;
    line-height: 1.5;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
}

.feature h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
}

/* Values Grid */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.value {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

.value h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box input,
.category-filter select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    min-width: 250px;
}

.search-box input:focus,
.category-filter select:focus {
    outline: none;
    border-color: #2c5aa0;
}

/* Comparison Detail */
.comparison-detail {
    padding: 2rem 0;
}

.comparison-header {
    text-align: center;
    margin-bottom: 3rem;
}

.comparison-header img {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.comparison-header h1 {
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.comparison-content {
    max-width: 800px;
    margin: 0 auto;
}

.comparison-section {
    background: white;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.comparison-section h2 {
    color: #2c5aa0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.comparison-section ul {
    list-style-type: none;
    padding-right: 0;
}

.comparison-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.comparison-section li:before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    margin-left: 10px;
}

.pros li:before {
    content: "✓";
    color: #28a745;
}

.cons li:before {
    content: "✗";
    color: #dc3545;
}

.external-links {
    margin-top: 2rem;
    text-align: center;
}

.external-links a {
    display: inline-block;
    margin: 0.5rem;
    padding: 10px 20px;
    background: #2c5aa0;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.external-links a:hover {
    background: #1e3f73;
}

/* Contact Form */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h3 {
    color: #2c5aa0;
    margin-bottom: 0.5rem;
}

.contact-item a {
    color: #2c5aa0;
    text-decoration: none;
}

.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.checkbox-label input {
    width: auto;
    margin-left: 0.5rem;
}

.form-message {
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* FAQ */
.contact-faq {
    margin-top: 3rem;
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.faq-item h3 {
    color: #2c5aa0;
    margin-bottom: 0.5rem;
}

/* Legal Content */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.legal-content h2 {
    color: #2c5aa0;
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.legal-content h3 {
    color: #495057;
    margin: 1.5rem 0 0.5rem 0;
}

.legal-content ul {
    margin: 1rem 0 1rem 2rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.important-notice,
.disclaimer-box,
.final-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.important-notice h2,
.disclaimer-box h3,
.final-notice h2 {
    color: #856404;
    margin-top: 0;
    border: none;
    padding: 0;
}

/* About Content */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.about-content h2 {
    color: #2c5aa0;
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.about-content ul {
    margin: 1rem 0 1rem 2rem;
}

/* Methodology Content */
.methodology-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.methodology-content h2 {
    color: #2c5aa0;
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.methodology-content h3 {
    color: #495057;
    margin: 1.5rem 0 0.5rem 0;
}

.methodology-content ul,
.methodology-content ol {
    margin: 1rem 0 1rem 2rem;
}

.methodology-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem 0;
    margin-top: 4rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 1rem;
    z-index: 10000;
    display: none;
}

.cookie-banner.show {
    display: block;
}

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

.cookie-accept {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
}

.cookie-accept:hover {
    background: #2980b9;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Not Found */
.not-found {
    text-align: center;
    padding: 4rem 0;
}

.not-found h1 {
    color: #2c5aa0;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column;
    }

    .search-box input,
    .category-filter select {
        min-width: 100%;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .container {
        padding: 0 15px;
    }

    .popular-comparisons,
    .features,
    .comparison-directory,
    .content,
    .contact-section {
        padding: 2rem 0;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }

    .page-header {
        padding: 2rem 0;
    }

    .comparison-section {
        padding: 1rem;
    }

    .contact-form {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cookie-banner {
        display: none;
    }

    .main {
        margin: 0;
        padding: 0;
    }

    .comparison-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .comparison-card {
        border: 2px solid #333;
    }

    .btn-primary {
        background: #000;
        color: #fff;
    }

    .nav-link:hover,
    .nav-link.active {
        background: #000;
        color: #fff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}