/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #618d2a;
    --secondary-color: #7e512d;
    --accent-color: #e3d6e1;
    --text-color: #854656;
    --light-bg: #f6f5e0;
    --white: #ffffff;
    --footer-bg: #332c22;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.header-logo {
    width: 56px;
    height: auto;
    display: block;
}

.logo-text h1,
.logo h1 {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
}

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

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

/* Header and Navigation */
.header {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ensure the nav can position absolute dropdown on small screens */
.nav { position: relative; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.logo h1 {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
}

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

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.6rem;
    cursor: pointer;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px 20px;
}

.hero, .hero-media { overflow: visible; }
.hero-content { position: relative; z-index: 3; }
.hero-media img { position: relative; z-index: 1; margin-bottom: -60px; }

.hero-content {
    max-width: 800px;
}

.hero h2 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--text-color);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.about h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Tours Section */
.tours {
    padding: 80px 0;
    background-color: transparent;
}

.tours h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.tours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Featured tour styles */
.featured {
    padding: 40px 0 20px;
}
.featured-heading {
    text-align: center;
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}
.featured-inner {
    max-width: 1000px;
    margin: 0 auto;
}
.featured-card {
    display: flex;
    gap: 20px;
    background: var(--white);
    padding: 18px;
    border-radius: 12px;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.featured-card {
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    pointer-events: auto;
}
.featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}
.featured-image {
    width: 46%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.featured-content {
    width: 54%;
}
.featured-content h3 {
    font-size: 1.6rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}
.featured-content p {
    margin-bottom: 1rem;
}

/* Grid for multiple featured cards */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

/* Ensure featured-card stacks on small screens */
@media (max-width: 900px) {
    .featured-card { flex-direction: column; }
    .featured-image { width: 100%; height: 220px; }
    .featured-content { width: 100%; }
}

/* Mobile navigation: hamburger + stacked menu */
@media (max-width: 800px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        gap: 0;
        padding: 12px 20px 18px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }
    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a { display: block; padding: 10px 0; }
}

@media (max-width: 900px) {
    .featured-card { flex-direction: column; }
    .featured-image { width: 100%; height: 220px; }
    .featured-content { width: 100%; }
}

.tour-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.tour-card { pointer-events: auto; }

.tour-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.tour-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tour-card h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.tour-card p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.tour-card ul {
    list-style: none;
    text-align: left;
    padding-left: 20px;
}

