/* =========================================================
   The Melon Men - site styles
   Change the colours here and they update everywhere.
   ========================================================= */
:root {
    --green: #4CAF50;
    --green-dark: #45a049;
    --orange: #ff6b35;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --radius: 15px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* keeps section titles from hiding under the fixed header */
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
}

a { color: inherit; }

.container { max-width: 1200px; margin: 0 auto; }

section { padding: 4rem 2rem; position: relative; }

/* ---------- Header / navigation ---------- */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    color: var(--white);
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.nav-links { display: flex; list-style: none; gap: 0.5rem; }

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: background 0.3s;
}

.nav-links a:hover,
.nav-links a.active { background: rgba(255, 255, 255, 0.2); color: var(--white); }

/* ---------- Rotating background photos ---------- */
.slideshow { position: absolute; inset: 0; z-index: 0; overflow: hidden; }

.slideshow img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slideshow img.active { opacity: 1; }

.slideshow::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); }

.on-photo > .container,
.on-photo > .hero-content { position: relative; z-index: 1; }

.on-photo .section-title,
.on-photo .section-subtitle { color: var(--white); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }

/* ---------- Shared bits ---------- */
.section-header { text-align: center; margin-bottom: 3rem; }

.section-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }

.section-subtitle { font-size: 1.1rem; color: var(--text-light); max-width: 600px; margin: 0 auto; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    background: var(--green);
    color: var(--white);
    box-shadow: var(--shadow);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

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

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.fade-in-up { animation: fadeInUp 0.6s ease-out; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Home: hero ---------- */
.hero { padding: 8rem 2rem 4rem; text-align: center; color: var(--white); overflow: hidden; }

.hero h1 { font-size: 3.5rem; font-weight: 700; margin-bottom: 1rem; text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5); }

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* ---------- Home: about ---------- */
.feature-card { padding: 2rem; text-align: center; }

.feature-card i { color: var(--green); font-size: 2rem; display: block; margin: 1.5rem 0; }

.feature-card h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 1rem; }

.feature-card p { color: var(--text-light); }

.newcomer-banner {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: var(--white);
    padding: 2rem 3rem;
    border-radius: var(--radius);
    margin-top: 3rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.newcomer-banner h3 { font-size: 1.5rem; }

/* ---------- Home: our story ---------- */
.story-card { padding: 2rem; background: rgba(255, 255, 255, 0.95); }

.story-card h3 { color: var(--green); font-size: 1.4rem; font-weight: 600; margin-bottom: 1rem; }

.story-card p { font-size: 0.95rem; }

.milestones-title { text-align: center; color: var(--white); margin: 4rem 0 2rem; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }

.milestones-title h3 { font-size: 2rem; }

.milestone { padding: 1.5rem; display: flex; gap: 1rem; align-items: flex-start; }

.milestone-icon {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.milestone h4 { font-size: 1.1rem; margin-bottom: 0.3rem; }

.milestone p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 0.6rem; }

.tag {
    display: inline-block;
    background: var(--green);
    color: var(--white);
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ---------- Home: gallery carousel ---------- */
.carousel { position: relative; padding: 2rem 2rem 1rem; overflow: hidden; }

.carousel-slide { display: none; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; padding: 0 2rem; }

.carousel-slide.active { display: grid; animation: fadeInUp 0.5s ease-out; }

.carousel-slide img { width: 100%; height: 320px; object-fit: cover; border-radius: 10px; }

.carousel-slide h3 { font-size: 1.8rem; margin-bottom: 1rem; }

.carousel-slide p { color: var(--text-light); margin-bottom: 1.5rem; }

.carousel-slide .tag { text-transform: uppercase; padding: 0.5rem 1.4rem; font-weight: 600; letter-spacing: 0.5px; }

.carousel-btn {
    position: absolute;
    top: 45%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 2;
}

.carousel-btn.prev { left: 1rem; }
.carousel-btn.next { right: 1rem; }

.carousel-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; }

.carousel-dots button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #bbb;
    cursor: pointer;
}

.carousel-dots button.active { background: var(--green); transform: scale(1.3); }

.center { text-align: center; margin-top: 2.5rem; }

/* ---------- Home: community ---------- */
.social-links { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }

.social-links a {
    background: var(--white);
    color: var(--text-dark);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.3s, color 0.3s;
}

.social-links a:hover { transform: translateY(-5px) scale(1.05); color: var(--green); }

/* ---------- Footer ---------- */
.footer { background: var(--text-dark); color: var(--white); padding: 3rem 2rem 1.5rem; text-align: center; }

.footer-copyright { color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; }

.footer-copyright a { color: var(--green); text-decoration: none; }

.footer-columns {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-columns h3,
.footer-columns h4 { color: var(--green); margin-bottom: 1rem; }

.footer-columns ul { list-style: none; }

.footer-columns li { margin-bottom: 0.4rem; }

.footer-columns a { text-decoration: none; color: rgba(255, 255, 255, 0.85); }

.footer-columns a:hover { color: var(--green); }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 1.5rem; }

