/* =========================================================
   HAMARAGAAM - COMMON STYLE
   ========================================================= */

:root {
    --primary: #8b4513;
    --primary-dark: #63300e;
    --accent: #d97706;
    --accent-light: #fff3df;
    --green: #3f6f3a;
    --cream: #fffaf1;
    --paper: #ffffff;
    --text: #34271f;
    --muted: #76685d;
    --border: #ead9c5;
    --shadow: 0 8px 24px rgba(79, 49, 23, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Poppins", "Segoe UI", Arial, sans-serif;
    background: linear-gradient(180deg, #fffaf3 0%, #f8f5ef 100%);
    color: var(--text);
}

a { color: inherit; }

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(92, 48, 19, 0.97);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 10px 28px;
    box-shadow: 0 3px 14px rgba(0,0,0,.18);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: "Merriweather", serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 50px;
}

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

.nav-links > a {
    color: #fff;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: .92rem;
}

.nav-links > a:hover { background: rgba(255,255,255,.13); }

.nav-register {
    background: #f59e0b !important;
    color: #3d230d !important;
    font-weight: 700;
}

.user-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 6px;
    font-size: .9rem;
}

.logout-btn {
    background: #a52d2d;
    color: #fff !important;
    padding: 7px 11px;
    border-radius: 6px;
    text-decoration: none;
}

.page-container {
    width: min(1500px, 94%);
    min-height: calc(100vh - 150px);
    margin: 0 auto;
    padding: 24px 0 45px;
}

.flash-container { margin-bottom: 18px; }