.tour-card li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tour-card li:last-child {
    border-bottom: none;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background-color: var(--primary-color);
    color: var(--white);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

/* Make contact form sit nicely beside contact-info on larger screens */
@media (min-width: 900px) {
    .contact-content {
        display: flex;
        gap: 30px;
        align-items: flex-start;
    }
    .contact-info {
        flex: 1 1 40%;
    }
    .contact-form-wrapper {
        flex: 1 1 55%;
    }
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.contact-info p {
    margin-bottom: 2rem;
}

.contact-details {
    list-style: none;
}

.contact-details li {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-details li:last-child {
    border-bottom: none;
}

.contact-details strong {
    color: var(--accent-color);
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        /* keep header items on a single row so the burger stays right of the logo */
        align-items: center;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero {
        padding-top: 120px;
    }

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

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

    .about h2,
    .tours h2,
    .contact h2 {
        font-size: 2rem;
    }

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Scroll offset for fixed header */
section {
    scroll-margin-top: 80px;
}

/* Logo / Slogan */
.logo .slogan {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: -2px;
    line-height: 1;
}

/* Tour card actions */
.tour-actions {
    margin-top: 1rem;
}

/* Make cards feel clickable */
.tour-card {
    cursor: pointer;
}
.tour-card:focus {
    outline: 3px solid rgba(45,80,22,0.15);
}

/* Tour images */
.tour-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    display: block;
}

/* Service cards should look like tour cards but without an image element.
   We reuse the .tour-card styles and add a small helper to match spacing. */
.service-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    /* Make service cards visually similar height to tour cards with images */
    min-height: 260px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    pointer-events: auto;
}
.service-card h3 {
    margin-top: 6px;
}
.service-card p {
    /* allow summary/description to take available space so cards align */
    flex: 1 1 auto;
}

/* Media gallery */
.media-gallery {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0.25rem;
    border-radius: 8px;
}
.media-grid {
    display: flex;
    gap: 12px;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Constrain gallery to main content width and center it */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}
.media-placeholder {
    min-height: 120px;
    border: 2px dashed rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 12px;
    color: rgba(0,0,0,0.6);
}

/* Individual media items: force uniform thumbnail shape */

.media-item {
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(245,240,232,0.6), rgba(245,240,232,0.4));
    display: flex;
    flex-direction: column;
    flex: 0 0 320px; /* larger item width in carousel for bigger thumbs */
    scroll-snap-align: center;
}

.media-thumb {
    width: 100%;
    height: 260px; /* increased height so images are taller */
    object-fit: cover;
    display: block;
}

.media-item figcaption {
    padding: 8px 10px;
    font-size: 0.95rem;
    color: var(--text-color);
    background: rgba(255,255,255,0.6);
}

@media (max-width: 768px) {
    .media-thumb { height: 180px; }
    .media-item { flex: 0 0 220px; }
}

@media (max-width: 420px) {
    .media-thumb { height: 140px; }
    .media-item { flex: 0 0 160px; }
}

/* Carousel buttons */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}
.carousel-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}
.carousel-btn:disabled { opacity: 0.5; cursor: default; }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    z-index: 3000;
    padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox-content {
    max-width: 1100px;
    width: 100%;
    /* center the content block in the viewport */
    margin: 0 auto;
    position: relative;
    display: block;
}
.lightbox-stage {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
}
.lightbox-nav.lb-prev { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.lb-next { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-caption { margin-top: 12px; }
.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.lightbox-caption { color: #fff; text-align: center; margin-top: 8px; }
.lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    color: #fff;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
}
.lightbox-nav {
    color: #fff;
    background: rgba(0,0,0,0.3);
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
}
@media (max-width: 600px) {
    .lightbox-content { flex-direction: column; }
    .lightbox-nav { padding: 8px; }
}

/* Modal component styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal[aria-hidden="false"] {
    display: flex;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}
.modal-content {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    max-width: 720px;
    width: 94%;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    z-index: 2;
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}
.modal-actions { 
    margin-top: 1.5rem;
    text-align: right;
}

/* Modal section headings and separator */
.modal-section h4 {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    color: var(--secondary-color);
}
.modal-sep {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, rgba(0,0,0,0.06), rgba(0,0,0,0.02));
    margin: 12px 0;
}
.modal-section p { margin: 0 0 8px 0; }
.modal-facts ul { margin: 0; padding-left: 18px; }
.modal-facts li { margin-bottom: 6px; }

/* Hero image */
.hero-media {
    text-align: center;
    position: relative;
    z-index: 1; 
}

.hero-media img {
    width: 100%;
    max-width: 1000px;     
    height: auto;
    
    display: block;
    margin-left: auto;
    margin-right: auto;

    margin-top: -150px;    
    margin-bottom: -225px; 
}

.hero-content {
    position: relative;
    z-index: 2;         
    text-shadow: 0 2px 10px rgba(0,0,0,0.5); 
}

/* Booking form inside modal */
.booking-form label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.95rem;
}
.booking-form input,
.booking-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 6px;
    margin-top: 6px;
}
.booking-form textarea {
    min-height: 200px;
    /* Tillåt endast vertikal storleksändring; bredden är fast */
    resize: vertical;
    box-sizing: border-box;
    max-width: 100%;
}
.booking-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
}

@media (max-width: 480px) {
    .modal-content { padding: 16px; }
}
