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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

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

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.header-content a {
    display: inline-block;
    transition: opacity 0.2s;
}

.header-content a:hover {
    opacity: 0.9;
}

.logo {
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    background: white;
    padding: 0.5rem;
    border-radius: 8px;
}

.header-text {
    flex: 1;
    min-width: 300px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Search Section */
.search-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 0;
}

.search-input-large {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.125rem;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.search-input-large:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input-large::placeholder {
    color: var(--text-secondary);
}

/* Intro Section */
.intro-section {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
}

.intro-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-primary);
    max-width: 800px;
    margin: 0 auto;
    font-weight: 400;
}

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

.stat-card {
    background: var(--card-background);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    flex: 1;
    min-width: 150px;
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card p {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Tours Grid */
.tours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.tour-card {
    background: var(--card-background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.tour-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tour-card-featured {
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.tour-card-featured:hover {
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
    transform: translateY(-6px);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tour-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tour-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.tour-content {
    padding: 1.5rem;
}

.tour-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tour-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tour-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tour-info-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.tour-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.tour-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.tour-price-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.tour-details-button {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(61, 126, 255, 0.3);
}

.tour-details-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 126, 255, 0.4);
}

.tour-card {
    cursor: default; /* Remove cursor pointer since we have explicit button */
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--background);
    color: var(--text-primary);
}

/* Loading & Error */
.loading, .error, .no-results {
    text-align: center;
    padding: 3rem;
    font-size: 1.25rem;
}

.error {
    color: var(--danger-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--card-background);
    margin: 2% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

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

.modal-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-tour-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.modal-section {
    margin-bottom: 2.5rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.contact-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

.contact-badge .contact-icon {
    font-size: 1.25rem;
    animation: shake 2s ease-in-out infinite;
}

.contact-badge .contact-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.contact-badge .contact-phone {
    color: white;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.contact-badge .contact-phone:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transform: scale(1.05);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
    }
}

@keyframes shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: rotate(-5deg);
    }
    20%, 40%, 60%, 80% {
        transform: rotate(5deg);
    }
}

/* Mobile responsive for contact badge */
@media (max-width: 768px) {
    .contact-badge {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .contact-badge .contact-text {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

.image-gallery {
    width: 100%;
    position: relative;
}

.main-image-container {
    width: 100%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--background);
    touch-action: pan-y; /* Allow vertical scrolling but handle horizontal swipe */
}

.main-gallery-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
    background: var(--background);
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    user-select: none;
}

.gallery-arrow:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-arrow-left {
    left: 15px;
}

.gallery-arrow-right {
    right: 15px;
}

.gallery-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .gallery-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .gallery-arrow-left {
        left: 10px;
    }
    
    .gallery-arrow-right {
        right: 10px;
    }
    
    .gallery-counter {
        bottom: 10px;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .main-gallery-image {
        max-height: 400px;
    }
}

.modal-tour-description {
    line-height: 1.8;
    color: var(--text-primary);
}

.description-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.description-heading:first-child {
    margin-top: 0;
}

/* Special styling for day headings (Dita e Parë, Dita e Dytë, etc.) - keep as bold but styled */
.day-heading-bold {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.day-heading-bold:first-child {
    margin-top: 0;
}

.description-paragraph {
    margin-bottom: 0.875rem;
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 1rem;
}

.description-paragraph:last-child {
    margin-bottom: 0;
}

/* Style for <b> and <strong> within paragraphs */
.description-paragraph b,
.description-paragraph strong {
    font-weight: 700;
    color: var(--text-primary);
}

.description-list-item {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    line-height: 1.6;
    color: var(--text-primary);
}

.description-list-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Preserve line breaks and spacing */
.modal-tour-description {
    word-wrap: break-word;
}

/* Better spacing for nested content */
.modal-tour-description p + p {
    margin-top: 0.75rem;
}

.modal-tour-description h4 + p,
.modal-tour-description .description-heading + p {
    margin-top: 0.5rem;
}

/* Hide ONLY truly empty elements that cause spacing issues */
/* Be careful not to hide divs that might contain structured content like lists */
.modal-tour-description p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    line-height: 0 !important;
}

/* Hide empty spans but not divs (divs might have structured content) */
.modal-tour-description span:empty {
    display: none !important;
}

/* Ensure paragraphs don't create space if they only contain whitespace */
.modal-tour-description p {
    min-height: 0;
}

/* Preserve list structure - don't hide divs that might contain numbered lists */
.modal-tour-description div:not(:has(*)):empty {
    display: none;
}

/* But be safe - only hide divs that are truly empty with no children */
.modal-tour-description > div:empty:not(.description-list-item) {
    display: none;
}

.modal-departures {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.departure-item {
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    background: var(--card-background);
}

.departure-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

/* Mobile Departures Section */
.mobile-departures-section {
    display: none;
}

@media (max-width: 968px) {
    .mobile-departures-section {
        display: block;
    }
    
    .detail-sidebar {
        display: none;
    }
}

.mobile-departures {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-departure-item {
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-background);
    box-shadow: var(--shadow);
}

.mobile-departure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.mobile-departure-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-departure-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mobile-departure-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.mobile-departure-price-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.whatsapp-button {
    display: inline-block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #25D366;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.whatsapp-button:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.show-more-dates-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-more-dates-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Departures Modal */
.departures-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.departures-modal-content {
    background: var(--card-background);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.departures-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.departures-modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.departures-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

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

.departures-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-departure-item {
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--background);
}

.modal-departure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-departure-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-departure-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.modal-departure-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.modal-departure-price-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Share Section */
.share-section {
    background: var(--background);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 2rem;
}

.share-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.share-whatsapp {
    background: #25D366;
}

.share-whatsapp:hover {
    background: #20BA5A;
}

.share-facebook {
    background: #1877F2;
}

.share-facebook:hover {
    background: #166FE5;
}

.share-button svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .share-buttons {
        flex-direction: column;
    }
    
    .share-button {
        width: 100%;
        justify-content: center;
    }
}

/* WhatsApp Floating Action Button */
.whatsapp-fab {
    display: none;
}

@media (max-width: 968px) {
    .whatsapp-fab {
        display: flex;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        background: #25D366;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
        z-index: 1000;
        transition: all 0.3s ease;
        text-decoration: none;
    }
    
    .whatsapp-fab:hover {
        background: #20BA5A;
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
    }
    
    .whatsapp-fab:active {
        transform: scale(0.95);
    }
    
    .whatsapp-fab svg {
        width: 28px;
        height: 28px;
    }
}

.departure-info {
    flex: 1;
}

.departure-date {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.departure-nights {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.departure-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

.departure-price-wrapper {
    text-align: right;
}

.departure-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.departure-price-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.modal-extras {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.extra-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--background);
}

.extra-name {
    flex: 1;
    font-size: 1rem;
}

.extra-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.extra-price-per-person {
    font-weight: 600;
    color: var(--text-primary);
}

.extra-total-price {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .search-input-large {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }

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

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .logo {
        max-height: 80px;
    }

    .header-text {
        min-width: 100%;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }
}

