/* =========================
   Reset and global styles
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #f6ecd6;
    color: #4b341d;
    font-family: "Noto Sans Devanagari", Arial, sans-serif;
    overflow-x: hidden;
    padding-bottom: 63px;
}

img {
    display: block;
    max-width: 100%;
}

button,
a,
input,
textarea {
    font: inherit;
}

button,
a {
    transition: 0.3s ease;
}

/* =========================
   Navbar
========================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 82px;
    padding: 0 55px;
    background: #f9efd9;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
}

.logo h2 {
    color: #21470f;
    font-size: 22px;
}

.logo p {
    font-size: 10px;
    font-weight: 700;
}

nav {
    display: flex;
    gap: 28px;
}

nav a {
    color: #4a3a27;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

nav a:hover {
    color: #31580f;
}

.login-btn {
    padding: 13px 24px;
    border: 0;
    border-radius: 30px;
    background: #31580f;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.login-btn:hover {
    background: #26470c;
}

/* =========================
   Hero section
========================= */
.hero {
    position: relative;
    min-height: calc(100vh - 82px);
    padding: 82px 55px 55px;
    background-image:linear-gradient(rgba(251, 240, 216, 0.08), rgba(234, 215, 175, 0.08));
    background-position: center;
    background-size: cover;
    width: 100%;
    padding-top: 82px;
}
.hero-bg{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.hero-bg img{
    width: 100%;
    height: 100%;
    object-position:top center;
    object-fit:cover;
}
.hero-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.hero-left {
    flex: 1;
}

.title-box {
    margin-top: 55px;
}

.title-box p {
    font-size: 27px;
    font-weight: 700;
}

.title-box h1 {
    color: #5a341d;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.1;
}

.title-box h3 {
    margin-top: 8px;
    color: #6f5a3e;
    font-size: 22px;
}

.line {
    width: 220px;
    height: 2px;
    background: #b98945;
}

.count-card {
    display: flex;
    align-items: center;
    gap: 18px;
    width: min(100%, 330px);
    margin-top: 40px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.count-card .icon {
    display: grid;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    background: #31580f;
    color: #ffffff;
    font-size: 28px;
}

.count-card p {
    margin-bottom: 4px;
    color: #35591b;
    font-size: 13px;
    font-weight: 700;
}

.count-card h2 {
    color: #5a341d;
    font-size: 34px;
}

.flowers {
    height: 70px;
    margin-top: -55px;
    background: radial-gradient(circle, #b0162d 20%, transparent 22%);
    background-size: 28px 22px;
}

/* =========================
   Live tribute panel
========================= */
.live-panel {
    width: min(100%, 355px);
    overflow: hidden;
    border: 1px solid #eadcc6;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    padding: 17px 22px;
    background: #31580f;
    color: #ffffff;
    font-weight: 700;
}

#liveTributes {
    max-height: 360px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #0b7d3b #f1f1f1;
}

#liveTributes::-webkit-scrollbar {
    width: 6px;
}

#liveTributes::-webkit-scrollbar-track {
    border-radius: 10px;
    background: #f1f1f1;
}

#liveTributes::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #0b7d3b;
}

#liveTributes::-webkit-scrollbar-thumb:hover {
    background: #06632e;
}

.person {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 70px;
    padding: 14px 20px;
    border-bottom: 1px solid #eadcc6;
}

.person:last-child {
    border-bottom: 0;
}

.person span {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: #825018;
    color: #ffffff;
    font-weight: 700;
}

.person b {
    font-size: 14px;
}

.person p {
    display: flex;
    align-items: center;
    margin: 4px 0 0;
    font-size: 12px;
}

.person p img {
    width: 20px;
    height: 20px;
}

.person small {
    margin-left: auto;
    color: #8b7b65;
    font-size: 11px;
    white-space: nowrap;
}

.view-more {
    width: 100%;
    padding: 16px;
    border: 0;
    background:
        radial-gradient(circle at center, rgba(211, 177, 111, 0.25), transparent 35%),
        linear-gradient(to bottom, #fbf0d8, #ead7af);
    color: #5b4528;
    font-weight: 700;
    cursor: pointer;
}

.view-more:hover {
    filter: brightness(0.97);
}

/* =========================
   Thanks and statistics
========================= */
.thanks-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-top: 48px;
}

.tribute-left-box,
.tribute-right-box {
    width: 40%;
}

.thanks-card {
    padding: 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.thanks-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.check {
    position: relative;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    background: #31580f;
    color: #ffffff;
}

.check::after {
    content: "✓";
}

.thanks-card h3 {
    margin: 0;
    color: #35591b;
    text-align: center;
    font-size: 22px;
}

.thanks-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    padding: 18px;
    border: 1px solid #eadcc6;
    border-radius: 12px;
    background: #fff9ee;
}

.thanks-user {
    padding-right: 15px;
    border-right: 1px solid #eadcc6;
}

.thanks-user:last-child {
    padding-right: 0;
    border-right: 0;
}

.thanks-info span {
    display: block;
    color: #8d7d66;
    font-size: 11px;
}