.flash-message {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.flash-message.success { background: #e9f7e7; color: #275b25; border-color: #c7e6c2; }
.flash-message.warning { background: #fff4d7; color: #77540a; border-color: #f0dc9a; }
.flash-message.danger,
.flash-message.error { background: #fde7e7; color: #7d2525; border-color: #efc0c0; }
.flash-message.info { background: #e5f1fb; color: #20577e; border-color: #c2dced; }

.flash-close {
    border: 0;
    background: transparent;
    font-size: 1.3rem;
    cursor: pointer;
    color: inherit;
}

/* ---------------- Footer ---------------- */

.site-footer {
    text-align: center;
    background: #5c3013;
    color: #fff;
    padding: 18px 10px;
    font-size: .86rem;
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-bottom: 8px;
    font-size: 1.15rem;
}

/* ---------------- Buttons ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 7px;
    padding: 10px 17px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: #f59e0b; color: #40240b; }
.btn-danger { background: #a52d2d; color: #fff; }
.btn-secondary { background: #eee7df; color: #4c3b2e; }

/* ---------------- Home common ---------------- */

.section-heading {
    text-align: center;
    margin: 32px 0 16px;
}

.section-heading h2 {
    margin: 0;
    font-family: "Merriweather", serif;
    color: var(--primary-dark);
}

.section-heading p {
    margin: 7px 0 0;
    color: var(--muted);
}

/* ---------------- Horizontal village gallery ---------------- */

.village-gallery-section {
    margin: 22px 0 28px;
    background: rgba(255,255,255,.78);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 17px 0 19px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.gallery-title {
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.gallery-title h2 {
    margin: 0;
    font-family: "Merriweather", serif;
    color: var(--primary-dark);
    font-size: 1.35rem;
}

.gallery-title span {
    color: var(--muted);
    font-size: .82rem;
}

.village-marquee {
    overflow: hidden;
    margin-top: 14px;
    width: 100%;
}

.village-track {
    display: flex;
    width: max-content;
    gap: 14px;
    will-change: transform;
}

.village-card {
    width: 260px;
    flex: 0 0 260px;
    background: #fff;
    border: 1px solid #eadcca;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(79,49,23,.08);
}

.village-card img {
    display: block;
    width: 100%;
    height: 155px;
    object-fit: cover;
}

.village-card-caption {
    padding: 8px 11px;
    font-size: .84rem;
    color: #5d4939;
    text-align: center;
}

.village-marquee:hover .village-track { animation-play-state: paused; }

/* ---------------- Home hero ---------------- */

/* =========================================================
   WELCOME BANNER - HEADING + BUTTONS IN ONE ROW
   ========================================================= */
/* =========================================================
   HOME HERO / WELCOME BANNER
   ========================================================= */

.welcome-banner {
    position: relative;
    min-height: 330px;

    border-radius: 15px;
    overflow: hidden;

    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.welcome-banner > img {
    width: 100%;
    height: 330px;

    object-fit: cover;
    display: block;
}

.welcome-banner::after {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
        90deg,
        rgba(40,21,10,.72),
        rgba(40,21,10,.20),
        rgba(40,21,10,.05)
    );
}


/* =========================================================
   WELCOME CONTENT
   ========================================================= */

.welcome-text {
    position: absolute;

    z-index: 2;

    left: 5%;
    top: 50%;

    transform: translateY(-50%);

    width: 90%;

    color: #fff;
}


/* =========================================================
   HEADING + BUTTONS - SAME ROW
   ========================================================= */

.welcome-top-row {
    display: flex !important;

    align-items: center !important;

    justify-content: flex-start !important;

    flex-wrap: nowrap !important;

    gap: 28px;

    width: 100%;
}


.welcome-top-row h1 {
    margin: 0;

    flex: 0 1 auto;

    font-family: "Merriweather", serif;

    font-size: clamp(1.7rem, 3vw, 3rem);

    line-height: 1.2;

    white-space: nowrap;
}


.welcome-top-row h1 span {
    color: #ffd27a;
}


/* =========================================================
   WELCOME BUTTONS
   ========================================================= */

.welcome-actions {
    display: flex !important;

    flex-direction: row !important;

    align-items: center !important;

    justify-content: flex-start !important;

    flex-wrap: nowrap !important;

    gap: 10px;

    flex: 0 0 auto;

    width: max-content;
}


.welcome-actions > a.btn {
    display: inline-flex !important;

    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: max-content;

    white-space: nowrap;

    margin: 0;
}


/* =========================================================
   LOGIN DROPDOWN
   ========================================================= */

.login-dropdown {
    position: relative;

    display: inline-block;

    flex: 0 0 auto;
}


.login-dropdown-btn {
    display: inline-flex !important;

    align-items: center;
    justify-content: center;

    gap: 7px;

    width: max-content;

    white-space: nowrap;

    margin: 0;
}


.login-chevron {
    font-size: 10px;

    margin-left: 3px;

    transition: transform 0.2s ease;
}


/* =========================================================
   LOGIN DROPDOWN MENU
   ========================================================= */

.login-dropdown-menu {
    position: absolute;

    top: 100%;
    right: 0;

    min-width: 190px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 7px;

    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);

    padding: 6px 0;

    z-index: 1000;

    display: none;
}


.login-dropdown:hover .login-dropdown-menu {
    display: block;
}


.login-dropdown-menu a {
    display: flex;

    align-items: center;

    gap: 11px;

    padding: 10px 15px;

    color: #374151;

    text-decoration: none;

    font-size: 13px;

    white-space: nowrap;
}


.login-dropdown-menu a i {
    width: 17px;

    text-align: center;

    color: #4f46e5;
}


.login-dropdown-menu a:hover {
    background: #f3f4f6;

    color: #111827;
}


.login-dropdown:hover .login-chevron {
    transform: rotate(180deg);
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.welcome-description {
    margin: 14px 0 0;

    max-width: 700px;

    font-size: 1.02rem;

    line-height: 1.6;

    color: #fff;
}

/* ---------------- Home actions ---------------- */

.action-and-banner {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    align-items: stretch;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 13px;
    flex: 1.7;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 125px;
    aspect-ratio: 1 / 1;
    padding: 15px 8px;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    background: linear-gradient(
        180deg,
        #c65d0b,
        #9a3412
    );
    border: 1px solid #8f2f0f;
    border-radius: 9px;
    box-shadow: 0 3px 9px rgba(0,0,0,.12);
    transition: transform .15s ease, box-shadow .15s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 9px 20px rgba(0,0,0,.12);
}

.grid-icon {
    color: #ffd27a;
    font-size: 27px;
    margin-bottom: 6px;
}

.grid-label {
    font-weight: 600;
    font-size: .9rem;
    color: #ffffff;
}

.grid-description {
    margin-top: auto;
    margin-bottom: auto;
    padding: 0 5px;
    font-size: .70rem;
    line-height: 1.35;
    color: #fff3df;
    text-align: center;
    max-width: 190px;
}

.display-banner {
    flex: .9;
    min-width: 245px;
    background: linear-gradient(180deg, #fffdf7, #fff5e8);
    border-radius: 10px;
    padding: 14px;
    border-top: 4px solid #f57c00;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.banner-image img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 7px;
}

.banner-content h4 {
    margin: 9px 0 6px;
    color: #6b2f00;
}

.banner-content p {
    margin: 6px 0;
    font-size: .9rem;
    color: #4b2e05;
}

.banner-placeholder {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #a17b52;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1200px) {
    .quick-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 850px) {
    .main-header { align-items: flex-start; flex-direction: column; }
    .nav-links { width: 100%; }
    .action-and-banner { flex-direction: column; }
    .quick-grid { grid-template-columns: repeat(3, 1fr); }
    .display-banner { min-width: 0; }
}

@media (max-width: 520px) {
    .page-container { width: 96%; }
    .welcome-banner, .welcome-banner > img { min-height: 290px; height: 290px; }
    .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
    .grid-item { min-height: 115px; }
    .village-card { width: 220px; flex-basis: 220px; }
    .village-card img { height: 135px; }
}

