/* Import Assistant Font */
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@200;300;400;500;600;700;800&family=Droid+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
  --color-bg: #F0F0ED;          /* R240 G240 B237 */
  --color-surface: #FFFFFF;      /* clean white cards/sections */
  --color-text: #000000;         /* black text for readability */
  --color-brand: #C02C30;        /* R192 G44 B48 - red only for branding */
  --color-muted: #EDEDEA;        /* subtle borders/fills */
  --color-primary: #FFFFFF;      /* primary buttons light */
  --color-primary-contrast: #000000; /* black text on primary */
  --color-accent: #F0F0ED;       /* light gray accents */
  --color-accent-contrast: #000000;  
  --overlay-hover: rgba(0,0,0,0.05);
}

.nav a.active {
    color: var(--color-accent, #ff6600);
    font-weight: 600;
    position: relative;
}
.nav a.active::after {
    content: '';
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.2rem;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Assistant', sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
  background: var(--color-surface);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-accent);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  padding: 15px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    min-height: 60px;
    padding: 5px 0;
}

.brand:hover {
    transform: translateY(-1px);
}

.logo-container {
    display: flex;
    align-items: center;
    width: 50px;
    height: 50px;
}

.logo {
    height: 50px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    background: transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: block;
}

.logo:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.logo-fallback {
    width: 50px;
    height: 50px;
    background: var(--color-brand);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.logo-text {
    color: white;
    font-weight: bold;
    font-size: 18px;
    font-family: 'Droid Serif', serif;
}

.logo-fallback:hover {
    transform: scale(1.05);
    background: #a02327;
}

/* Fallback wenn Logo nicht lädt */
.logo[alt]:before {
    content: attr(alt);
    display: inline-block;
    background: var(--color-brand);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
}

.brand-text h1 {
    font-family: 'Droid Serif', serif;
    font-size: 2rem;
    font-weight: 400;
    margin: 0;
    color: var(--color-text);
}

.brand-text span {
    font-family: 'Droid Serif', serif;
    font-size: 0.9rem;
    opacity: 0.9;
    color: #b07b35;
}

.nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav a {
    color: var(--color-text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Assistant', sans-serif;
    font-weight: 500;
}

.nav a:hover {
    background: var(--overlay-hover);
    color: var(--color-text);
}
/* Logout link only visible when logged in (JS also toggles for safety) */
.logout-link { display:inline-block; }
body:not(.logged-in) .logout-link { display:none !important; }

/* Main Content */
main {
    min-height: 70vh;
    padding: 2rem 0;
}

.section {
    display: none;
    animation: fadeIn 0.3s ease-in;
    padding: 3rem 0;
}

.section.active {
    display: block;
}

.section > h2 {
    text-align: center;
    margin: 0 0 3rem 0;
    color: var(--color-text);
    font-family: 'Droid Serif', serif;
    font-weight: 400;
    font-size: 3rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--color-muted);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--color-surface);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(189, 195, 199, 0.3);
    margin: 2rem 0;
}

.hero h2 {
    font-family: 'Droid Serif', serif;
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--color-text);
    font-weight: 400;
}