.thanks-user-wrap,
.thanks-user-map-cnt,
.share-row,
.socials {
    display: flex;
    align-items: center;
}

.thanks-user-wrap {
    gap: 10px;
}

.thanks-user-map-cnt {
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
}

.thanks-user-map-cnt .state-map {
    flex-shrink: 0;
    width: 100px;
    height: 60px;
    object-fit: contain;
}

.map {
    display: grid;
    place-items: center;
    border: 0 !important;
    font-size: 36px;
}

.share-row {
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 18px;
    padding: 0 12px;
}

.share-row p {
    margin-bottom: 0;
    color: #fff6df;
    font-weight: 700;
}

.socials {
    gap: 6px;
}

.socials img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.certificate-btn,
.landing-btn,
.direction-btn {
    text-decoration: none;
}

.certificate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    border: 0;
    border-radius: 8px;
    background: #31560f;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}

.certificate-btn:hover {
    background: #26470c;
    color: #ffffff;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
}

.stats-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px;
    border: 1px solid #eadcc6;
}

.stats img {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.stats b {
    color: #5a341d;
    font-size: 22px;
}

.stats p {
    margin: 4px 0 0;
    color: #5a341d;
    font-size: 12px;
    font-weight: 500;
}

/* =========================
   Buttons
========================= */
.landing-btn-wrapper{
    margin-top: 60px;
    display: flex;
    justify-content: start;
}
.landing-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border: 0;
    border-radius: 8px;
    background: #d32f2f;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}

.landing-btn:hover {
    transform: translateY(-2px);
    background: #b71c1c;
    color: #ffffff;
}

.direction-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background: #c62828;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
}

.direction-btn:hover {
    background: #a81d1d;
    color: #ffffff;
}

/* =========================
   Modal and form
========================= */
.modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: #fbf0d8;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 0;
    background: #31580f;
    color: #ffffff;
}

.modal-title {
    font-weight: 700;
}

.modal-body {
    padding: 25px;
}

.tribute-form .form-label {
    margin-bottom: 8px;
    color: #5a341d;
    font-weight: 600;
}

.tribute-form .form-control {
    padding: 12px 15px;
    border: 1px solid #d8c39b;
    border-radius: 10px;
    background: #fffdf7;
    color: #4b341d;
    transition: 0.3s ease;
}

.tribute-form .form-control::placeholder {
    color: #9b8a74;
}

.tribute-form .form-control:focus {
    border-color: #31580f;
    background: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(49, 88, 15, 0.15);
    outline: 0;
}

.form-btn-cnt {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
}

.form-btn-cnt .btn-primary,
.form-btn-cnt .btn-secondary {
    padding: 10px 22px;
    border: 0;
    border-radius: 8px;
    font-weight: 600;
}

.form-btn-cnt .btn-primary {
    background: #31580f;
}

.form-btn-cnt .btn-primary:hover {
    background: #26470c;
}

.form-btn-cnt .btn-secondary {
    background: #8b7b65;
}

.form-btn-cnt .btn-secondary:hover {
    background: #756650;
}

/* =========================
   Shared inner pages
========================= */
.biography-page,
.cm-message-page,
.about-page,
.gallery-page,
.location-page {
    padding: 70px 0;
    background: #f8f3e8;
}

.page-title {
    margin-bottom: 40px;
    text-align: center;
}

.page-title h1 {
    margin-bottom: 10px;
    color: #5a341d;
    font-size: 42px;
    font-weight: 700;
}

.page-title p {
    color: #31580f;
    font-size: 18px;
    font-weight: 600;
}

/* Biography */
.biography-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 50px;
}

.biography-image {
    width: 35%;
}

.biography-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.biography-content {
    width: 65%;
}

.biography-content h2 {
    margin-bottom: 10px;
    color: #31580f;
}

.biography-content h4 {
    margin-bottom: 25px;
    color: #8b5a2b;
    font-size: 24px;
}

.biography-content p,
.cm-content p {
    margin-bottom: 18px;
    color: #444;
    font-size: 17px;
    line-height: 1.9;
    text-align: justify;
}

/* Chief Minister message */
.cm-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 50px;
}

