/* ================================
   WANDERLOG - CLEAN FINAL CSS
   ================================ */

/* ===== GLOBAL ===== */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

h1 {
    text-align: center;
    letter-spacing: 1px;
}

h2 {
    margin-top: 25px;
}

button {
    background-color: #2d6a4f;
    color: white;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}


/* ===== HEADER ===== */

header {
    background-color: #2d6a4f;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 18px 30px;
}

header h1 {
    margin: 0;
}



/* ===== DARK MODE BUTTON ===== */

#themeToggle {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 8px;
    background: #4CAF50;
    color: white;
    cursor: pointer;
    z-index: 1000;
}


/* ===== HERO ===== */

.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    background:
        linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
        url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e");

    background-size: cover;
    background-position: center;
    color: white;
    padding: 20px;
}

.hero h2 {
    font-size: 55px;
    margin-bottom: 15px;
    color: white;
}

.hero p {
    font-size: 20px;
    margin-bottom: 25px;
    color: white;
}

.btn {
    background: #2d6a4f;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}


/* ===== TRIP FORM ===== */

.trip-form,
.trip-list {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
}

.trip-form h2,
.trip-list h2 {
    text-align: center;
    color: #2d6a4f;
}

#tripForm {
    max-width: 700px;
    margin: 25px auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-sizing: border-box;
}

#tripForm input,
#tripForm textarea,
#tripForm select {
    width: 100%;
    padding: 11px 13px;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

#tripForm textarea {
    min-height: 100px;
    resize: vertical;
}

#tripForm input:focus,
#tripForm textarea:focus,
#tripForm select:focus {
    outline: none;
    border-color: #666;
}

#tripForm button {
    margin-top: 5px;
}


/* ===== IMAGE PREVIEW ===== */

#imagePreview {
    max-width: 100%;
    max-height: 250px;
    object-fit: cover;
    border: 2px solid #ddd;
    padding: 5px;
    border-radius: 10px;
    margin: 10px 0;
}

.trip-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}


/* ===== SEARCH & FILTER ===== */

#searchInput,
#filterDate {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    min-height: 42px;
    box-sizing: border-box;
}

#searchInput {
    margin: 20px 0;
}

#filterDate {
    margin: 10px 0 20px;
}

#searchInput:focus,
#filterDate:focus {
    outline: none;
    border-color: #666;
}

#favoriteFilterBtn {
    min-height: 42px;
    border-radius: 8px;
    display:block;
    margin: 10px auto 20px;
}


/* ===== TRIP CONTAINER ===== */

#tripContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}


/* ===== TRIP CARD ===== */

.trip-card {
    background: linear-gradient(135deg, #2d6a4f, #52b788);
    color: white;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
}

.trip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0,0,0,0.15);
}

.trip-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: white;
}

.trip-card p {
    margin: 10px 0;
    color: white;
}

.trip-card .date {
    background: rgba(255,255,255,0.2);
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.trip-card button {
    margin: 5px 4px 0 0;
    padding: 9px 13px;
    border-radius: 8px;
}


/* ===== EMPTY STATE ===== */

.empty-state {
    text-align: center;
    padding: 35px 20px;
    background: #f4f4f4;
    border-radius: 14px;
    margin: 25px auto;
    max-width: 600px;
    color: #555;
    font-size: 18px;
}


/* ===== TRIP DETAILS ===== */

.trip-details {
    max-width: 700px;
    margin: 30px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.trip-details img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.trip-details h2,
.trip-details h3 {
    color: #2d6a4f;
}

.trip-details button {
    margin-top: 15px;
}


/* ===== STATISTICS ===== */

.stats {
    max-width: 900px;
    margin: 35px auto;
    padding: 10px;
    text-align: center;
}

.stats h2 {
    margin-bottom: 25px;
}

.stats-box {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-card {
    min-width: 180px;
    width: 180px;
    padding: 22px;
    background: #8fd3a8;
    border-radius: 14px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card h3 {
    font-size: 28px;
    margin: 0 0 8px;
}

.stat-card p {
    margin: 0;
    font-size: 15px;
}


/* ===== PROFILE ===== */

.profile {
    max-width: 700px;
    margin: 30px auto;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
}

.profile h2 {
    margin-bottom: 15px;
}

.profile h3 {
    font-size: 24px;
    margin: 10px 0;
}

.profile p {
    line-height: 1.6;
    margin: 18px 0;
}

.profile button {
    padding: 10px 16px;
}


/* ===== FOOTER ===== */

footer {
    background-color: #2d6a4f;
    color: white;
    text-align: center;
    padding: 15px;
}


/* ===== DARK MODE ===== */

body.dark {
    background: #1b1b1b;
    color: white;
}

body.dark .trip-card {
    background: #2d2d2d;
    color: white;
}

body.dark input,
body.dark textarea {
    background: #333;
    color: white;
    border: 1px solid #666;
}

body.dark .stat-card {
    background: #2d2d2d;
    color: white;
}

body.dark .trip-details {
    background: #2d2d2d;
    color: white;
}

body.dark .empty-state {
    background: #2d2d2d;
    color: white;
}


/* ===== MOBILE RESPONSIVE ===== */

@media (max-width: 768px) {

    header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 12px;
    }

    header h1 {
        font-size: 26px;
    }

    header button {
        width: 90%;
        max-width: 300px;
    }


    .hero {
        height: 70vh;
    }

    .hero h2 {
        font-size: 40px;
    }

    .hero p {
        font-size: 16px;
        padding: 0 15px;
    }

    .btn {
        padding: 10px 20px;
    }

    .trip-form,
    .trip-list {
        width: 90%;
        margin: 30px auto;
        padding: 15px;
        box-sizing: border-box;
    }

    #tripForm {
        width: 100%;
        padding: 15px;
    }

    #tripForm input,
    #tripForm textarea,
    #tripForm button {
        width: 100%;
        box-sizing: border-box;
    }

    #tripContainer {
        grid-template-columns: 1fr;
    }

    .trip-card {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 10px;
    }

    .trip-card button {
        width: 100%;
        margin: 5px 0;
    }

    .trip-image {
        width: 100%;
        height: auto;
    }

    .stats-box {
        flex-direction: column;
        align-items: center;
    }

    .stat-card {
        width: 80%;
        max-width: 300px;
    }

    #themeToggle {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
    }

    .profile {
        width: 90%;
        margin: 20px auto;
        box-sizing: border-box;
    }
}

/* ===== INPUT FOCUS EFFECT ===== */

#tripForm input:focus,
#tripForm textarea:focus,
#searchInput:focus,
#filterDate:focus {
    outline: none;
    border: 2px solid #4f9da6;
    box-shadow: 0 0 8px rgba(79, 157, 166, 0.34);
}

header button{
    margin-left:auto;
    margin-right:120px;
}