/* ========================================
   JOUK - CREATE PLAN
======================================== */

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

:root {
    --background: #f8f5ef;
    --card: #fbfaf6;
    --text: #171914;
    --muted: #686961;
    --green: #173d2d;
    --green-hover: #0f3022;
    --gold: #c79b43;
    --border: #d8d4ca;
    --soft-border: #e5e1d8;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: "DM Sans", Arial, sans-serif;
    min-height: 100vh;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}


/* ========================================
   NAVBAR
======================================== */

.navbar {
    height: 76px;
    padding: 0 5%;
    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: rgba(247, 245, 239, 0.96);
}

.logo {
    font-family: "Playfair Display", serif;
    font-size: 27px;
    letter-spacing: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 42px;
}

.nav-links a {
    position: relative;
    font-size: 14px;
    padding: 28px 0;
}

.nav-links a.active::after {
    content: "";
    position: absolute;

    bottom: 17px;
    left: 50%;

    width: 5px;
    height: 5px;

    border-radius: 50%;
    background: var(--green);

    transform: translateX(-50%);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.icon-button {
    width: 25px;
    height: 25px;

    border: 0;
    background: transparent;

    display: grid;
    place-items: center;
}

.icon-button svg {
    width: 21px;
    height: 21px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.profile-button {
    width: 34px;
    height: 34px;

    overflow: hidden;
    border-radius: 50%;
}

.profile-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ========================================
   MAIN
======================================== */

main {
    width: min(1180px, 92%);
    margin: 0 auto;
}


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

.hero {
    padding: 34px 0 30px;

    display: grid;
    grid-template-columns: 35% 65%;
    align-items: center;
    gap: 36px;

    border-bottom: 1px solid var(--border);
}

.hero-content {
    padding-right: 20px;
}

.eyebrow {
    color: #575c50;
    letter-spacing: 2px;
    font-size: 12px;
    font-weight: 600;

    margin-bottom: 14px;
}

.hero h1 {
    font-family: "Playfair Display", serif;
    font-weight: 500;

    font-size: clamp(42px, 4.5vw, 64px);
    line-height: 0.98;

    margin-bottom: 18px;
}

.hero-description {
    max-width: 350px;

    color: var(--muted);
    line-height: 1.55;
    font-size: 14px;
}

.hero-image {
    height: 250px;

    overflow: hidden;
    border-radius: 9px;
}

.hero-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* ========================================
   GENERAL SECTION
======================================== */

.plan-section {
    display: grid;
    grid-template-columns: 72px 1fr;

    padding: 25px 0 27px;

    border-bottom: 1px solid var(--border);
}

.section-number {
    font-family: "Playfair Display", serif;

    font-size: 26px;
    color: #a99f89;

    padding-top: 2px;
}

.section-content {
    min-width: 0;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2 {
    font-family: "Playfair Display", serif;

    font-size: 27px;
    font-weight: 600;

    margin-bottom: 3px;
}

.section-heading p {
    color: var(--muted);
    font-size: 14px;
}


/* ========================================
   YOUR TRIP
======================================== */

.trip-fields {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;

    gap: 20px;

    max-width: 820px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 13px;
    font-weight: 500;
}

.field input,
.field select {
    width: 100%;
    height: 49px;

    padding: 0 15px;

    border: 1px solid #cfcac0;
    border-radius: 9px;

    background: #fbfaf6;
    color: var(--text);

    outline: none;
}

.field input:focus,
.field select:focus {
    border-color: var(--green);
}


/* ========================================
   FILTERS
======================================== */

.filters {
    display: flex;
    gap: 12px;

    margin-bottom: 22px;
    flex-wrap: wrap;
}

.filter-btn {
    min-width: 68px;

    padding: 9px 20px;

    border-radius: 100px;
    border: 1px solid #cfcac0;

    background: transparent;
    color: var(--text);

    transition: 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--green);
}

.filter-btn.active {
    background: var(--green);
    color: white;
    border-color: var(--green);
}


/* ========================================
   PLACES GRID
======================================== */

.places-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;
}

.place-card {
    overflow: hidden;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 9px;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

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

    box-shadow:
        0 9px 25px rgba(0, 0, 0, 0.06);
}

.place-card.selected {
    border-color: var(--green);
}

.place-card.hidden {
    display: none;
}

.place-image {
    width: 100%;
    height: 130px;

    object-fit: cover;
}

.place-card-content {
    padding: 11px 13px 14px;
}

.place-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 8px;
}

.place-title-row h3 {
    font-family: "Playfair Display", serif;

    font-size: 19px;
    line-height: 1.2;
}

.location {
    margin-top: 4px;

    color: var(--muted);
    font-size: 12px;
}

.add-place {
    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    border-radius: 50%;

    border: none;

    background: var(--green);
    color: white;

    font-size: 25px;
    line-height: 1;

    transition: 0.2s ease;
}

.add-place:hover {
    background: var(--green-hover);
    transform: scale(1.05);
}

.place-card.selected .add-place {
    background: #d8d4ca;
    color: var(--text);
}

