/* colors */
:root {
    --main-color: #694932;
    --light-bg: #f5ebe0;
    --border-color: #d7ccc8;
}

/* page background */
html {
    background-color: var(--light-bg);
    overflow-x: hidden;
}

body {
    font-family: Georgia, serif;
    background-color: var(--light-bg);
    background-image:
        radial-gradient(circle at top right, #a9744f 0%, transparent 40%),
        radial-gradient(circle at top left, #d8a8a0 0%, transparent 30%),
        linear-gradient(var(--light-bg), #b98a5e);
    margin: 0;
    padding: 10px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.homepage {
    background-image: url("../images/background.bafbd0935521.jpg");
    background-size: cover;
    background-position: center 25%;
    background-repeat: no-repeat;
}

.messages {
    max-width: 500px;
    margin: 15px auto 0 auto;
}

.message {
    text-align: center;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

h1 {
    text-align: center;
    margin-top: 25px;
    margin-bottom: 20px;
    font-family: "Playfair Display", Georgia, serif;
    text-shadow: 0 0 6px var(--light-bg), 0 0 6px var(--light-bg), 0 0 14px var(--light-bg), 0 0 14px var(--light-bg), 0 0 20px var(--light-bg), 0 0 20px var(--light-bg);
}

h2 {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 15px;
    font-family: "Playfair Display", Georgia, serif;
    text-shadow: 0 0 6px var(--light-bg), 0 0 6px var(--light-bg), 0 0 14px var(--light-bg), 0 0 14px var(--light-bg);
}

.hero-text h1 {
    font-size: 64px;
    font-style: italic;
    display: inline-block;
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 15px;
    text-shadow: 0 0 6px var(--light-bg), 0 0 6px var(--light-bg), 0 0 14px var(--light-bg), 0 0 14px var(--light-bg), 0 0 20px var(--light-bg), 0 0 20px var(--light-bg);
}

.hero-text h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--main-color);
    border-radius: 2px;
}

/* white card for the login/signup forms */
form {
    max-width: 400px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* same white card look for the 404 page message */
.error-box {
    max-width: 400px;
    margin: 40px auto;
    background-color: #ffffff;
    padding: 30px 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.error-cup {
    width: 100px;
    margin-bottom: 10px;
}

/* search box on the homepage, not a card like the login/signup forms */
.search-form {
    max-width: 600px;
    margin: 15px auto;
    background-color: #ffffff;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    gap: 8px;
}

.search-form input {
    font-size: 20px;
    padding: 14px 16px;
    margin-bottom: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form .btn {
    padding: 14px 20px;
}

.search-form input:hover {
    border-color: #4e342e;
    box-shadow: 0 0 0 3px rgba(111, 78, 55, 0.25);
}

.signup-hint {
    color: #666666;
    font-size: 14px;
}

.no-cafes-message {
    font-size: 18px;
    font-weight: bold;
    color: var(--main-color);
    text-shadow: 0 0 6px var(--light-bg), 0 0 6px var(--light-bg), 0 0 14px var(--light-bg), 0 0 14px var(--light-bg);
}

.welcome {
    color: var(--main-color);
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
    text-shadow: 0 0 6px var(--light-bg), 0 0 6px var(--light-bg), 0 0 14px var(--light-bg), 0 0 14px var(--light-bg), 0 0 20px var(--light-bg), 0 0 20px var(--light-bg);
}

.avatar-choices {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    justify-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.avatar-option img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
}

.avatar-option input {
    display: none;
}

.avatar-option input:checked + img {
    border-color: var(--main-color);
}

.welcome-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 6px;
}

.feature-icons {
    display: flex;
    justify-content: flex-start;
    gap: 25px;
    margin: 25px 0;
}

.feature-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4e342e;
}

.feature-icon i {
    font-size: 26px;
    color: var(--main-color);
}

.weather-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding: 4px 10px;
}

.weather-search {
    gap: 6px;
    margin: 0;
    max-width: none;
    background: none;
    padding: 0;
    border: none;
}

.weather-search input {
    width: 140px;
    padding: 4px 10px;
    font-size: 14px;
    margin-bottom: 0;
}

.weather-search .btn {
    padding: 4px 12px;
    font-size: 14px;
    background-color: var(--light-bg);
}

.weather-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 20px;
    background-color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.weather-icon {
    font-size: 20px;
    line-height: 1;
    border-radius: 50%;
    padding: 6px;
}

.weather-sun {
    color: #d9971e;
    background-color: #fdf1d6;
}

.weather-cloud {
    color: #3a7ca5;
    background-color: #d6ebf7;
}

.weather-overcast {
    color: #5c6b78;
    background-color: #dfe5e9;
}

.weather-rain {
    color: #2b6ca3;
    background-color: #d2e6f5;
}

.weather-storm {
    color: #46415e;
    background-color: #ddd9e8;
}

.weather-snow {
    color: #4f9cc4;
    background-color: #e8f5fb;
}

.weather-mist {
    color: #77828a;
    background-color: #e6e9eb;
}

/* full width homepage section, no card */
.box {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    padding: 0 15px 30px 15px;
}

.hero-text {
    max-width: 400px;
    min-width: 0;
    text-align: center;
}

.account-promo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto 30px auto;
    padding: 30px 40px;
    background-color: #8b6347;
    border-radius: 90px 15px 60px 35px;
    color: #ffffff;
}

.account-promo-label {
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #e8b878;
    margin-bottom: 8px;
}

.account-promo-text h2 {
    text-align: left;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 8px;
    text-shadow: none;
}

.account-promo-subheading {
    font-weight: bold;
    margin-bottom: 8px;
}

.account-promo-text p {
    max-width: 500px;
}

.account-promo .account-promo-btn {
    background-color: #ffffff;
    border-color: #ffffff;
    color: var(--main-color);
    white-space: nowrap;
}

.account-promo .account-promo-btn:hover {
    background-color: #e8d5c4;
    border-color: #e8d5c4;
    color: var(--main-color);
}

.hero-text p {
    text-shadow: 0 0 6px var(--light-bg), 0 0 6px var(--light-bg), 0 0 14px var(--light-bg), 0 0 14px var(--light-bg), 0 0 20px var(--light-bg), 0 0 20px var(--light-bg);
    font-size: 17px;
    margin: 18px 0;
}

.hero-text .search-form {
    margin: 25px 0;
}


.hero-image-wrap {
    background-color: #efdfd0;
    border-radius: 20px;
    padding: 18px;
    flex-shrink: 0;
}

.hero-image {
    max-width: 150px;
    width: 100%;
    display: block;
}

/* scrolling strip of city names on the homepage */
.city-ticker {
    overflow: hidden;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 6px 0;
    margin: 0;
}

.city-ticker-track {
    display: flex;
    gap: 40px;
    white-space: nowrap;
    width: max-content;
    animation: scroll-cities 60s linear infinite;
}

.city-ticker-track span {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: bold;
    color: var(--main-color);
}

@keyframes scroll-cities {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* form fields */
label {
    display: block;
    margin-bottom: 5px;
}

input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
}

/* top nav bar */
.navbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: -10px -10px 0 -10px;
    padding: 16px;
    background-color: #4e342e;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 20px;
    margin-left: 25px;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

.delete-account-link {
    color: #ff8080;
    font-size: 14px;
    text-decoration: underline;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    transition: transform 0.2s, color 0.2s;
}

.delete-account-link:hover {
    color: #ffb3b3;
    transform: translateY(-3px) scale(1.05);
}

/* hamburger button, hidden on bigger screens */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 26px;
}

.navbar .btn {
    font-family: Georgia, serif;
    font-size: 16px;
    padding: 8px 20px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.navbar .btn:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

.btn-how-it-works {
    color: #efdfd0;
    border: 1px solid #efdfd0;
    background-color: transparent;
}

.btn-how-it-works:hover {
    background-color: #efdfd0;
    color: #4e342e;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 17px;
    padding: 6px 14px;
    border-radius: 20px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover {
    background-color: #efdfd0;
    color: #4e342e;
}

/* logo + name in the navbar */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-text {
    font-family: "Playfair Display", Georgia, serif;
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    font-style: italic;
    display: inline-block;
    position: relative;
    padding-bottom: 6px;
}

.brand-text::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: #efdfd0;
    border-radius: 2px;
}

.brand-icon {
    font-size: 22px;
}

.brand:hover .brand-text {
    opacity: 0.85;
}

/* text logo above the copyright text */
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 22px;
}

.footer-text {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 800;
    color: var(--main-color);
    position: relative;
    padding-bottom: 6px;
}

.footer-text::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: var(--main-color);
    border-radius: 2px;
}

