/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Patrick+Hand&family=Paytone+One&display=swap');

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Patrick Hand', cursive;
    background-color: #ffffff;
    color: #000;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: 'Patrick Hand', cursive; }
input[type="text"], input[type="search"], input[type="password"], input[type="email"], textarea {
    font-family: 'Lato', sans-serif;
}

.page-wrapper {
    display: flex;
    min-height: calc(100vh - 100px);
    padding: 0 40px;
}

.site-container {
    max-width: 1500px;
    margin: 0 auto;
    border-left: 1px solid #000;
    border-right: 1px solid #000;
    min-height: 100vh;
    background: #D3EDFF;
}

/* ===== HEADER ===== */
.site-header {
    background-color: #D3EDFF;
    border-bottom: 1px solid #000;
    padding: 10px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}


.header-top {
    display: flex;
    align-items: center;
}

/* Logo - bigger */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo-img-placeholder {
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-img-placeholder img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.logo-fallback {
    width: 65px;
    height: 65px;
    background-color: #000;
    color: #DF6434;
    font-size: 42px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-family: 'Patrick Hand', cursive;
}

.logo-text {
    font-size: 14px;
    font-weight: bold;
    font-style: italic;
    line-height: 1.2;
    white-space: nowrap;
    font-family: 'Patrick Hand', cursive;
}

/* Nav - Paytone One, centered */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    flex: 1;
    margin: 0 50px 0 50px;
}

.nav-links a {
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    text-transform: uppercase;
    font-family: 'Paytone One', sans-serif;
}

.nav-links a.new-recipe { color: #DF6434; }

.nav-links a:hover {
    color: #DF6434;
    transition: color 0.2s ease;
}

.nav-links a.new-recipe:hover {
    color: #c9552a;
}


/* Header right */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
}

.user-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
}

.user-icon-btn svg { width: 30px; height: 30px; }

.user-avatar {
    width: 42px;
    height: 42px;
    background-color: #DF6434;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    font-family: 'Patrick Hand', cursive;
}

/* Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #000;
    z-index: 200;
    min-width: 115px;
}

.dropdown-menu.open { display: block; }

.dropdown-menu a, .dropdown-menu button {
    display: block;
    width: 100%;
    padding: 8px 14px;
    text-align: left;
    font-size: 14px;
    background: none;
    border: none;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
    font-family: 'Patrick Hand', cursive;
}

.dropdown-menu a:last-child, .dropdown-menu button:last-child { border-bottom: none; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background-color: #eee; }

/* Search bar - wider, centered under nav */
.search-bar-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    width:100%;
}

.search-bar {
    width: 80%;
    max-width: 900px;
    position: relative;
    margin: 0 30px 0 30px;
}

.search-bar input {
    width: 100%;
    padding: 8px 10px 8px 34px;
    border: 1px solid #000;
    background: #fff;
    font-size: 14px;
    outline: none;
}

.search-bar .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
}

.search-bar .search-icon svg { width: 15px; height: 15px; stroke: #666; }

/* Mobile buttons */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    order: 3;
}

.mobile-filter-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-new-recipe {
    display: none;
    font-size: 26px;
    font-weight: bold;
    color: #DF6434;
    background: none;
    border: none;
    cursor: pointer;
    order: 1;
}

/* ===== MOBILE MENU ===== */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: #D3EDFF;
    border-left: 2px solid #000;
    z-index: 500;
    flex-direction: column;
    padding: 15px 0;
    overflow-y: auto;
}

.mobile-menu-overlay.open { display: flex; }

.mobile-menu-overlay .close-btn {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    margin: 0 15px 10px 0;
}

.mobile-nav-primary {
    display: block;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
    font-family: 'Paytone One', sans-serif;
    border-bottom: 1px solid #aaa;
    cursor: pointer;
    background: none;
    text-align: center;
    width: 100%;
    border-left: none;
    border-right: none;
    border-top: none;
}

.mobile-nav-sub {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    font-family: 'Patrick Hand', cursive;
    background: #fff;
    border-bottom: 1px solid #ddd;
    text-align: center;
    width: 100%;
}

.mobile-nav-sub:hover { background: #f0f0f0; }

.mobile-menu-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 499;
}

.mobile-menu-backdrop.open { display: block; }

/* ===== LAYOUT ===== */
.page-wrapper {
    display: flex;
    max-width: 1500px;
    margin: 0 auto;
    min-height: calc(100vh - 100px);
}

