/* TripAdvisor Theme CSS */
:root {
    --primary-green: #00aa6c;
    /* TripAdvisor Green */
    --hover-green: #008f5a;
    --bg-light: #f2f2f2;
    --text-black: #000000;
    --text-dark: #333333;
    --text-gray: #545454;
    --border-color: #e0e0e0;
    --font-stack: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --card-radius: 12px;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* --- Header --- */
.trip-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.trip-nav ul {
    display: flex;
    gap: 20px;
    align-items: center;
}

.trip-nav-item {
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 15px;
}

.trip-nav-item:hover {
    background: #f2f2f2;
}

.trip-btn-signin {
    background: #000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
}

.trip-btn-signin:hover {
    background: #333;
    color: #fff;
}

/* --- Hero --- */
.trip-hero {
    background: #fff;
    padding: 60px 24px;
    text-align: center;
}

.trip-hero h1 {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-black);
    margin-bottom: 30px;
}

.trip-search-bar {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 30px;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border-color);
}

.trip-search-bar:focus-within {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.trip-search-icon {
    padding-left: 20px;
    color: var(--text-black);
    font-size: 20px;
}

.trip-search-input {
    flex: 1;
    border: none;
    padding: 16px 20px;
    font-size: 16px;
    border-radius: 30px;
    outline: none;
}

.trip-search-btn {
    background: var(--primary-green);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    margin: 4px;
    font-weight: 600;
    cursor: pointer;
}

.trip-search-btn:hover {
    background: var(--hover-green);
}

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

/* --- Section --- */
.trip-section {
    margin-bottom: 40px;
}

.trip-section-header {
    margin-bottom: 20px;
}

.trip-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

.trip-section-subtitle {
    font-size: 16px;
    color: var(--text-gray);
}

/* --- Grid --- */
.trip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* --- Card --- */
.trip-card {
    background: #fff;
    border-radius: var(--card-radius);
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.trip-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.trip-card-img-container {
    position: relative;
    padding-top: 66.66%;
    /* 3:2 Aspect Ratio */
    background: #e0e0e0;
}

.trip-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trip-heart-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Advertise Section */
.trip-advertise-section {
    background-color: #fff;
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.trip-advertise-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #f2fcf7;
    /* Very light green hint to match theme */
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
}

.trip-advertise-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.trip-advertise-text {
    flex: 1;
    min-width: 200px;
}

.trip-advertise-text h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000;
}

.trip-advertise-text p {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

.trip-advertise-action {
    flex-shrink: 0;
}

.trip-btn-primary {
    background-color: #00aa6c;
    color: #fff;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 24px;
    text-decoration: none;
    transition: background-color 0.2s;
    display: inline-block;
}

.trip-btn-primary:hover {
    background-color: #008c5a;
    color: #fff;
}

@media (max-width: 768px) {
    .trip-advertise-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Partners Section */
.trip-partners-section {
    background-color: #fff;
    padding: 20px 0 40px;
    border-bottom: 1px solid #e0e0e0;
}

.trip-partners-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.trip-partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.trip-partner-item {
    width: 200px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    margin: 10px;
}

.trip-partner-item img {
    max-width: 200px;
    max-height: 200px;
    max-height: 100%;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.trip-partner-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.trip-card-body {
    padding: 12px;
}

.trip-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trip-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.trip-bubbles {
    color: var(--primary-green);
    font-size: 14px;
}

.trip-reviews-count {
    color: var(--text-gray);
    font-size: 12px;
}

/* --- Footer --- */
.trip-footer {
    background: #faf1ed;
    /* TripAdvisor often uses a warm light footer or plain white */
    padding: 40px 24px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.trip-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.trip-footer-col h5 {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.trip-footer-col ul li {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-gray);
    cursor: pointer;
}

.trip-footer-col ul li:hover {
    text-decoration: underline;
    color: #000;
}

html[dir="rtl"] .trip-logo {
    margin-left: 24px;
}

/* Responsive Menu Handling */
/* Default State (Desktop) */
.trip-mobile-menu {
    display: none;
}

.trip-nav {
    display: block;
}

.trip-mobile-nav-dropdown {
    display: none;
}

@media (min-width: 1024px) {

    /* Explicitly ensure desktop state */
    .trip-mobile-menu {
        display: none !important;
    }

    .trip-nav {
        display: block !important;
    }
}

@media (max-width: 1023px) {
    .trip-nav {
        display: none !important;
    }

    /* Show Hamburger on Mobile */
    .trip-mobile-menu {
        display: block !important;
        cursor: pointer;
    }

    .trip-auth {
        display: none !important;
    }
}

/* --- Article Content Fix --- */
.mkdf-article-body {
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.mkdf-article-body img,
.mkdf-article-body iframe,
.mkdf-article-body video,
.mkdf-article-body figure {
    max-width: 100% !important;
    height: auto !important;
}
.mkdf-article-body table {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    overflow-x: auto;
}

/* --- Article Content Fix (Nuclear) --- */
.mkdf-article-body {
    overflow-wrap: break-word;
    word-wrap: break-word;
    width: 100%;
    overflow-x: hidden;
}
.mkdf-article-body * {
    max-width: 100% !important;
}
.mkdf-article-body img,
.mkdf-article-body iframe,
.mkdf-article-body video {
    height: auto !important;
}
.mkdf-article-body table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
}

.mkdf-article-content {
    padding: 25px 25px;
    background-color: #fff;
}

/* --- Pagination Fix --- */
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    gap: 5px;
}
.pagination li {
    display: inline-block;
}
.pagination li a,
.pagination li span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    background: #fff;
}
.pagination li.active span {
    background-color: #00AA6C;
    color: white;
    border-color: #00AA6C;
}