.box p {
    font-size: 18px;
}

.box p strong {
    color: #4e342e;
}

/* button colors, coffee theme instead of bootstrap green */
.btn-success {
    background-color: var(--main-color);
    border-color: var(--main-color);
}

.btn-outline-success {
    color: var(--main-color);
    border-color: var(--main-color);
}

.btn-success:hover {
    background-color: #4e342e;
    border-color: #4e342e;
    color: #ffffff;
}

.btn-outline-success:hover {
    background-color: #4e342e;
    border-color: #4e342e;
    color: #ffffff;
}

body > p {
    text-align: center;
}

body > p a {
    color: var(--main-color);
}

body > p a:hover {
    color: #4e342e;
}

/* bottom of every page, sticks to the bottom of the screen on short pages */
footer {
    margin: 30px -10px -10px -10px;
    margin-top: auto;
    padding: 30px 20px 15px 20px;
    background-color: #e8d5c4;
    color: #000000;
    font-size: 16px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(105, 73, 50, 0.25);
}

.footer-about {
    max-width: 280px;
}

.footer-about p {
    margin-top: 8px;
    font-size: 16px;
    color: #000000;
}

.footer-column h2 {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 10px 0;
    text-align: left;
    text-shadow: none;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-column a {
    color: #000000;
    text-decoration: none;
    font-size: 16px;
}

.footer-column a:hover {
    text-decoration: underline;
}

.footer-copyright {
    text-align: center;
    margin: 15px 0 0 0;
    font-size: 15px;
}

footer .footer-text {
    color: #000000;
}

footer .footer-text::after {
    background-color: #000000;
}

/* responsive - small screens */
@media (max-width: 600px) {
    .hero-text h1 {
        font-size: 30px;
    }

    .avatar-choices {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        justify-content: center;
        text-align: center;
    }

    .footer-column {
        align-items: center;
    }

    .footer-column h2 {
        text-align: center;
    }

    .navbar {
        justify-content: space-between;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        margin: 0;
        background-color: #4e342e;
        box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
        z-index: 20;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-links,
    .nav-auth {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-menu a,
    .nav-menu button {
        display: block;
        width: 100%;
        text-align: left;
        padding: 14px 5px;
        margin: 0;
        border: none;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        background: none;
        color: #ffffff;
        font-size: 18px;
    }

    .nav-menu a:hover,
    .nav-menu button:hover {
        background-color: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

    .nav-menu .delete-account-link {
        border-left: none;
        margin-left: 0;
        padding-left: 5px;
        color: #ff8080;
    }

    .nav-menu .delete-account-link:hover {
        color: #ffb3b3;
        transform: translateX(6px);
    }

    .box {
        padding: 5px 10px 20px 10px;
        gap: 20px;
    }

    .hero-text {
        max-width: 100%;
        width: 100%;
    }

    .hero-image {
        max-width: 150px;
    }

    .hero-image-wrap {
        order: -1;
    }

    .search-form {
        flex-direction: column;
        width: 100%;
        box-sizing: border-box;
    }

    .search-form input {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }

    .search-form .btn {
        width: 100%;
    }

    form {
        max-width: 100%;
    }

    .weather-bar {
        align-items: center;
    }

    .weather-line {
        font-size: 16px;
        text-align: center;
    }

    .weather-icon {
        font-size: 28px;
        padding: 10px;
    }

    .city-ticker-track span {
        font-size: 14px;
    }

    #cafe-map {
        height: 300px;
    }

}

/* the leaflet map box on map.html */
#cafe-map {
    width: 100%;
    max-width: 1100px;
    height: 500px;
    margin: 0 auto 20px auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-sizing: border-box;
}

.add-place-card {
    max-width: 400px;
    margin: 0 auto 20px auto;
    padding: 20px;
    text-align: center;
    background-color: #efdfd0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.cafe-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 15px;
}

.cafe-card {
    flex: 0 1 260px;
    max-width: 260px;
    margin: 0;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.cafe-card form {
    margin-top: auto;
    padding-top: 10px;
}

.cafe-card a.btn:first-of-type {
    margin-top: auto;
}

.cafe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.extra-cafe {
    display: none;
}

.extra-cafe.open {
    display: block;
}

.map-top-row {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
}

.map-top-row .search-form,
.map-top-row .add-place-card {
    margin: 15px 0;
    flex: 1 1 300px;
    min-width: 0;
}

.map-top-row .search-form {
    max-width: 600px;
}

.map-top-row .add-place-card {
    max-width: 360px;
}