/* ===== SIDEBAR - larger fonts ===== */
.sidebar {
    width: 195px;
    padding: 14px 16px;
    flex-shrink: 0;
}

.sidebar h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 7px;
    margin-top: 14px;
    font-family: 'Paytone One', sans-serif;
}

.sidebar h3:first-child { margin-top: 0; }

.sidebar label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    margin-bottom: 5px;
    cursor: pointer;
    font-family: 'Patrick Hand', cursive;
}

.sidebar input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    width: 15px;
    height: 15px;
}

/* Star filter */
.star-rating-filter {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 6px;
    margin-bottom: 6px;
}

.star-rating-filter .star-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #ccc;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.star-rating-filter .star-btn.filled { color: #f5a623; }

.star-rating-filter .rating-label {
    font-size: 14px;
    margin-left: 4px;
    font-family: 'Patrick Hand', cursive;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    margin-bottom: 5px;
    font-family: 'Patrick Hand', cursive;
}

.toggle-switch {
    position: relative;
    width: 34px;
    height: 17px;
    background: #ccc;
    border-radius: 9px;
    cursor: pointer;
    flex-shrink: 0;
    border: none;
}

.toggle-switch.active { background: #DF6434; }

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 13px;
    height: 13px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.2s;
}

.toggle-switch.active::after { left: 19px; }

/* ===== MOBILE FILTER PANEL ===== */
.mobile-filter-panel {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: #D3EDFF;
    z-index: 500;
    padding: 20px;
    overflow-y: auto;
}

.mobile-filter-panel.open { display: block; }

.mobile-filter-panel .filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.mobile-filter-panel .save-btn {
    background: #DF6434;
    color: #fff;
    border: none;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Patrick Hand', cursive;
}

.mobile-filter-panel .close-filter-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
}

.mobile-filter-panel h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 7px;
    margin-top: 14px;
    font-family: 'Paytone One', sans-serif;
}

.mobile-filter-panel label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    margin-bottom: 5px;
    cursor: pointer;
    font-family: 'Patrick Hand', cursive;
}

.mobile-filter-panel input[type="checkbox"] { width: 15px; height: 15px; }

.mobile-filter-panel .toggle-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    margin-bottom: 5px;
}

.mobile-filter-panel .star-rating-filter {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 6px;
    margin-bottom: 6px;
}

.mobile-filter-panel .star-rating-filter .star-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #ccc;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.mobile-filter-panel .star-rating-filter .star-btn.filled { color: #f5a623; }

/* ===== MAIN CONTENT - white background ===== */
.main-content {
    flex: 1;
    padding: 15px 20px;
    overflow-x: hidden;
    background: #fff;
}

/* ===== CAROUSEL ===== */
.carousel-section {
    padding: 0 0 0 0;
    margin-bottom: 20px;
}

.carousel-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
    background: #e5f3ff;
    border: 1px solid #aaa;
    padding: 6px;
}

.carousel-header h2 {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    font-family: 'Paytone One', sans-serif;
}

.carousel-arrow {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px;
}

.carousel-track-wrapper { overflow: hidden; }

.carousel-track {
    display: flex;
    gap: 15px;
    transition: transform 0.3s ease;
}

.carousel-track .recipe-card {
    flex: 0 0 calc(25% - 12px);
    min-width: calc(25% - 12px);
}

/* Section title */
.section-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    background: #e5f3ff;
    border: 1px solid #aaa;
    padding: 6px;
    font-family: 'Paytone One', sans-serif;
}

/* Recipe grid */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

/* ===== RECIPE CARD ===== */
.recipe-card {
    background: #A3B096;
    border: 1px solid #999;
    overflow: hidden;
    cursor: pointer;
}

.recipe-card .card-image {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #8a7a6a;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.recipe-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.recipe-card .card-stars {
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 3px 8px 0;
    font-size: 13px;
    color: #ccc;
    background: #A3B096;
}

.recipe-card .card-stars .star.filled { color: #f5a623; }

.recipe-card .card-stars .rating-count {
    font-size: 10px;
    color: #444;
    margin-left: 4px;
    font-family: 'Lato', sans-serif;
}

.recipe-card .card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    background: #A3B096;
}

.recipe-card .card-title {
    font-size: 12px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 5px;
    font-family: 'Patrick Hand', cursive;
}