/* ---------- Gallery page ---------- */
.page-header {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 50%, var(--orange) 100%);
    color: var(--white);
    padding: 8rem 2rem 4rem;
    text-align: center;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 12px, transparent 13px) 0 0 / 82px 82px;
}

.page-header > * { position: relative; }

.page-header h1 { font-size: 3.5rem; text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3); }

.page-header p { font-size: 1.2rem; margin-bottom: 1.5rem; }

.breadcrumb { font-size: 0.95rem; opacity: 0.9; }

.breadcrumb a { text-decoration: none; }

.filters { padding: 1.5rem 2rem; display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

.filters button {
    background: var(--bg-light);
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: 25px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
}

.filters button.active,
.filters button:hover { background: var(--green); color: var(--white); }

.photo-area { background: var(--bg-light); }

.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }

.photo { overflow: hidden; }

.photo img { width: 100%; height: 250px; object-fit: cover; display: block; cursor: zoom-in; }

.photo-info { padding: 1.5rem; }

.photo-info h3 { font-size: 1.3rem; font-weight: 600; }

.photo-category { color: var(--green); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin: 0.4rem 0 0.8rem; }

.photo-info p { color: var(--text-light); font-size: 0.95rem; }

.photo-date { display: inline-block; margin-top: 1rem; background: var(--bg-light); padding: 0.3rem 0.8rem; border-radius: 15px; font-size: 0.85rem; }

.photo-date i { color: var(--green); margin-right: 0.3rem; }

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
    color: var(--white);
    text-align: center;
}

.lightbox.open { display: flex; }

.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 8px; }

.lightbox h3 { margin-top: 1rem; }

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 2rem;
    font-size: 3rem;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
}

/* ---------- Wiki ---------- */
.wiki-top { position: relative; }

.wiki-top .slideshow { position: fixed; }
.wiki-top .slideshow::after { background: rgba(0, 0, 0, 0.25); }

.wiki-hero {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding-top: 8rem;
}

.wiki-hero h1 { font-size: 3.5rem; text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5); }

.wiki-hero p { font-size: 1.2rem; margin-bottom: 1.5rem; text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6); }

.search-box {
    display: flex;
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 50px;
    padding: 0.4rem 0.4rem 0.4rem 1.5rem;
    box-shadow: var(--shadow-hover);
}

.search-box input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 1rem; }

.search-box span {
    background: var(--green);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wiki-categories .section-title {
    display: table;
    margin: 0 auto 2rem;
    color: var(--white);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.4rem 1.2rem;
    border-radius: 8px;
    font-size: 1.8rem;
}

.category { padding: 1.5rem; background: rgba(255, 255, 255, 0.93); }

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.category h3 { font-size: 1.3rem; font-weight: 600; }

.category > p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 0.8rem; }

.guide-list { list-style: none; font-size: 0.95rem; }

.guide-list a { color: var(--green); font-weight: 500; text-decoration: none; }

.guide-list a:hover { text-decoration: underline; }

.guide-list .empty { color: var(--text-light); font-style: italic; }

.no-results { display: none; text-align: center; color: var(--white); margin-top: 2rem; font-size: 1.1rem; }

.quick-start {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.85), rgba(69, 160, 73, 0.85));
    text-align: center;
    color: var(--white);
}

.quick-start h2 { font-size: 2.5rem; }

.quick-start p { font-size: 1.1rem; margin-bottom: 2rem; }

.quick-links { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

.quick-links a {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.quick-links a:hover { background: rgba(255, 255, 255, 0.35); }

/* ---------- Wiki article pages ---------- */
.article { max-width: 850px; margin: 0 auto; padding: 2.5rem; }

.article-meta { color: var(--text-light); font-size: 0.9rem; margin-bottom: 2rem; }

.article h2 { margin: 2rem 0 0.8rem; }
.article h3 { margin: 1.5rem 0 0.6rem; }
.article p, .article ul, .article ol { margin-bottom: 1rem; }
.article ul, .article ol { padding-left: 1.5rem; }
.article img { max-width: 100%; border-radius: 8px; }

.video { position: relative; padding-bottom: 56.25%; margin: 1.5rem 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }

/* ---------- Phones and small screens ---------- */
@media (max-width: 900px) {
    .grid-3, .footer-columns { grid-template-columns: 1fr; }
    .photo-grid { grid-template-columns: 1fr; }
    .carousel-slide.active { grid-template-columns: 1fr; }
    .hero h1, .page-header h1, .wiki-hero h1 { font-size: 2.4rem; }
    .section-title { font-size: 2rem; }
}

@media (max-width: 640px) {
    .nav-container { flex-direction: column; gap: 0.5rem; }
    .nav-links { gap: 0; flex-wrap: wrap; justify-content: center; }
    .nav-links a { padding: 0.3rem 0.7rem; font-size: 0.9rem; }
    html { scroll-padding-top: 110px; }
    .hero, .page-header { padding-top: 10rem; }
    .newcomer-banner { padding: 2rem; }
}