.cm-image {
    width: 30%;
    padding: 20px;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.cm-image img {
    width: 100%;
    border-radius: 12px;
}

.cm-image h3 {
    margin-top: 20px;
    color: #31580f;
}

.cm-image span {
    color: #666;
}

.cm-content {
    width: 70%;
    padding: 35px;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.cm-content blockquote {
    margin-bottom: 25px;
    padding-left: 20px;
    border-left: 5px solid #b98945;
    color: #31580f;
    font-size: 24px;
    font-weight: 700;
}

/* About */
.about-content {
    width: 100%;
    padding: 40px;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.about-content p {
    font-size: 18px;
    line-height: 2;
    text-align: justify;
}

.about-content h2 {
    margin: 40px 0 25px;
    color: #31580f;
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    padding: 20px;
    border-left: 5px solid #31580f;
    border-radius: 10px;
    background: #fff8eb;
    transition: 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h4 {
    margin-bottom: 10px;
    color: #31580f;
}

.about-note {
    margin-top: 40px;
    padding: 30px;
    border-radius: 12px;
    background: #31580f;
    color: #ffffff;
    text-align: center;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Location */
.location-wrapper {
    display: flex;
    align-items: stretch;
    gap: 30px;
}

.location-info {
    width: 40%;
    padding: 35px;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.location-map {
    width: 60%;
}

.location-map iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: 0;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.info-box {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.info-box:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.info-box h4 {
    margin-bottom: 8px;
    color: #31580f;
}

.info-box p {
    color: #555;
    line-height: 1.8;
}

/* =========================
   Footer
========================= */
footer {
    padding: 18px;
    background: #203f11;
    color: #d8b46d;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

.animation-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.animation-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* or contain */
}

/* =========================
   Responsive styles

   Desktop: default styles above
   Tablet and mobile: 1100px and below
========================= */

/* Tablet and mobile use the same design */
@media (max-width: 1100px) {
    .navbar {
        height: auto;
        padding: 12px 15px;
        gap: 12px;
    }

    .logo {
        min-width: 0;
    }

    .logo-icon {
        font-size: 23px;
    }

    .logo h2 {
        font-size: 17px;
    }

    .logo p {
        font-size: 9px;
    }

    nav {
        display: none;
    }

    .login-btn {
        flex-shrink: 0;
        padding: 9px 13px;
        font-size: 12px;
    }

    .hero {
        min-height: auto;
        margin-top: 0;
        padding: 35px 15px 45px;
        background-position: center top;
        background-image: linear-gradient(rgba(251, 240, 216, 0.08), rgba(234, 215, 175, 0.08));
    }

    .hero-bg {
        position: static;
        margin-bottom: 25px;
    }

    .hero-bg img {
        border-radius: 15px !important;
    }

    .hero-section,
    .thanks-section,
    .biography-wrapper,
    .cm-wrapper,
    .location-wrapper {
        flex-direction: column;
    }

    .hero-section {
        gap: 25px;
    }

    .hero-left,
    .tribute-left-box,
    .tribute-right-box,
    .biography-image,
    .biography-content,
    .cm-image,
    .cm-content,
    .location-info,
    .location-map {
        width: 100%;
    }

    .title-box {
        margin-top: 0;
    }

    .title-box p {
        font-size: 21px;
    }

    .title-box h1 {
        font-size: 36px;
    }

    .title-box h3 {
        font-size: 18px;
        line-height: 1.5;
    }

    .line {
        width: 150px;
    }

    .count-card,
    .live-panel {
        width: 100%;
    }

    .count-card {
        margin-top: 25px;
        padding: 16px;
    }

    .count-card h2 {
        font-size: 28px;
    }

    .live-panel {
        margin-top: 0;
    }

    .thanks-section {
        gap: 25px;
        margin-top: 30px;
    }

    .thanks-card {
        padding: 18px;
    }

    .thanks-info,
    .stats {
        grid-template-columns: 1fr;
    }

    .thanks-user {
        padding-right: 0;
        padding-bottom: 15px;
        border-right: 0;
        border-bottom: 1px solid #eadcc6;
    }

    .thanks-user:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .thanks-user-map-cnt {
        align-items: flex-start;
    }

    .share-row {
        padding: 0;
        
    }
    .share-row p{
        color: #5a341d;
    }
    .certificate-btn,
    .landing-btn {
        width: 100%;
    }
    .landing-btn-wrapper{
        margin-top: 0px;
    }

    .stats-wrap {
        padding: 18px;
    }

    .form-btn-cnt {
        flex-direction: column-reverse;
    }

    .form-btn-cnt .btn-primary,
    .form-btn-cnt .btn-secondary {
        width: 100%;
    }

    .biography-page,
    .cm-message-page,
    .about-page,
    .gallery-page,
    .location-page {
        padding: 40px 15px;
    }

    .page-title {
        margin-bottom: 30px;
    }

    .page-title h1 {
        font-size: 30px;
    }

    .page-title p {
        font-size: 17px;
    }

    .biography-wrapper,
    .cm-wrapper,
    .location-wrapper {
        gap: 25px;
    }

    .biography-content h2 {
        font-size: 24px;
    }

    .biography-content h4 {
        font-size: 18px;
        line-height: 1.5;
    }

    .biography-content p,
    .cm-content p,
    .about-content p {
        font-size: 16px;
        line-height: 1.8;
        text-align: left;
    }

    .cm-content,
    .about-content,
    .location-info {
        padding: 20px;
    }

    .cm-content blockquote {
        padding-left: 15px;
        font-size: 20px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .gallery-item img {
        height: 180px;
    }

    .location-map iframe {
        min-height: 350px;
    }

    footer {
        padding: 15px;
        font-size: 14px;
    }
    .socials{
        position: fixed;
        bottom: 72px;
        left: 0;
        background: #FFF;
        width: 100%;
        justify-content: space-between;
        padding: 12px 20%;
    }
    body{
        padding-bottom: 140px;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .title-box h1 {
        font-size: 32px;
    }

    .thanks-user-map-cnt {
        flex-direction: column;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item img {
        height: 220px;
    }

    
}