.recipe-card .card-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.card-icon-comment {
    display: flex;
    align-items: center;
    gap: 1px;
    background: #fff;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 1px 4px;
    cursor: pointer;
    height: 19px;
}

.card-icon-comment svg { width: 11px; height: 11px; flex-shrink: 0; }

.card-icon-comment .count {
    font-family: 'Lato', sans-serif;
    font-size: 10px;
    font-weight: 700;
    margin-left: 1px;
}

.card-icon-version {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 1px 4px;
    height: 19px;
    cursor: default;
    font-family: 'Lato', sans-serif;
    font-size: 10px;
    font-weight: 700;
}

.card-icon-heart {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 1px 4px;
    cursor: pointer;
    height: 19px;
}

.card-icon-heart svg { width: 13px; height: 13px; }
.card-icon-heart.liked svg { fill: red; stroke: red; }
.liked-page .card-icon-heart svg { fill: red; stroke: red; }

/* ===== SEARCH RESULTS ===== */
.search-results-info {
    font-size: 14px;
    margin-bottom: 10px;
    color: #555;
    font-family: 'Patrick Hand', cursive;
}

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

.profile-header-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.profile-banner {
    width: 100%;
    height: 600px;
    background-color: #A3B096;
    margin-bottom: 0;          
    overflow: visible;          
    position: relative;
    z-index: 1;
}

.profile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

.profile-bio-section {
    background: #fff;
    border: 1px solid #999;
    padding: 15px;
    font-size: 1.2rem;
    line-height: 1.5;
    text-align: center;
    font-family: 'Patrick Hand';
    display: flex;
    flex-direction: row;
    gap: 50px;

    position: absolute;
    bottom: 20px;
    right: 0;
    width: 55%;
    z-index: 3;
    margin: 0;                 
}

.profile-bio-section img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.profile-tabs {
    display: flex;
    justify-content: center;
    gap: 30px;
    background: #e5f3ff;
    border: 1px solid #aaa;
    padding: 8px;
    margin-bottom: 10px;
}

.profile-tabs a {
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Patrick Hand', cursive;
}

.profile-tabs a.active { text-decoration: underline; }

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

.profile-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #000;
    font-size: 14px;
    background: #fff;
}

/* ===== LIKED ===== */
.liked-header {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    background: #e5f3ff;
    border: 1px solid #aaa;
    padding: 10px;
    font-family: 'Paytone One', sans-serif;
}

/* ===== MESSAGES ===== */
.messages-wrapper {
    display: flex;
    flex: 1;
    min-height: 500px;
    border: 1px solid #999;
    background: #fff;
}

.messages-list {
    width: 280px;
    border-right: 1px solid #999;
    overflow-y: auto;
    flex-shrink: 0;
}

.messages-list h3 {
    font-size: 18px;
    font-weight: bold;
    padding: 12px 15px;
    border-bottom: 1px solid #999;
    font-family: 'Paytone One', sans-serif;
}

.message-preview {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
}

.message-preview:hover { background: #eee; }
.message-preview.active { background: #dde9f0; }

.message-preview .msg-username {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 3px;
    font-family: 'Patrick Hand', cursive;
}

.message-preview .msg-snippet {
    font-size: 12px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Lato', sans-serif;
}

.message-preview .msg-bullet {
    width: 8px;
    height: 8px;
    background: #DF6434;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.messages-conversation {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.conversation-reply {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
}

.conversation-reply textarea {
    width: 100%;
    height: 40px;
    border: 1px solid #999;
    padding: 8px;
    font-size: 13px;
    resize: vertical;
    font-family: 'Lato', sans-serif;
}

.conversation-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    max-height: 500px;
}

.conv-message { margin-bottom: 15px; }

.conv-message .msg-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.conv-message .msg-sender {
    font-weight: bold;
    font-size: 14px;
    font-family: 'Patrick Hand', cursive;
}

.conv-message .msg-time {
    font-size: 11px;
    color: #888;
    font-family: 'Lato', sans-serif;
}

.conv-message .msg-body {
    font-size: 13px;
    line-height: 1.5;
    background: #f0f0f0;
    padding: 8px 12px;
    font-family: 'Lato', sans-serif;
}

.conv-message.from-you .msg-body { background: #e0ecf3; }

/* ===== ACCOUNT ===== */
.account-wrapper { display: flex; flex: 1; }

.account-sidebar {
    width: 195px;
    padding: 20px 14px;
    flex-shrink: 0;
}

.account-sidebar a {
    display: block;
    padding: 8px 0;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Paytone One', sans-serif;
}

.account-sidebar a.active { text-decoration: underline; }

.account-main {
    flex: 1;
    padding: 20px 30px;
    background: #fff;
}

.account-main h2 {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 25px;
    font-family: 'Paytone One', sans-serif;
}

.form-row { display: flex; gap: 30px; margin-bottom: 15px; }
.form-group { flex: 1; }

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    text-align: center;
    font-family: 'Patrick Hand', cursive;
}

.form-group input[type="text"], .form-group input[type="email"], .form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #999;
    font-size: 13px;
    background: #fff;
    font-family: 'Lato', sans-serif;
}

