@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Tamil:wght@400;500;600;700;800&family=Noto+Serif+Tamil:wght@600;700&display=swap');
:root{--wine:#681326;--wine2:#3d0713;--gold:#d5a536;--cream:#fff9ee;--ink:#271b17;--muted:#78685f;--line:#eadcc5;--shadow:0 18px 50px rgba(74,34,16,.12)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:var(--ink);background:#fffdf8;font-family:'Noto Sans Tamil',system-ui,sans-serif;line-height:1.75}.container{width:min(1160px,92%);margin:auto}.topbar{padding:8px 15px;text-align:center;background:var(--wine2);color:#f5d991;font-size:13px}.header{position:sticky;top:0;z-index:50;background:rgba(255,253,248,.96);backdrop-filter:blur(14px);border-bottom:1px solid rgba(213,165,54,.25)}.nav{height:86px;display:flex;align-items:center;justify-content:space-between;gap:25px}.brand{display:flex;align-items:center;gap:12px;color:var(--wine);text-decoration:none}.brand-mark{width:52px;height:52px;border-radius:50%;overflow:hidden;border:2px solid var(--gold);box-shadow:0 0 0 4px #fff3d5}.brand-mark img{width:100%;height:100%;object-fit:cover}.brand strong{display:block;font-family:'Noto Serif Tamil';font-size:17px}.brand small{display:block;color:#8b6e58;font-size:10px}.links{display:flex;gap:23px}.links a{color:#5b4238;text-decoration:none;font-weight:600;font-size:14px}.links a:hover{color:var(--wine)}.menu{display:none;background:none;border:0;font-size:27px;color:var(--wine)}.hero{min-height:690px;display:grid;place-items:center;position:relative;isolation:isolate;background:url('../images/IMG_4909.JPG') center 35%/cover no-repeat}.hero:before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(40,4,12,.94) 0%,rgba(65,8,21,.77) 43%,rgba(36,5,10,.25) 74%,rgba(0,0,0,.12))}.hero:after{content:"";position:absolute;left:0;right:0;bottom:0;height:9px;background:linear-gradient(90deg,var(--gold),#f6df8e,var(--gold))}.hero-inner{color:white}.hero-copy{max-width:680px}.ornament{color:#f0c75a;letter-spacing:10px;font-size:19px}.eyebrow{font-size:13px;font-weight:800;letter-spacing:2px;color:#f0c75a}.hero h1{font-family:'Noto Serif Tamil';font-size:clamp(39px,5vw,68px);line-height:1.3;margin:12px 0;color:#fff}.hero h2{font-size:17px;font-weight:500;color:#f6dfad}.hero p{font-size:17px;max-width:650px;color:#f8eee8}.btn{display:inline-block;margin:12px 9px 0 0;padding:12px 22px;border-radius:4px;background:var(--gold);color:#381207!important;text-decoration:none;font-weight:800}.btn.ghost{background:transparent;border:1px solid rgba(255,255,255,.7);color:white!important}.section{padding:82px 0}.alt{background:var(--cream)}.about{display:grid;grid-template-columns:.88fr 1.12fr;gap:60px;align-items:center}.visual{position:relative}.visual img{width:100%;height:560px;object-fit:cover;border-radius:3px;box-shadow:var(--shadow)}.visual:before{content:"";position:absolute;inset:-16px 16px 16px -16px;border:1px solid var(--gold);z-index:-1}.section h2{font-family:'Noto Serif Tamil';color:var(--wine);font-size:clamp(28px,3.4vw,43px);line-height:1.4;margin:8px 0 18px}.section p{color:#695950}.facts{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:25px 0}.fact{padding:18px 12px;background:#fff7e8;border-top:3px solid var(--gold);text-align:center;font-size:12px;color:#795e4d}.fact strong{display:block;color:var(--wine);font-size:24px}.section-head{text-align:center;max-width:760px;margin:0 auto 38px}.section-head span{color:#a5791c;font-weight:800;font-size:12px;letter-spacing:2px}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}.card{padding:32px;background:#fff;border:1px solid var(--line);box-shadow:0 8px 28px rgba(79,39,19,.05);border-radius:4px}.card .icon{font-size:30px}.card h3{color:var(--wine);font-family:'Noto Serif Tamil';font-size:21px}.card a{color:#9c6d0e;font-weight:700;text-decoration:none}.notice{background:linear-gradient(135deg,#5c1020,#861d31);color:white}.notice .section-head h2,.notice .section-head p{color:white}.notice-card{max-width:800px;margin:auto;padding:30px;border:1px solid rgba(245,210,125,.4);background:rgba(255,255,255,.06)}.notice-card small{color:#f80a0a}.notice-card h3{font-size:25px}.notice-card p{color:#000000}.gallery{display:grid;grid-template-columns:1.3fr .85fr .85fr;grid-template-rows:260px 260px;gap:12px}.photo{overflow:hidden;position:relative;background:#eee}.photo:first-child{grid-row:1/3}.photo img{width:100%;height:100%;object-fit:cover;transition:.5s}.photo:hover img{transform:scale(1.035)}.photo span{position:absolute;bottom:0;left:0;right:0;padding:30px 14px 12px;color:white;font-weight:700;background:linear-gradient(transparent,rgba(0,0,0,.7))}.cta{padding:50px 0;background:#f1d994}.cta .container{display:flex;justify-content:space-between;align-items:center;gap:20px}.cta h2{color:#4e1520;margin:0;font-family:'Noto Serif Tamil'}.cta p{margin:5px 0}.footer{padding:55px 0 20px;background:#2c080f;color:#e9d9d2}.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:45px}.footer h3{color:#f2ce71}.footer a{display:block;color:#e9d9d2;text-decoration:none;margin:7px 0}.copyright{margin-top:40px;padding-top:18px;border-top:1px solid #5b2d35;text-align:center;font-size:12px;color:#a98f89}.page-hero{padding:90px 0;background:linear-gradient(120deg,#4b0a17,#7d1b2e);color:white;text-align:center}.page-hero h1{font-family:'Noto Serif Tamil';font-size:42px;margin:0}.page-content{max-width:900px}.page-content h2,.page-content h3{color:var(--wine)}.page-content img{max-width:100%}
@media(max-width:850px){.nav{height:72px}.brand strong{font-size:14px}.brand small{display:none}.brand-mark{width:44px;height:44px}.menu{display:block}.links{display:none;position:absolute;top:72px;left:0;right:0;background:#fffdf8;padding:18px 4%;box-shadow:0 12px 25px #0002;flex-direction:column;gap:10px}.links.open{display:flex}.hero{min-height:610px;background-position:58% center}.hero:before{background:linear-gradient(90deg,rgba(43,5,13,.94),rgba(55,6,17,.66))}.hero-copy{max-width:94%}.about{grid-template-columns:1fr;gap:42px}.visual img{height:500px}.grid{grid-template-columns:1fr}.facts{grid-template-columns:1fr 1fr}.gallery{grid-template-columns:1fr 1fr;grid-template-rows:360px 230px 230px}.photo:first-child{grid-column:1/3;grid-row:auto}.cta .container{flex-direction:column;align-items:flex-start}.footer-grid{grid-template-columns:1fr}.section{padding:60px 0}}
@media(max-width:520px){.hero{min-height:590px}.hero h1{font-size:36px}.hero p{font-size:15px}.visual img{height:430px}.facts{grid-template-columns:1fr}.gallery{display:grid;grid-template-columns:1fr;grid-template-rows:repeat(5,300px)}.photo:first-child{grid-column:auto}.section{padding:50px 0}}

.donation-panel{max-width:760px;margin:45px auto 25px;padding:34px;border:1px solid #e6d5ac;border-radius:18px;background:#fffaf0;text-align:center;box-shadow:0 8px 28px #4a16200d}
.donation-placeholder{padding:25px;border:1px dashed #b99a64;border-radius:12px;background:white;margin:20px 0}
.donation-placeholder p{max-width:560px;margin:14px auto 22px}
.donation-note{font-size:.85rem;opacity:.8}
@media(max-width:600px){.donation-panel{padding:20px}}

.fb-feed-wrap{display:flex;justify-content:center;margin:24px auto;max-width:100%;min-height:500px}.fb-feed-wrap iframe{max-width:100%;background:#fff;border-radius:12px}

/* Restored history timeline */
.history-timeline-heading{margin-top:2.5rem;margin-bottom:1.5rem;color:#6f1825;text-align:center}
.content .timeline{position:relative;display:grid;gap:1.2rem;margin:1.5rem auto 2.5rem;padding:0 0 0 2.4rem;border-left:3px solid #c6a35e;max-width:860px}
.content .timeline article{position:relative;display:block;padding:1.2rem 1.5rem;background:#fffaf0;border:1px solid #ead9b8;border-radius:12px;box-shadow:0 6px 18px rgba(78,28,27,.07)}
.content .timeline article:before{content:"";position:absolute;left:-3.05rem;top:1.4rem;width:16px;height:16px;border:4px solid #fffaf0;border-radius:50%;background:#7a1c2a;box-shadow:0 0 0 2px #c6a35e}
.content .timeline article strong{display:block;color:#7a1c2a;font-size:1.05rem;margin-bottom:.35rem}
.content .timeline article p{margin:0;line-height:1.8}
@media(max-width:600px){.content .timeline{padding-left:1.5rem}.content .timeline article{padding:1rem}.content .timeline article:before{left:-2.15rem;width:13px;height:13px}}

/* Refined Tamil media page heading and introduction */
.media-hero{padding:72px 0 78px;background:radial-gradient(circle at 50% 0%,rgba(216,165,57,.17),transparent 55%),linear-gradient(125deg,#3d0713,#74182c 68%,#4d0b19);border-bottom:4px solid #d5a536}
.media-hero .ornament{font-size:15px;letter-spacing:9px;margin-bottom:13px}
.media-eyebrow{display:block;color:#f1d58b;font-size:.84rem;font-weight:700;letter-spacing:.05em;margin-bottom:12px}
.media-hero h1{font-family:'Noto Serif Tamil',serif;font-size:clamp(27px,4.1vw,48px);line-height:1.65;max-width:980px;margin:0 auto;color:#fff7e8;text-wrap:balance;overflow-wrap:normal}
.media-title-join{display:inline-block;color:#f0ce79;padding:0 .16em;font-family:Georgia,serif;font-style:italic}
.media-hero-subtitle{color:#f3dec8;font-size:clamp(13px,1.6vw,16px);margin:12px auto 0;max-width:650px;line-height:1.9}
.media-intro-section{padding:45px 0 14px;background:#fffdf8}
.media-intro-card{max-width:910px;margin:0 auto;padding:30px 40px;display:flex;align-items:flex-start;gap:24px;background:linear-gradient(135deg,#fffaf0,#fffdf9);border:1px solid #ebd9b4;border-left:4px solid #cfa64d;border-radius:12px;box-shadow:0 10px 30px rgba(70,22,25,.055)}
.media-intro-symbol{font-size:32px;color:#9a752c;line-height:1.4;flex:0 0 auto}
.media-intro-content h2{font-family:'Noto Serif Tamil',serif;font-size:clamp(19px,2.5vw,26px);line-height:1.5;color:#681326;margin:0 0 9px}
.media-intro-content p{margin:0 0 15px;line-height:2;color:#594b42;font-size:15px}
.media-facebook-link{color:#73182b;font-weight:800;text-decoration:none;border-bottom:1px solid #b99b55;padding-bottom:3px}
.media-facebook-link:hover{color:#aa7423}
@media(max-width:600px){.media-hero{padding:54px 0 60px}.media-hero h1{font-size:clamp(25px,6vw,33px);line-height:1.85}.media-intro-section{padding:24px 0 0}.media-intro-card{padding:22px 20px;gap:12px}.media-intro-symbol{font-size:23px}.media-intro-content p{font-size:14px}}

/* Homepage media heading — traditional temple treatment */
.home-media-heading{background:#4c1020;color:#fff4dd;border-radius:18px;padding:34px 20px;text-align:center;margin:0 auto 30px;box-shadow:0 10px 28px rgba(76,16,32,.13)}
.home-media-heading .home-media-ornament{color:#e5b968;font-size:1.15rem;letter-spacing:.35em;margin-bottom:9px}
.home-media-heading h2{color:#fff4dd;font-size:clamp(1.5rem,3.4vw,2.25rem);line-height:1.5;margin:0;font-weight:700}
.home-media-heading .home-media-rule{height:2px;width:80px;background:#b9924f;margin:12px auto}
.home-media-heading p{color:#e7cfa6;font-size:clamp(.95rem,2vw,1.1rem);line-height:1.7;margin:0}
@media(max-width:600px){.home-media-heading{padding:25px 15px;border-radius:12px}}

/* V11: keep navigation labels on one line at tablet widths */
.links{align-items:center;gap:clamp(10px,1.4vw,23px)}
.links a{white-space:nowrap;font-size:clamp(12px,1vw,14px)}
@media (min-width:851px) and (max-width:1100px){.nav{gap:14px}.brand{flex-shrink:0}.brand strong{font-size:15px}.links{gap:12px}}

/* V12: consistent compact masthead and robust logo */
.header .nav{display:flex;align-items:center;gap:20px}
.header .brand{display:flex;align-items:center;gap:13px;min-width:0;flex:0 1 auto;text-decoration:none}
.header .brand-mark{display:flex;align-items:center;justify-content:center;flex:0 0 52px;width:52px;height:52px;overflow:hidden;border-radius:50%;border:2px solid var(--gold);background:#f7e6c3;box-sizing:border-box}
.header .brand-mark img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.header .brand-name{display:block;font-family:'Noto Serif Tamil',serif;font-size:clamp(14px,1.25vw,18px);font-weight:700;line-height:1.55;color:var(--wine);max-width:360px}
.header .links{margin-left:auto}
@media(max-width:1100px){.header .brand-name{max-width:300px;font-size:15px}.header .nav{gap:12px}}
@media(max-width:760px){.header .brand-mark{flex-basis:44px;width:44px;height:44px}.header .brand-name{font-size:14px;max-width:260px;line-height:1.45}}


/* V13: welcome, puja time cards, and upcoming festival */
.welcome-section{padding:38px 0 8px;background:#fffaf0}
.welcome-panel{text-align:center;max-width:930px;margin:auto;padding:30px 42px;border:1px solid #e6d5b0;border-radius:18px;background:linear-gradient(135deg,#fffdf8,#f9f0de);box-shadow:0 8px 24px rgba(70,22,25,.05)}
.welcome-flourish{display:block;color:#b48b3b;letter-spacing:.45em;font-size:18px}
.welcome-kicker{color:#906d36;font-weight:700;margin:8px 0}
.welcome-panel h2{font-family:'Noto Serif Tamil',serif;color:#681326;font-size:clamp(22px,3vw,33px);line-height:1.6;margin:5px 0 10px}
.welcome-panel>p:last-child{max-width:740px;margin:0 auto;line-height:1.95;color:#574a42}
.pooja-times{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:16px 0 8px}
.pooja-time{background:#fff6e5;border:1px solid #ead4a7;border-radius:10px;padding:12px 5px;display:flex;flex-direction:column;align-items:center;gap:6px}
.pooja-time span{font-size:13px;color:#6b5140}
.pooja-time strong{font-size:clamp(17px,2vw,23px);color:#69182c;font-variant-numeric:tabular-nums}
.pooja-note{font-size:13px;color:#6b5140;margin:10px 0 0}
.event-notice #event-date{font-size:1.18rem;color:#681326}
@media(max-width:600px){.welcome-section{padding:20px 0 0}.welcome-panel{padding:22px 17px}.pooja-times{gap:5px}.pooja-time{padding:10px 2px}.pooja-time span{font-size:12px}}

/* V14: Lightweight Facebook preview, loaded only when requested */
.fb-load-button{display:block;margin:0 auto 18px;padding:12px 20px;border:1px solid #c49b43;border-radius:8px;background:#d7a83c;color:#38121b;font:inherit;font-weight:700;cursor:pointer}
.fb-load-button:hover,.fb-load-button:focus-visible{background:#ebc365}
.fb-feed-wrap iframe:not([src]){display:none}

/* V15: logo from the selected second photo and improved event contrast */
.header .brand-mark{border:2px solid #c99730;box-shadow:0 0 0 3px #fff3d5,0 2px 9px rgba(63,17,26,.2)}
.header .brand-mark img{object-fit:cover;object-position:center}
.notice{background:linear-gradient(135deg,#651529,#81283b)}
.notice .event-notice{background:#fff8ec;color:#40332d;border:1px solid #e3c995;border-radius:15px;box-shadow:0 12px 28px rgba(27,6,12,.18);padding:clamp(22px,4vw,38px)}
.notice .event-notice #event-status{display:block;color:#7b2537;font-weight:800;font-size:14px;letter-spacing:.02em}
.notice .event-notice #event-title{font-family:'Noto Serif Tamil',serif;color:#64172a;font-size:clamp(22px,3vw,30px);line-height:1.55;margin:10px 0}
.notice .event-notice #event-date,.notice .event-notice #event-date strong{color:#40332d;font-weight:800}
.notice .event-notice #event-description{color:#59463c}


/* V16 — festival notice: explicit contrast on cream; overrides legacy light-on-dark rules. */
.section.notice{background:#fff9ef;color:#40332d}
.section.notice .section-head h2{color:#681326}
.section.notice .section-head p{color:#57453a}
.section.notice .section-head span{color:#80561b}
.section.notice .notice-card.event-notice{background:#fff8ec;border:2px solid #d9b878;border-radius:16px;color:#34251e;box-shadow:0 8px 24px rgba(74,34,16,.09);max-width:850px;padding:clamp(24px,4vw,42px)}
.section.notice .notice-card.event-notice #event-status{display:block;color:#743047;font-weight:800;font-size:clamp(14px,1.4vw,17px);line-height:1.7;opacity:1}
.section.notice .notice-card.event-notice #event-title{color:#681326;font-family:'Noto Serif Tamil',serif;font-size:clamp(27px,3.7vw,43px);font-weight:700;line-height:1.55;margin:10px 0 14px}
.section.notice .notice-card.event-notice #event-date,
.section.notice .notice-card.event-notice #event-date strong{color:#38271f;font-size:clamp(17px,1.8vw,21px);font-weight:800;line-height:1.8;opacity:1}
.section.notice .notice-card.event-notice #event-description{color:#4d3b30;font-size:clamp(16px,1.5vw,19px);font-weight:600;line-height:1.85;opacity:1}
.section.notice .notice-card.event-notice .btn{background:#d5a536;color:#381207!important}
@media(max-width:600px){.section.notice .notice-card.event-notice{padding:22px 20px}}

/* V17: explicit readable event text, independent of earlier notice light-on-dark styles */
#upcoming-festival #event-status{color:#743047!important;opacity:1!important}
#upcoming-festival #event-date,#upcoming-festival #event-date strong{color:#38271f!important;opacity:1!important}
#upcoming-festival #event-description{color:#4d3b30!important;opacity:1!important}
#upcoming-festival #event-title{color:#681326!important;opacity:1!important}

/* V18: independent festival component. No inherited notice-card pale text. */
.festival-panel{max-width:850px;margin:0 auto;padding:clamp(24px,4vw,42px);background:#fff8ec;border:2px solid #bd9959;border-radius:14px;color:#171717;box-shadow:0 8px 24px rgba(40,20,10,.08)}
.festival-panel .festival-status{display:block;color:#202020;font-weight:800;font-size:17px;line-height:1.8;opacity:1}
.festival-panel .festival-title{color:#681326;font-family:'Noto Serif Tamil',serif;font-size:clamp(28px,3.7vw,43px);font-weight:700;line-height:1.5;margin:10px 0 14px}
.festival-panel .festival-date,.festival-panel .festival-description{display:block;color:#040404;font-size:clamp(17px,1.8vw,21px);font-weight:700;line-height:1.9;opacity:1;margin:10px 0}
.festival-panel .festival-description{font-weight:600}
.festival-panel .btn{color:#23140b;background:#d5a536}
.fb-feed-wrap{min-height:0;align-items:flex-start}
@media(max-width:600px){.festival-panel{padding:22px 20px}}




/* V21 — center Facebook embeds and prevent mobile edge clipping. */
.fb-feed-wrap {
  box-sizing: border-box;
  width: min(100%, 500px);
  min-width: 0;
  margin: 24px auto;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
}
.fb-feed-wrap iframe[data-facebook-page-plugin] {
  box-sizing: border-box;
  display: block;
  flex: 0 1 500px;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  border: 0;
  border-radius: 12px;
  background: #fff;
}
@media (max-width: 600px) {
  .fb-feed-wrap {
    width: 100%;
    max-width: 500px;
    margin: 18px auto;
    padding: 0 8px;
  }
  .fb-feed-wrap iframe[data-facebook-page-plugin] {
    width: 100% !important;
    max-width: 100% !important;
    height: 650px;
    border-radius: 10px;
  }
}

/* Updated layout after removing the announcements card and section */
.info-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:980px;margin-inline:auto}
.info-grid>.card{height:100%;box-sizing:border-box}
@media(max-width:850px){.info-grid{grid-template-columns:1fr;max-width:620px}}

/* Admin-managed festival photo albums */
.album-fold{background:#fff;border:1px solid #e4d7bd;border-radius:12px;margin:16px 0;overflow:hidden}.album-fold summary{cursor:pointer;padding:18px 22px;font-weight:700;font-size:1.15rem;color:#6a3c24}.album-fold[open] summary{border-bottom:1px solid #e4d7bd}.album-photos{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px;padding:18px}.album-photos figure{margin:0}.album-photos img{width:100%;height:210px;object-fit:cover;border-radius:8px}.album-photos figcaption{padding:7px 3px;font-size:.92rem;line-height:1.5}