.place-description {
    margin-top: 10px;

    color: #62645e;

    font-size: 12.5px;
    line-height: 1.45;

    min-height: 54px;
}


/* ========================================
   SELECTED PLACES
======================================== */

.selected-places {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;
}

.empty-message {
    grid-column: 1 / -1;

    padding: 25px;

    border: 1px dashed #c9c4b8;
    border-radius: 9px;

    color: var(--muted);

    text-align: center;
    font-size: 14px;
}

.selected-card {
    display: grid;
    grid-template-columns: 75px 1fr auto;

    align-items: center;
    gap: 12px;

    padding: 10px;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 9px;
}

.selected-card img {
    width: 75px;
    height: 68px;

    object-fit: cover;

    border-radius: 6px;
}

.selected-info {
    min-width: 0;
}

.selected-info h3 {
    font-family: "Playfair Display", serif;

    font-size: 16px;
    margin-bottom: 7px;
}

.selected-info select {
    width: 115px;
    height: 34px;

    padding: 0 10px;

    border: 1px solid #ccc7bc;
    border-radius: 8px;

    background: #fbfaf6;
}

.remove-selected {
    align-self: start;

    width: 27px;
    height: 27px;

    border: 0;
    background: transparent;

    font-size: 23px;
    line-height: 1;
}


/* ========================================
   ITINERARY
======================================== */

.itinerary-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.day-card {
    min-height: 170px;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 9px;

    padding: 14px;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding-bottom: 11px;
    margin-bottom: 12px;

    border-bottom: 1px solid var(--soft-border);
}

.day-header h3 {
    font-size: 13px;
    letter-spacing: 1.5px;
}

.day-header span {
    color: var(--muted);
    font-size: 12px;
}

.day-empty {
    padding: 27px 5px;

    color: #99978f;
    text-align: center;

    font-size: 13px;
}

.itinerary-place {
    display: grid;

    grid-template-columns: 88px 1fr auto;

    gap: 12px;
    align-items: start;

    padding: 7px 0;
}

.itinerary-place + .itinerary-place {
    border-top: 1px solid var(--soft-border);
    margin-top: 9px;
    padding-top: 13px;
}

.itinerary-place img {
    width: 88px;
    height: 92px;

    border-radius: 6px;
    object-fit: cover;
}

.itinerary-info h4 {
    font-family: "Playfair Display", serif;

    font-size: 16px;

    margin-bottom: 5px;
}

.category-label {
    color: #6b695f;

    font-size: 12px;

    margin-bottom: 6px;

    text-transform: capitalize;
}

.itinerary-info p {
    color: var(--muted);

    font-size: 12px;
    line-height: 1.4;
}

.remove-itinerary {
    border: 0;
    background: transparent;

    font-size: 21px;
}


/* ========================================
   SAVE BAR
======================================== */

.save-plan-bar {
    margin: 23px 0 45px;

    padding: 14px 16px;

    min-height: 95px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--card);

    display: grid;

    grid-template-columns: auto 1fr auto;

    gap: 16px;
    align-items: center;
}

.journey-icon {
    width: 57px;
    height: 57px;

    border-radius: 50%;

    background: #efebe0;

    display: grid;
    place-items: center;
}

.journey-icon svg {
    width: 28px;
    height: 28px;

    fill: none;
    stroke: #55594e;
    stroke-width: 1.4;
}

.journey-summary span {
    display: block;

    font-size: 10px;
    letter-spacing: 1.5px;

    margin-bottom: 3px;
}

.journey-summary h3 {
    font-family: "Playfair Display", serif;

    font-size: 20px;
    margin-bottom: 3px;
}

.journey-summary p {
    color: var(--muted);
    font-size: 13px;
}

.save-plan-button {
    width: 290px;
    height: 57px;

    padding: 0 28px;

    border: 0;
    border-radius: 9px;

    background: var(--green);
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;

    font-family: "Playfair Display", serif;
    font-size: 16px;

    transition: 0.2s ease;
}

.save-plan-button:hover {
    background: var(--green-hover);
}

.save-plan-button span {
    font-family: Arial, sans-serif;
    font-size: 24px;
}


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

@media (max-width: 1000px) {

    .places-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .selected-places {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .itinerary-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 780px) {

    .navbar {
        padding: 0 4%;
    }

    .nav-links {
        display: none;
    }

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

    .hero-image {
        height: 230px;
    }

    .plan-section {
        grid-template-columns: 1fr;
    }

    .section-number {
        margin-bottom: 8px;
    }

    .trip-fields {
        grid-template-columns: 1fr;
    }

    .save-plan-bar {
        grid-template-columns: auto 1fr;
    }

    .save-plan-button {
        grid-column: 1 / -1;

        width: 100%;
    }
}


@media (max-width: 560px) {

    main {
        width: 90%;
    }

    .hero h1 {
        font-size: 44px;
    }

    .places-grid,
    .selected-places,
    .itinerary-grid {
        grid-template-columns: 1fr;
    }

    .place-image {
        height: 190px;
    }
}