.form-group textarea { height: 100px; resize: vertical; }

.photo-upload {
    width: 100%;
    height: 120px;
    border: 1px solid #999;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.photo-upload.banner { height: 80px; }

.photo-upload .edit-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #DF6434;
    font-size: 16px;
}

.submit-btn {
    display: block;
    margin: 20px auto 0;
    background: #DF6434;
    color: #fff;
    border: none;
    padding: 10px 40px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Patrick Hand', cursive;
}

/* ===== MODAL ===== */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 30px;
    overflow-y: auto;
}

.modal-backdrop.open { display: flex; }

.recipe-modal {
    background: #fff;
    border: 2px solid #000;
    width: 100%;
    max-width: 750px;
    margin: auto;
}

.modal-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px solid #999;
}

.modal-top-bar .version-btn {
    background: #D3EDFF;
    border: 1px solid #000;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    font-family: 'Patrick Hand', cursive;
}

.version-dropdown {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    background: #fff;
    border: 1px solid #000;
    z-index: 10;
    min-width: 80px;
}

.version-dropdown.open { display: block; }

.version-dropdown a {
    display: block;
    padding: 6px 12px;
    font-size: 13px;
    border-bottom: 1px solid #ddd;
    font-family: 'Patrick Hand', cursive;
}

.version-dropdown a:hover { background: #eee; }

.modal-title-area { flex: 1; text-align: center; }

.modal-title-area h2 {
    font-size: 20px;
    font-weight: bold;
    font-family: 'Paytone One', sans-serif;
}

.modal-title-area .recipe-author {
    font-size: 13px;
    font-style: italic;
    color: #555;
    font-family: 'Patrick Hand', cursive;
}

.modal-actions { display: flex; align-items: center; gap: 10px; }

.modal-heart-btn {
    border: 1.5px solid #000;
    border-radius: 6px;
    padding: 4px 6px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-heart-btn svg { 
    width: 20px; 
    height: 20px; 
}
.modal-heart-btn.liked svg { 
    fill: red; 
    stroke: red; }

    .modal-share-btn {
    border: 1.5px solid #000;
    border-radius: 6px;
    padding: 4px 6px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-share-btn svg {
    width: 20px;
    height: 20px;
}

.modal-print-btn {
    font-family: 'Patrick Hand', cursive;
    font-size: 16px;
    border: 1.5px solid #000;
    border-radius: 6px;
    padding: 4px 12px;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    display: flex;
    gap: 20px;
    padding: 15px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-left { flex: 1; }
.modal-right { width: 260px; flex-shrink: 0; }

.modal-recipe-image {
    width: 100%;
    aspect-ratio: 16/10;
    background: #8a7a6a;
    margin-bottom: 15px;
    overflow: hidden;
}

.modal-recipe-image img { width: 100%; height: 100%; object-fit: cover; }

.modal-right h3, .modal-left h3 {
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: 'Paytone One', sans-serif;
}

.ingredients-list { margin-bottom: 20px; }

.ingredients-list li {
    font-size: 13px;
    margin-bottom: 5px;
    padding-left: 15px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Lato', sans-serif;
}

.ingredients-list li::before { content: '•'; position: absolute; left: 0; }

.instructions-list { margin-bottom: 15px; }

.instructions-list li {
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-family: 'Lato', sans-serif;
}

.instructions-list .step-number { font-weight: bold; flex-shrink: 0; }
.instructions-list .step-text { flex: 1; }

.comment-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    position: relative;
}

.comment-bubble svg { width: 22px; height: 22px; }
.comment-bubble:hover svg path { fill: #a0c8e8; }

.bubble-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #999;
    padding: 8px;
    min-width: 200px;
    z-index: 10;
}

.bubble-popup.open { display: block; }

.bubble-popup textarea {
    width: 100%;
    height: 50px;
    border: 1px solid #999;
    padding: 5px;
    font-size: 12px;
    margin-bottom: 5px;
    resize: none;
    font-family: 'Lato', sans-serif;
}

.bubble-popup button {
    background: #DF6434;
    color: #fff;
    border: none;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Patrick Hand', cursive;
}

.creator-comments {
    background: #f5f5f5;
    border: 1px solid #999;
    padding: 10px;
    margin-top: 15px;
}

.creator-comments h4 {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: 'Paytone One', sans-serif;
}

.creator-comments ul { padding-left: 15px; }

.creator-comments li {
    font-size: 12px;
    margin-bottom: 5px;
    list-style: disc;
    font-family: 'Lato', sans-serif;
}


/* ===== NEW RECIPE PAGE ===== */
.new-recipe-form {
    background: #fff;
    border: 2px solid #000;
    max-width: 1300px;
    margin: 0 auto;
}

.new-recipe-version {
    background: #D3EDFF;
    border: 1px solid #000;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Patrick Hand', cursive;
}

.new-recipe-title-input {
    font-size: 20px;
    font-weight: bold;
    font-family: 'Paytone One', sans-serif;
    border: none;
    border-bottom: 1px dashed #ccc;
    text-align: center;
    width: 100%;
    outline: none;
    background: transparent;
    padding: 2px 0;
}

.new-recipe-title-input:focus { border-bottom-color: #DF6434; }
.new-recipe-title-input::placeholder { color: #bbb; }

.new-recipe-author-input {
    font-size: 13px;
    font-style: italic;
    font-family: 'Patrick Hand', cursive;
    border: none;
    border-bottom: 1px dashed #ccc;
    outline: none;
    background: transparent;
    width: 120px;
    color: #555;
    padding: 0;
}

.new-recipe-author-input:focus { border-bottom-color: #DF6434; }
.new-recipe-author-input::placeholder { color: #bbb; }

/* Photo upload area - layered on modal-recipe-image */
.new-recipe-photo-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px dashed #999;
    position: relative;
}

.new-recipe-photo-upload:hover { border-color: #DF6434; }

.photo-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 14px;
    font-family: 'Patrick Hand', cursive;
}

/* Inline inputs inside ingredient/instruction/comment lists */
.inline-input {
    width: 100%;
    border: none;
    border-bottom: 1px dashed #ccc;
    font-size: 13px;
    font-family: 'Lato', sans-serif;
    padding: 2px 0;
    outline: none;
    background: transparent;
}

.inline-input:focus { border-bottom-color: #DF6434; }
.inline-input::placeholder { color: #bbb; }

/* Remove button */
.remove-item-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #ccc;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
}

.remove-item-btn:hover { color: #e44; }

/* Add button */
.add-item-btn {
    background: none;
    border: 1px dashed #aaa;
    padding: 4px 12px;
    font-size: 13px;
    color: #DF6434;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Patrick Hand', cursive;
    margin-top: 5px;
}

.add-item-btn:hover { border-color: #DF6434; background: #fdf6f2; }

/* Publish button */
.publish-btn {
    background: #DF6434;
    color: #fff;
    border: none;
    padding: 6px 20px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Patrick Hand', cursive;
}

.publish-btn:hover { background: #c9552a; }


/* ===== FOOTER ===== */
.site-footer {
    border-top: 1px solid #999;
    padding: 15px 40px;
    text-align: center;
    font-size: 13px;
    color: #555;
    background: #D3EDFF;
    font-family: 'Patrick Hand';
}

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

@media (max-width: 1300px) {

    .profile-banner {
        height: 300px;
    }

    .profile-bio-section {
        position: static;       
        width: 100%;
        flex-direction: column;  
        align-items: center;
        gap: 15px;
    }

    .profile-bio-section img {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 900px) {
    .nav-links { display: none; }
    .header-right { display: none; }
    .hamburger-btn { display: block; }
    .mobile-filter-btn { display: block; }
    .mobile-new-recipe { display: block; }

     .site-header { padding: 10px 15px; }
    .page-wrapper { padding: 0 10px; }
    .site-footer { padding: 15px 10px; }


     .new-recipe-form .modal-body { flex-direction: column; }
    .new-recipe-form .modal-right { width: 100%; }

    .header-top {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .mobile-nav-primary:hover {
    background: #c2dff5;
    color: #DF6434;
    transition: background 0.2s ease, color 0.2s ease;
}
.nav-links a:hover {
    color: #DF6434;
}

.mobile-nav-primary:hover {
    color: #DF6434;
}
    .logo {
        order: 2;
        flex: 1;
        justify-content: center;
    }

    .logo img { 
        height: 150px;
        width: auto; 
    }

    .mobile-new-recipe { 
        order: 1; 
        flex-shrink: 0;
     }

    .hamburger-btn { 
        order: 3; 
        flex-shrink: 0;
     }

    .search-bar-row {
        order: 4;
        width: 100%;
        flex-basis: 100%;
        flex: none;
        max-width: none;
        justify-content: flex-start;
        padding-left: 0;
        margin-top: 8px;
    }

    .search-bar { max-width: none; }
    .sidebar { display: none; }
    .page-wrapper { flex-direction: column; }

    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .carousel-track .recipe-card {
        flex: 0 0 calc(50% - 8px);
        min-width: calc(50% - 8px);
    }

    .messages-wrapper { flex-direction: column; }

    .messages-list {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #999;
        max-height: 250px;
    }

    .account-wrapper { flex-direction: column; }

    .account-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #999;
        padding: 10px 15px;
    }

    .account-main { padding: 15px; }
    .form-row { flex-direction: column; gap: 15px; }

    .modal-backdrop { padding: 10px; }
    .modal-body { flex-direction: column; }
    .modal-right { width: 100%; }
   


    .profile-banner {
        height: 200px;
    }

    .profile-bio-section {
        position: static;       
        width: 100%;
        flex-direction: column;  
        align-items: center;
        gap: 15px;
    }

    .profile-bio-section img {
        width: 150px;
        height: 150px;
    }

}


@media (max-width: 500px) {
    
    .hamburger-btn {
        width: 45px;
        height: 45px;
    }
    .mobile-new-button {
        width: 50px;
        height: 50px;
    }

    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .recipe-card .card-stars {
        justify-content: center;
    }

    .recipe-card .card-bottom {
        flex-direction: column-reverse;
        align-items: center;
        gap: 2px;
    }

    .recipe-card .card-title {
        text-align: center;
        white-space: normal;
        margin-right: 0;
    }

    .carousel-track .recipe-card {
        flex: 0 0 calc(50% - 6px);
        min-width: calc(50% - 6px);
    }

    .logo-img-placeholder { 
        width: 120px; 
        height: 120px;
        padding-bottom: 10px;
        margin-left: 15px;
     }

    .logo-fallback { 
        width: 50px; 
        height: 50px; 
        font-size: 32px;
     }
    
    .carousel-header h2 { font-size: 14px; }
    .carousel-header { gap: 8px; }

    .section-title {
        font-size: 15px;
    }
}

/* ===== for printing the modal recipe ===== */


@media print {
    /* Hide everything */
    body * {
        visibility: hidden;
        height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }

    /* Show the modal and its contents */
    #recipeModal,
    #recipeModal * {
        visibility: visible;
        height: auto;
        overflow: visible;
    }

    #recipeModal {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100% !important;
        background: none !important;
        padding: 0 !important;
    }

    .recipe-modal {
        box-shadow: none !important;
        border: none !important;
        max-height: none !important;
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Hide UI elements */
    .modal-top-bar button,
    .modal-actions,
    .modal-top-bar > div:first-child,
    .comment-bubble {
        display: none !important;
    }

    .modal-top-bar {
        justify-content: center !important;
        padding: 5px 15px !important;
        border-bottom: none !important;
    }

    .modal-recipe-image {
        margin-bottom: 5px !important;
    }

    .modal-recipe-image img {
        max-height: 220px !important;
        width: auto !important;
    }

    .modal-body {
        display: flex !important;
        flex-direction: row !important;
        gap: 15px;
        font-size: 11px !important;
        max-height: none !important;
        padding: 5px 15px !important;
    }

    .modal-left {
        flex: 1 !important;
    }

    .modal-right {
        width: 240px !important;
        flex-shrink: 0 !important;
    }

    .recipe-modal,
    .modal-body {
        page-break-inside: avoid !important;
    }

    @page {
        margin: 0.5in;
        size: auto;
    }
}