  :root
  {
    --bg:#f6f1e7; 
    --card:#fffdf8; 
    --ink:#30291f; 
    --muted:#746a5c;
    --accent:#7b4b2a; 
    --accent2:#b4864b; 
    --line:#cbb99d; 
    --soft:#efe4d2;
  }
  *
  {
    box-sizing:border-box
  }
 /* Header Tab*/
  header
  {
    padding:10px 18px 15px;
    text-align:center;
    background:linear-gradient(200deg,#fffdf8,#d4b898b7);
    color:#4d4a45ab;
    box-shadow:0 3px 18px #0002
  }
 .peoplecount
  {
    padding:5px 10px 8px;
    text-align:right;
    background:linear-gradient(300deg,#d6c4afb7,#fffdf8,);
    color:rgb(20, 20, 20);
    box-shadow:0 3px 18px #0002;
    font-size: 14px;  
}
  h1
  {
    margin:0;
    font-size:clamp(28px,5vw,48px)
  }

  .subtitle
  {
    margin-top:7px;
    font-family:Georgia,serif;
    font-size:20px;
    letter-spacing:1px;
    font-weight: bold
  }
  /* Menu Display*/
  .toolbar
  {
    position:sticky;
    top:0;
    z-index:10;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    justify-content:center;
    padding:10px;
    background:linear-gradient(200deg,#d4b898b7, #fffaf0ee);
    backdrop-filter:blur(8px);
    border-bottom:1px solid var(--line)
  }

   /* Home tool bar Display*/
  .hometool
  {
    position:sticky;
    top:0;
    z-index:10;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    justify-content:center;
    padding:10px;
    background:linear-gradient(200deg,#d4b898b7, #fffaf0ee);
    backdrop-filter:blur(8px);
    border-bottom:1px solid var(--line)
  }
  button,input
  {
    font:inherit
  }
  button
  {
    border:1px solid var(--accent);
    background:var(--accent2);
    color:white;
    border-radius:8px;
    padding:4px 8px;
    cursor:pointer
  }
  button.secondary
  {
    background:white;
    color:var(--accent)
  }
  input
  {
    min-width:230px;
    border:1px solid var(--line);
    border-radius:10px;
    padding:9px 12px;
    background:white
  }
  /* Body Part*/
  body
  {
    margin:0;
    background:linear-gradient(135deg,#f8f4ec,#e4dfd7);
    color:var(--ink);
    font-family:"Noto Sans Malayalam","Nirmala UI","Malayalam Sangam MN",system-ui,sans-serif;
    overflow-y: auto;
  }
   /* Container*/
   main
  {
    width: auto;
    max-width:1300px;
    margin:10px auto;
    padding:0 16px 60px
  }
  .intro
  {
    background:var(--card);
    border:1px solid var(--line);
    border-radius:18px;
    padding:20px;
    box-shadow:0 8px 24px #5b402015;
    margin-bottom:24px
  }
  .intro h2
  {
    margin:0 0 8px;
    color:var(--accent)
  }
  .grid
  {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(290px,1fr));
    gap:18px
  }
  .card
  {
    background:var(--card);
    border:1px solid var(--line);
    border-radius:16px;
    padding:16px;
    box-shadow:0 7px 20px #5b402012;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s ease;
  }
  
  .card h3
  {
    margin:0 0 8px;
    color:var(--accent);
    font-size:20px
  }
  .meta
  {
    color:var(--muted);
    line-height:1.65;
    font-size:14px
  }
  /*Family tree structure*/
  .tree
  {
    margin:22px 0 0;
    padding-left:12px
  }
  details
  {
    margin:8px 0
  }
  summary
  {
    cursor:pointer;
    list-style:none;
    display:flex;
    align-items:center;
    gap:9px;
    padding:11px 13px;
    background:var(--soft);
    border:1px solid var(--line);
    border-radius:12px;
    font-weight:700
  }
  .male
  {
    background:#e2edf8;
  }
  .female
  {
    background:#f5e6f3;
  }
  summary::-webkit-details-marker
  {
    display:none
  }
  summary:before
  {
    content:"＋";
    width:20px;
    height:20px;
    border-radius:50%;
    display:inline-grid;
    place-items:center;
    background:#fff;
    color:var(--accent);
    font-weight:900
  }
  details[open]>summary:before
  {
    content:"−"
  }
  .person
  {
    margin:8px 0 8px 26px;
    padding:12px 14px;
    background:white;
    border-left:4px solid var(--accent2);
    border-radius:0 10px 10px 0;
    box-shadow:0 3px 10px #00000009;
  }
 .person strong
  {
    font-size:17px
  }
 .children
  {
    margin-left:18px;
    border-left:2px solid var(--line);
    padding-left:12px
  }
  .note
  {
    font-size:13px;
    color:var(--muted);
    margin-top:4px;
    line-height:1.55
  }
  .badge
  {
    display:inline-block;
    margin:4px 5px 0 0;
    padding:3px 8px;
    border-radius:999px;
    background:#f2e8d8;
    color:#6d4325;
    font-size:12px
  }
  /*Footer Info*/
  footer
  {
    text-align:center;
    color:var(--muted);
    padding:25px
  }
  .hidden
  {
    display:none!important
  }
 
.menu 
{
    list-style: none;
    display: flex;
    margin-left: 38%;
    gap: 25px; 
    height: 20px;   
}
/* Display option for Menu items*/
.menu-item 
{
    text-decoration: none;
    padding: 5px 5px;
    cursor: pointer;
    color: #12223c;
    transition: all 0.3s ease;
    font-size: 18px;
    font-family:cursive;
}

/* Hover color */
.menu-item:hover {
  color: #ff7b00;
  text-decoration: underline;
  text-decoration-color: #ff7b00
}

/* Active menu color */
.menu-item.active {
    color: #ff7b00;
    text-decoration: underline;
    text-decoration-color: #ff7b00;
    font-weight: bold;
}

/*Family Image display*/
.banner 
  {
  display: block;
  width: 100%;
  max-width: 700px;
  height: 130px;
  object-fit: fill;
  margin: 0 auto;

   }   
   
 /*Stichy Note display*/ 
  .sticky-note
  {
    width: 250px;
    min-height: 180px;
    padding: 20px;
    background: #fff59D;
    box-shadow: 5px 8px 15px rgba(0,0,0,0.25);
    transform: rotate(-8deg);
    font-family: "Comic Sans MS",cursive;
  }
  .sticky-note h3
  {
    margin-top: 0;
    color: #2a52d6;
  }
  /*Events Image details*/
  .imagerow
  {
    display:flex; 
    align-items: center;
    gap: 20px;
    padding:1px;
    font-family:Georgia, cursive;
    font-size: 14pt;
    font-weight: bold;
    color: var(--ink);
    flex-wrap: wrap;
  }
  .image-icon
  {
    max-width: 75px;
    flex: 1 1 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    cursor: pointer;
  }
   .image-icon img
  {
    width: 100%;
    height: 90%;
    object-fit: cover;
  }
  .image-icon:hover
  {
    transform: scale(1.1);
    transition: 0.3s ease;
  }
/* Gallery Page*/

  .gallery
  {
    display: grid;
    grid-template-columns:repeat(auto-fit,minmax(290px,1fr));
    gap: 10px;
    place-items: center;
    margin-bottom: 30px;
    margin-top: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.20);
    }
  .gallery-item
  {
    position: relative;
  }
  .gallery-image
  {
    position: relative;  
    width: 275px;
    height: 275px;
    aspect-ratio: 1 / 1;  
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid #8b6914;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  .gallery-item:hover .gallery-image
  {
    transform: scale(1.1);
    transition: 0.3s ease;
  }
  .gallery-image img
  {
    width: 100%;
    height: 100%;
    object-fit:fill;
    background: #eee;
    display:block
  }
    
  .framed-image 
  {
    width: 275px;
    padding: 12px;
    background: linear-gradient(135deg, #d4af37, #fff3a6, #b8860b);
    border: 3px solid #8b6914;
    box-shadow:
      0 10px 25px rgba(0, 0, 0, 0.3),
      inset 0 0 0 4px rgba(255, 255, 255, 0.4);
    border-radius: 4px;
  }

  /* Label Inside the Image in Gallery*/
  .label
  {
    position:absolute;
    bottom: 10px;
    left: 10px;
    background: none;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 3px black;
  }
  /* Slide in property class*/
  .slide-in 
  {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease,transform 0.8s ease;
  }
  .slide-in.show
  {   
    opacity: 1;
    transform: translateY(0);
  }
.gallery-buttons
{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
.gallery-btn
{
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}
.gallery-btn:hover
{
  transform: translateY(-2px);
}
.gallery-btn.active
{
background: #333;
color: white;
}

/* Contact Pages*/

/* Two-column layout */

.contact-content 
{
    display: grid;
    grid-template-columns:repeat(auto-fit,minmax(290px,1fr));
    gap: 30px;
    place-items: center;
    margin-bottom: 20px;
    margin-top: 20px;
}

/* Contact information */
.contact-info, .contact-form 
{
    background: linear-gradient(200deg,#d4b898b7, #fffaf0ee);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.contact-info h2,
.contact-form h2 
{
    margin-bottom: 20px;
}

.contact-info > p 
{
    line-height: 1.7;
    margin-bottom: 25px;
    color: #555;
}

/* Information items */

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.icon {
    font-size: 25px;
    width: 45px;
    text-align: center;
}

.info-item h3 {
    font-size: 16px;
    margin-bottom: 5px;

}

.info-item p 
{
    color: #666;
}

/* Form */

.form-group 
{

    margin-bottom: 18px;

}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
}


.form-group input,
.form-group textarea 
{
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 7px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus 
{
    border-color: #555;

}
.form-group textarea {
    resize: vertical;
}


/* Send button */

#sendButton 
{
    width: 75%;
    padding: 13px;
    border: none;
    border-radius: 7px;
    background: var(--accent2);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

#sendButton:hover 
{
    background: #9d97d1;
}

#sendButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form send status message */

#formStatus {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    display: none;
}

#formStatus.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
}

#formStatus.error {
    display: block;
    background: #ffebee;
    color: #c62828;
}

.mobile-toolbar {
    display: none;
}

#upArrow
{
  position: fixed;
  right: 20px;
  bottom: 75px;

  width: 45px;
  height: 45px;

  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;

  background: rgba(216, 202, 202, 0.945);
  backdrop-filter: blur(10px);
  --webkit-backdrop-filter : 10px;

  color: rgb(47, 136, 109);
  font-size: 25px;
  cursor: pointer;

  display: none;
  z-index: 9999;

}

#upArrow:hover
{
  background: #0f5243;
}

#upArrow.show
{
  display: block !important;
}
#content
{
  width: 100%;
  min-height: 100vh;
}

/* Mobile phones */
@media (max-width: 820px) {

    .hometool 
    {
      display: none;
    }
    .mobile-toolbar
     {
        position: fixed;
        display: flex;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background: var(--soft);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid #ddd;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        justify-content: space-between;
        align-items: stretch;
        z-index: 9999;
        padding-bottom: env(safe-area-inset-bottom);
        flex-direction: row;
        flex-wrap: nowrap;
        
    }

    .mobile-toolbar button1 {
        flex: 1 1 0;
        height: 100%;
        border: none;
        background: transparent;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex;
        flex-direction:column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-size: 14px;
        color: var(--ink);
        cursor: pointer;
        height: 100%;
        margin: 0;
        padding: 4px 2px;
        text-align: center;
        white-space: nowrap;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        transition: all, 0.3s ease;
    }

    .mobile-toolbar .icon {
        font-size: 20px;
        line-height: 25px;
        margin-bottom: 2px;
        display: flex;
        align-items: center;
        justify-content: center
    }

      /* Text */
.mobile-toolbar button1 > span:not(.icon) {
    display: block;
    font-size: 11px;
    line-height: 14px;
}
.mobile-toolbar button1.active 
{
      color: #ff7b00;
      text-decoration-color: #ff7b00;
      font-weight: bold;
}

.mobile-toolbar button1:hover 
{
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    --webkit-backdrop-filter:blur(20px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.20) inset 0 1px 2px rgba(255, 255, 255, 0.45);
    transform: translateY(-3px);  
}

    /* Prevent toolbar from covering page content */
    body {
        padding-bottom: 75px;
    }
}

  /*Print Options*/
  @media print
  {
    .toolbar
    {
      display:none
    } 
     .hometool
    {
      display:none
    } 
    body
    {
      background:white;
      margin: 0;
    } 
    header
    {
      box-shadow:none
    }
    details
    {
      break-inside:avoid;
      page-break-inside:avoid
    } 
    main
    {
      max-width:none
    }
    .card
    {
      box-shadow:none
    }
    .mobile-toolbar
    {
      display: none;
    }
  }
  