.hero p {
    font-family: 'Assistant', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Feature Cards on Home */
.feature-cards {
        display: grid;
        /* Fixed 3 columns on laptop/desktop as requested */
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        margin: 3rem 0 1rem;
}
/* 2 columns on smartphones */
@media (max-width: 640px) {
    .feature-cards { grid-template-columns: repeat(2, 1fr); }
}

.feature-card, .home-gallery-card {
    background: var(--color-surface);
    border: 1px solid #e1e1de;
    border-radius: 15px;
    /* Increased vertical padding ~20% (2rem -> 2.4rem) */
    padding: 2.4rem 1.5rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all .3s ease;
}

/* Make entire card link appear as plain black (no underline, no visited color change) */
.feature-card { text-decoration: none; color: #000; }
.feature-card:link,
.feature-card:visited,
.feature-card:hover,
.feature-card:active { text-decoration: none; color:#000; }
.feature-card h3 { color:#000; text-decoration:none; }

/* Classic Art card with background image and translucent white bar behind heading */
.feature-card[data-bg-key="classic-art"] {
    background-image: url('/data/ClassicArt.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #000;
}
.feature-card[data-bg-key="search"] {background-image:url('/data/Search.jpg');background-size:cover;background-position:center;}
.feature-card[data-bg-key="holidays"] {background-image:url('/data/Holidays%20%26%20Special%20Events.jpg');background-size:cover;background-position:center;}
.feature-card[data-bg-key="all-seasons"] {background-image:url('/data/AllSeasons.jpg');background-size:cover;background-position:center;}
.feature-card[data-bg-key="floral"] {background-image:url('/data/Floral.jpg');background-size:cover;background-position:center;}
.feature-card[data-bg-key="photos"] {background-image:url('/data/Photos.jpg');background-size:cover;background-position:center;}
.feature-card[data-bg-key="colors"] {background-image:url('/data/Colors.jpg');background-size:cover;background-position:center;}
.feature-card[data-bg-key="thema-area"] {background-image:url('/data/Theme%20Area.jpg');background-size:cover;background-position:center;}
.feature-card[data-bg-key="inspired"] {background-image:url('/data/Inspiredby.jpg');background-size:cover;background-position:center;}
.feature-card[data-bg-key="free"] {background-image:url('/data/FreePics.jpg');background-size:cover;background-position:center;}

/* Shared background style heading bar */
.feature-card-bg h3 {display:block;background:rgba(255,255,255,0.8);padding:2px 0;margin:0 -1.5rem 0.75rem;width:calc(100% + 3rem);} 

/* Help card full-row variant */
.feature-card-help {grid-column:1 / -1; padding:1.4rem 1.5rem;}
.feature-card-help h3 {margin:0;}
/* initial rule kept minimal; full-width bar handled later to override generic h3 margins */
.feature-card[data-bg-key="classic-art"] h3 {
    display:block;
    background: rgba(255,255,255,0.8);
    padding:2px 0;
    margin:0 -1.5rem; /* extend over horizontal padding to reach card edges */
}

.feature-card:before, .home-gallery-card:before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg, rgba(253,209,35,0.15), rgba(253,209,35,0));
    opacity: 0;
    transition: opacity .35s ease;
}

.feature-card:hover, .home-gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);
}

.feature-card:hover:before, .home-gallery-card:hover:before { opacity: 1; }

.feature-card h3 {
    font-family: 'Droid Serif', serif;
    font-weight: 400;
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}
/* Ensure Classic Art bar stays flush (override margin-bottom if applied) */
.feature-card[data-bg-key="classic-art"] h3 { margin-bottom:0.75rem; }

.feature-card .placeholder {
        font-size: 0.95rem;
        color: #444;
        opacity: 0.8;
}

/* Full-width Gallery Access Card */
.home-gallery-card { margin: 2rem 0 0; cursor: pointer; }
.home-gallery-card h3 { font-family: 'Droid Serif', serif; font-weight:400; font-size:2rem; margin-bottom:0.75rem; }
.home-gallery-card p { max-width:760px; margin:0 auto; font-size:1.05rem; }
.home-gallery-card:focus { outline:3px solid rgba(253,209,35,0.7); outline-offset:4px; }

/* Post-auth features container hidden by default */
.post-auth-features { display:none; }

@media (max-width:768px){
    .home-gallery-card h3 { font-size:1.6rem; }
    .home-gallery-card { padding:1.8rem 1.4rem; }
}

@media (max-width: 768px) {
    .feature-card { padding: 1.6rem 1.2rem; }
    .feature-card h3 { font-size: 1.25rem; }
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2.5rem;
    padding: 0 1rem;
}

/* Hide CTA buttons when logged in */
body.logged-in .cta-buttons { display: none !important; }
body.logged-in #homeSignupBtn, body.logged-in #homeLoginBtn { display: none !important; }

/* Profile */
.profile-card { background: var(--color-surface); padding:2rem; border-radius:16px; box-shadow:0 4px 18px rgba(0,0,0,0.08); max-width:600px; margin:0 auto; }
.profile-card h3 { margin:1.5rem 0 0.75rem; font-family:'Droid Serif',serif; }
.profile-card input { width:100%; padding:0.75rem 1rem; margin:0.4rem 0; border:1px solid var(--color-muted); border-radius:10px; font-family:'Assistant',sans-serif; }
.profile-card button { margin-top:0.6rem; }
.profile-info p { margin:0.3rem 0; }
.password-update { margin-top:1rem; }

/* Buttons */
.btn {
    padding: 12px 26px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Assistant', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
}

.btn.primary {
    background: rgb(253,209,35);
    color: var(--color-text);
}

.btn.primary:hover {
    background: rgb(226,191,16);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226,191,16,0.3);
}

.btn.secondary {
    background: rgb(253,209,35);
    color: var(--color-text);
}

.btn.secondary:hover {
    background: rgb(226,191,16);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226,191,16,0.3);
}

/* Forms */
.form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--color-surface);
    border: 1px solid #e1e1de;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.15);
    backdrop-filter: blur(10px);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-text);
    font-family: 'Droid Serif', serif;
    font-weight: 400;
    font-size: 2.5rem;
}

.form-container p {
    margin-top: 2rem; /* Mehr Abstand für "No account yet?" Text */
    text-align: center;
    color: var(--color-text);
    font-family: 'Assistant', sans-serif;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text);
    font-family: 'Assistant', sans-serif;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--color-accent);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Assistant', sans-serif;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--color-text);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: rgb(253,209,35); /* Gelb statt rot */
    box-shadow: 0 0 0 3px rgba(253,209,35,0.25);
}

/* Gallery */
.gallery-controls {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Centered gallery title styling */
.gallery-title { text-align:center; font-family:'Droid Serif', serif; font-size:3.2rem; font-weight:400; margin:2rem 0 0.75rem; }
.gallery-title-separator { width:60%; max-width:800px; height:1px; background:#777; margin:0.5rem auto 2rem; opacity:0.9; }

.search-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-bar input,
.search-bar select {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-controls label {
    font-weight: 500;
    color: var(--color-text);
}

.pagination-controls select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--color-surface);
    color: var(--color-text);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.pagination button {
    padding: 10px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    border-color: rgba(253,209,35,0.5);
    background: rgba(253,209,35,0.1);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pageInfo {
    font-weight: 500;
    color: var(--color-text);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Multi-selection additions */
.image-card { cursor: pointer; }
.image-card.selected { outline: 3px solid rgb(253,209,35); outline-offset: 0; }
.select-badge {
    position:absolute; top:8px; right:8px; width:28px; height:28px; border-radius:6px;
    background:rgba(0,0,0,0.55); color:#fff; display:flex; align-items:center; justify-content:center;
    font-size:16px; font-weight:600; cursor:pointer; z-index:3; user-select:none; transition:background .2s;
}
.select-badge[aria-pressed="true"] { background: rgb(253,209,35); color:#000; }
.select-badge:focus { outline:3px solid rgb(253,209,35); outline-offset:2px; }
.selection-rect { position:fixed; border:2px dashed rgb(253,209,35); background:rgba(253,209,35,0.15); pointer-events:none; z-index:1000; }

/* Download button disabled */
#downloadBtn[disabled], #downloadBtn[aria-disabled="true"] { opacity:.5; cursor:not-allowed; }

/* Centered lightbox title helper */
.lightbox-title-centered { text-align:center; width:100%; }

/* Fixed download bar for selection */
.download-bar { position:fixed; left:50%; transform:translateX(-50%); bottom:16px; display:flex; gap:1rem; background:rgba(255,255,255,0.92); padding:1rem 1.4rem; border-radius:18px; box-shadow:0 10px 26px rgba(0,0,0,0.28); backdrop-filter:blur(14px); z-index:3000; border:1px solid rgba(0,0,0,0.08); }
.download-bar .btn { color:#000; }

/* Categories */
.categories-region { margin:1.25rem 0 1rem; }
/* Scroll container limiting visible area to 6 columns x 3 rows */
.categories-scroll { overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; padding-bottom:.3rem; }
/* Column-major ordering: fill top-to-bottom (3 rows) then new column to the right. Extra columns extend horizontally (user can swipe/scroll). */
.categories-grid { display:grid; grid-auto-flow:column; grid-template-rows:repeat(3,auto); grid-auto-columns:150px; gap:.5rem .75rem; align-items:start; }
/* Ensures at most 6 columns visible without horizontal scroll at common desktop widths; additional columns produce natural scroll */

    /* Legacy hero CTA removal kept in header inline styles now */
@media (min-width:1100px){ .categories-scroll { max-width:100%; } }
.category-item { background:#fff; border:1px solid var(--color-accent); border-radius:10px; padding:.45rem .6rem; font-size:.75rem; line-height:1.15; cursor:pointer; display:flex; align-items:center; gap:.4rem; position:relative; font-weight:500; min-height:54px; }
.category-item:hover { background:#f7f7f5; }
.category-item:focus { outline:3px solid rgb(253,209,35); outline-offset:2px; }
.category-item[aria-selected="true"] { background:rgb(253,209,35); border-color:rgb(253,209,35); color:#000; }
.category-item .count { font-size:.65rem; background:#000; color:#fff; padding:2px 5px; border-radius:6px; }
.categories-drill > .level-block { margin-top:.5rem; padding-top:.25rem; border-top:1px solid #ddd; }
.categories-breadcrumb { font-size:.7rem; margin-bottom:.4rem; color:#555; display:flex; flex-wrap:wrap; gap:.3rem; }
.categories-breadcrumb span { cursor:pointer; }
.categories-breadcrumb span:hover { text-decoration:underline; }
.download-bar .btn { margin:0; font-size:.9rem; }
.download-bar .cancel-selection { background:#444; color:#fff; }
.download-bar .cancel-selection:hover { background:#666; }
.download-bar[aria-hidden="true"] { pointer-events:none; }

/* Lightbox */
.lightbox { position:fixed; inset:0; background:rgba(0,0,0,0.85); display:none; align-items:center; justify-content:center; z-index:2000; }
.lightbox.open { display:flex; }
.lightbox-content { position:relative; max-width:90vw; max-height:90vh; display:flex; flex-direction:column; gap:1rem; }
/* New white top bar similar to header */
.lightbox-topbar { position:fixed; top:0; left:0; right:0; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,0.95); backdrop-filter:blur(8px); border-bottom:1px solid var(--color-accent); padding:10px 30px; z-index:2500; }
.lightbox-brand-centered { display:flex; align-items:center; gap:0.4rem; }
.lightbox-topbar .logo { height:40px; }
.brand-lightbox { font-size:1.6rem; margin:0; font-weight:400; letter-spacing:.5px; }
/* Title overlay over image */
.lightbox-image-title { position:absolute; top:-2px; left:50%; transform:translateX(-50%); background:transparent; color:#fff; font-size:1.05rem; font-weight:500; text-shadow:0 2px 5px rgba(0,0,0,0.55); padding:2px 10px; border-radius:6px; pointer-events:none; white-space:nowrap; }
.lightbox-inner { padding-top:60px; }
.lightbox-inner { position:relative; display:flex; align-items:center; justify-content:center; }
.lightbox-inner img { max-width:80vw; max-height:70vh; border-radius:8px; box-shadow:0 0 20px rgba(0,0,0,0.5); }
.lb-nav { background:rgba(0,0,0,0.5); color:#fff; border:none; width:48px; height:48px; font-size:24px; cursor:pointer; border-radius:8px; display:flex; align-items:center; justify-content:center; margin:0 1rem; }
.lb-nav:hover { background:rgba(0,0,0,0.7); }
.lightbox-toolbar { display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; }
.lightbox-toolbar .btn[aria-pressed="true"] { background:#000; color:#fff; }

.image-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid #e1e1de;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.image-card:hover {
    box-shadow: 0 14px 28px rgba(0,0,0,0.08);
}

.image-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.image-card .image-info {
    padding: 15px;
}

.image-card .image-title {
    font-family: 'Assistant', sans-serif;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--color-text);
    /* Adjusted to 1rem per latest request */
    font-size: 1rem !important;
}

.image-card .image-keywords {
    font-family: 'Assistant', sans-serif;
    font-size: 6pt; /* explicit 6pt as requested */
    color: #999; /* light gray */
    font-style: italic;
    line-height: 1.2;
    margin: 2px 0 6px 0;
    word-break: break-word;
}

.image-card .image-folder {
    font-family: 'Assistant', sans-serif;
    font-size: 0.8rem;
    color: var(--color-text);
}

.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    background: white;
    transform: scale(1.1);
}

.favorite-btn.favorited {
    color: #e74c3c;
    background: white;
}

/* Admin */
.admin-controls {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-list {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.admin-item {
    display: grid;
    grid-template-columns: 1fr 2fr 3fr auto;
    gap: 15px;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.admin-item:last-child {
    border-bottom: none;
}

.admin-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.admin-item input[type="text"] {
    padding: 8px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    width: 100%;
}

.admin-item .save-btn {
    padding: 6px 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.admin-item .save-btn:hover {
    background: #218838;
}

/* Legal Content */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    line-height: 1.6;
}

.legal-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    color: var(--color-text);
    font-weight: 600;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--color-muted);
    padding-bottom: 0.5rem;
}

.legal-content h3:first-child {
    margin-top: 0;
}

.legal-content p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    color: var(--color-text);
}

.legal-content ul {
    margin: 1rem 0 1.5rem 0;
    padding-left: 2rem;
    list-style-type: disc;
}

.legal-content li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: var(--color-text);
    padding-left: 0.5rem;
}

.legal-content li strong {
    font-weight: 600;
    color: var(--color-text);
}

.legal-content ul ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    list-style-type: circle;
}

.legal-content ul ul li {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: linear-gradient(90deg, rgb(226,191,16) 0%, rgb(253,209,35) 100%); 
    color: var(--color-text); /* black text in footer */
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    font-family: 'Assistant', sans-serif;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-content span {
    font-weight: 500;
}

.footer-content a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.footer-content a:hover {
    opacity: 0.7;
}

.footer-divider {
    color: var(--color-text);
    opacity: 0.6;
    font-weight: 300;
}

/* Flash Messages */
.flash-message {
    padding: 12px 20px;
    margin: 10px 0;
    border-radius: 8px;
    font-weight: 500;
}

.flash-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.info {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #9fcdff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo-container {
        width: 40px;
        height: 40px;
    }
    
    .logo {
        height: 40px;
        max-width: 100px;
    }
    
    .logo-fallback {
        width: 40px;
        height: 40px;
    }
    
    .brand-text h1 {
        font-size: 1.6rem;
    }

    .nav {
        justify-content: center;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .section > h2 {
        font-size: 2.2rem;
        margin-bottom: 2rem;
        padding-bottom: 0.5rem;
    }

    .section {
        padding: 2rem 0;
    }

    .search-bar {
        flex-direction: column;
    }

    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .admin-item {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        padding: 11px 22px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo-container {
        width: 35px;
        height: 35px;
    }
    
    .logo {
        height: 35px;
        max-width: 80px;
    }
    
    .logo-fallback {
        width: 35px;
        height: 35px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .brand-text h1 {
        font-size: 1.4rem;
    }
    
    .brand {
        gap: 0.5rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .form-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
