html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  overflow-y: scroll; /* keep scrolling enabled */
  scrollbar-width: none; /* hide scrollbar in Firefox */
}

/* hide scrollbar in Chrome, Safari, Edge */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

/* page layout */
body {
  display: flex;
  flex-direction: column;
}

/* ──────────────────────────────
   Header (default desktop)
────────────────────────────── */
.navbar-header {
  background-color: #ECEFF1;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
}

.brand-text {
  text-align: center;
  margin: 0;
  font-family: Monotype-Corsiva;
}

.brand-text div:first-child {
  font-weight: 520;
  color: black;
  font-size: 200%;
}

.brand-text div:last-child {
  font-weight: 520;
  color: black;
  font-size: 140%;
}

/* ──────────────────────────────
  footer
────────────────────────────── */
.site-footer {
  background: #f6f7fb;
  padding: 24px 0;
  text-align: center;
  color: #17263e;
  border-top: 1px solid #ccc; 
  font-size: 0.8rem;
  font-weight: bold;
}
        /* ──────────────────────────────
         maindrid
        ────────────────────────────── */
        .main-grid {
          flex: 1;
          display: grid;
          width: 95vw;
          grid-template-columns: 30% 40% 30%;
          grid-template-rows: 1fr 1fr;
          grid-template-areas:
            "links  logo   login"
            "menu   notes  assoc";
          gap: 20px;
          border-bottom: 2px solid #dcdcdc; 
          padding-bottom: 10px; 
          
        }



        /* First row */
        .important-links { grid-area: links; padding: 32px 24px; background: #fdfeff; border-right: 1px solid #edeff1ff; }
        .logo-panel      { grid-area: logo;  display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f6f7fb;  }
        .login-panel     { grid-area: login; padding: 32px 24px 32px 32px; background: #fdfeff; display: flex; align-items: center; justify-content: center; border-left: 1px solid #edeff1ff;}
        /* Second row */
        .menu-panel      { grid-area: menu;  padding: 32px 24px; background: #e3f5fc; border-right: 1px solid #edeff1ff;}
        .notes-panel     { grid-area: notes; padding: 32px 24px; background: #fffde3;}
        .assoc-panel     { grid-area: assoc; padding: 32px 24px 32px 32px; background: #e3fcec; display: flex; align-items: center; justify-content: center; border-left: 1px solid #edeff1ff;}
        .assoc-panel {
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          justify-content: flex-start;
          padding: 32px 24px 32px 32px;
          background: #e3fcec;
          border-left: 1px solid #edeff1ff;
        }
        .assoc-panel .assoc-item {
          display: block;
          padding: 10px 12px;
          font-size: 0.9rem;
          color: #1d3c55; 
          text-decoration: none;
          background: transparent !important;  
          border: none;
          transition: background 0.2s ease-in-out, color 0.2s;
        }
        
        .assoc-panel .assoc-item:hover {
          background: rgba(255, 255, 255, 0.08); 
          color: #0d273a; 
          border-radius: 6px;
        }

        .important-links,
        .logo-panel,
        .login-panel,
        .menu-panel,
        .notes-panel,
        .assoc-panel {
            height:60vh; 
        }

/* ===== responsive  ===== */
@media (max-width: 768px) {
  /* Turn grid into single-column */
  .main-grid {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 16px;
    padding: 10px 8px;
    margin-top: 60px; /* ensure space below header */
  }

  /* Panel styling */
  .main-grid > .logo-panel,
  .main-grid > .login-panel,
  .main-grid > .important-links,
  .main-grid > .menu-panel,
  .main-grid > .notes-panel,
  .main-grid > .assoc-panel {
    width: 100%;
    margin: 0;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none;
    background: inherit;
  }

  /* Order on mobile */
  .logo-panel      { order: 1; }
  .login-panel     { order: 2; }
  .important-links { order: 3; }
  .menu-panel      { order: 4; }
  .notes-panel     { order: 5; }
  .assoc-panel     { order: 6; }

  /* Smaller header + font */
  .navbar-header {
    padding: 8px 0;
  }

  .brand-text div:first-child {
    font-size: 120%; /* reduced */
  }

  .brand-text div:last-child {
    font-size: 90%; /* reduced */
  }

  /* Optional tweak for very small phones */
  @media (max-width: 480px) {
    .navbar-header {
      padding: 6px 0;
    }
    .brand-text div:first-child {
      font-size: 120%;
    }
    .brand-text div:last-child {
      font-size: 90%;
    }
  }
}


/* ──────────────────────────────
  notes pannel
────────────────────────────── */
.notes-panel {
    height: 60vh;             
    overflow-y: scroll;       
    scrollbar-width: none;     
    -ms-overflow-style: none;   
}
.notes-panel .note-item {
  font-size: 0.82rem;         
  color: #33475b;
  margin-bottom: 10px;
  text-align: justify;
  line-height: 1.5;
  background: transparent !important;  
  border: none;
  box-shadow: none;
}

.notes-panel::-webkit-scrollbar {
    display: none;             
}
.scrollable-list {
  max-height: 45vh;
  overflow-y: auto;
  background: transparent;
  scrollbar-width: none;
}
.scrollable-list::-webkit-scrollbar {
  display: none;
}

.fade-loader {
  text-align: center;
  padding: 15px;
  width: 100%;
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#fileListContainer {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 8px 12px !important;
  border-radius: 0 !important;
}

#fileListContainer .scrollable-list,
#fileListContainer ul,
#fileListContainer li,
#fileListContainer li > div {
  background: transparent !important;
}

#fileListContainer .scrollable-list {
  max-height: 45vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-left: 8px;
  scrollbar-width: none; /* firefox */
}
#fileListContainer .scrollable-list::-webkit-scrollbar { display: none; } /* webkit */

#fileListContainer .scrollable-list > li > div {
  padding: 6px 4px;
}

.fade-loader { background: transparent; }

#fileListContainer .scrollable-list div:hover {
  background: rgba(255,255,255,0.03); 
}

/* ──────────────────────────────
  Association pannel
────────────────────────────── */


.assoc-item, a.assoc-item {
  display: block;
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: bold;
  background: #f6f7fb;
  margin-bottom: 10px;
  color: #17263e;
  text-decoration: none;
}

a.assoc-item:hover {
  background-color: #d9eaff;
  text-decoration: underline;
}

        @media (max-width: 992px) {
            .main-grid {
                display: flex;
                flex-direction: column;
            }
            .important-links, .logo-panel, .login-panel,
            .menu-panel, .notes-panel, .assoc-panel {
                width: 100vw;
                padding: 24px;
                border: none;
            }
        }
 /* ──────────────────────────────
  Login pannel
────────────────────────────── */

.login-panel {
  min-height: 50vh;
  background: linear-gradient(135deg, #dfe9f3 0%, #ffffff 100%);
  padding: 30px;
}






/* Card Container */
.login-card {
  background: #fff;
  padding: 35px 40px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 380px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Header */
.login-header h3 {
  font-weight: 700;
  color: #17263e;
  font-size: 1.4rem;
  margin-bottom: 5px;
}

.login-header p {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Inputs */
.login-card .form-control {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  border: 1px solid #ced4da;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.login-card .form-control:focus {
  border-color: #17263e;
  box-shadow: 0 0 4px rgba(23, 38, 62, 0.3);
}

/* Button */
.btn-login {
  background-color: #17263e;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  font-size: 1rem;
  padding: 10px;
  transition: background 0.3s;
}

.btn-login:hover {
  background-color: #0f1a2d;
}

/* Responsive */
@media (max-width: 480px) {
  .login-card {
    padding: 25px 20px;
  }

  .login-header h3 {
    font-size: 1.2rem;
  }
}

 /* ──────────────────────────────
  important-links
────────────────────────────── */

.important-links .links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  align-items: stretch;
  justify-items: center;
}

.important-links .links-grid a {
  width: 95%;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;  
  margin-bottom: 0;
  padding: 12px 0;
  border-radius: 8px;
}

.important-links .links-grid a img {
  max-width: 90%;
  max-height: 40px;
  margin-bottom: 8px;
  object-fit: contain;
  display: block;
}



/* List display for modal links */
.modal .links-grid.expanded {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 10px;
}

.modal .links-grid.expanded a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  text-decoration: none;
  color: #17263e;
  border-radius: 6px;
  background: #f6f7fb;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.modal .links-grid.expanded a:hover {
  background-color: #d9eaff;
}

.modal .links-grid.expanded a img {
  max-height: 40px;
  width: auto;
  border-radius: 4px;
  object-fit: contain;
}



.section-heading {
  font-size: 0.8rem;
  font-weight: bold;
  color: #333;
  background-color: #d1e7dd; 
  padding: 12px 20px;
  border-radius: 8px 8px 0 0;
  border: 1px solid #badbcc;
  border-bottom: none; 
  box-shadow: inset 0 -3px 6px rgba(33, 37, 41, 0.1);
  user-select: none;
  margin-bottom: 15px;
  text-align: center;
}

        .btn-primary { background-color: #17263e; }
        .primary-eye-icon { color: #007BFF; }
        .filename-highlight, .note-item, .assoc-item {
            display: block;
            padding: 6px 10px;
            border-radius: 4px;
            font-weight: bold;
            background: #f6f7fb;
            margin-bottom: 10px;
            color: #17263e;
        }
/* ──────────────────────────────
   Responsive  important-links
────────────────────────────── */
@media (max-width: 576px) {
  #allLinksModal .links-grid.expanded a {
    font-size: 0.7rem;   
    line-height: 1.2;    
    gap: 8px;            
  }

  #allLinksModal .links-grid.expanded a img {
    max-height: 28px;   
  }

  #allLinksModal .modal-title {
    font-size: 1rem;   
  }
}
        
        
/* ──────────────────────────────
   menu pannel
────────────────────────────── */
.menu-item {
  background: transparent !important; /
  color: #000000; /* black text */
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px; 
  border: none; 
}
#fileListContainer {
  display: none;
  margin-top: 10px;
  padding-left: 0;
  max-height: 40vh;
  overflow-y: auto;
  font-size: 0.85rem; 
  
  /* Hide scrollbar (for all browsers) */
  scrollbar-width: none;       /* Firefox */
}
#fileListContainer::-webkit-scrollbar {
  display: none;               
}
/* ──────────────────────────────
   Responsive for Rules & Regulations Modal
────────────────────────────── */
@media (max-width: 576px) {
  #menuModal .modal-dialog {
    height: 100vh;
    margin: 0; 
  }

  #menuModal .modal-content {
    height: 100vh;
    border-radius: 0; 
    display: flex;
    flex-direction: column;
  }

  #menuModal .modal-header {
    padding: 8px 12px;
  }

  #menuModal .modal-title {
    font-size: 0.8rem !important;
  }

  #menuModal .close {
    font-size: 1rem !important;
  }

  #menuModal .modal-body {
    flex: 1; 
    overflow-y: auto;
    padding: 0;
  }

  #menuModal .modal-body embed {
    width: 100%;
    height: 100vh; 
    min-height: 100vh;
    border: none;
  }
}
        
        
/* ──────────────────────────────
   Logo Flip Card Styling
────────────────────────────── */
.logo-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  background: #f6f7fb;
  overflow: hidden;
}

.flip-card {
  width: 100%;
  height: 100%;
  perspective: 1000px;
  cursor: pointer;
}

.flip-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s ease-in-out;
  transform-style: preserve-3d;
}

/* When flipped */
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

/* FRONT */
.flip-card-front {
  width: 100%;
  height: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  border-radius: 10px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  width: 450px;
  background: transparent;
  border-radius: 50%;
}

.logo-wrap img {
  width: 80%;
  height: auto;
}


.flip-card-back {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  color: #222;
  border-radius: 10px;
  backface-visibility: hidden;
  transform: rotateY(180deg);
  overflow: hidden;
}

/* Glass-style sticky header */
.flip-card-back .section-heading {
  position: sticky;
  top: 20px;
  background: rgba(38, 102, 127, 0.92);
  backdrop-filter: blur(4px);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  padding: 6px 0;
  margin-bottom: 15px; /* increased space below header */
  border-radius: 6px;
  z-index: 10;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Scrollable content below header */
.flip-card-back .scrollable-list {
  height: 90%;
  overflow-y: auto;
  padding: 10px 20px 20px 20px; /* top padding adds clean gap */
  scrollbar-width: none;
}

.flip-card-back .scrollable-list::-webkit-scrollbar {
  display: none;
}

/* Each crest section (simple text) */
.crest-item {
  font-size: 0.85rem;
  color: #33475b;
  text-align: justify;
  margin-bottom: 12px;
  line-height: 1.5;
}
/* ──────────────────────────────
   Responsive Logo Adjustment
────────────────────────────── */
@media (max-width: 576px) {
  .logo-wrap {
    width: 400px;     /* smaller width */
    height: 350px;    /* smaller height */
    margin: 0 auto;   /* ensure centered */
  }

  .logo-wrap img {
    width: 100%;       /* scale image smaller */
    height: 80%;
  }

  .flip-card-front,
  .logo-panel {
    justify-content: center !important;
    align-items: center !important;
    text-align: center;
  }

  .flip-card {
    height: auto;     /* allow flexible height */
  }
}






/* spinner*/

@keyframes mini-eclipse-spin {
  0%   { transform: rotate(0deg); }
  50%  { transform: rotate(180deg); }
  100% { transform: rotate(360deg); }
}

/* Overlay style */
.login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.7); /* light overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* ──────────────────────────────
   spinner for login and menu pannel
────────────────────────────── */
.mini-spinner {
  width: 50px;
  height: 50px;
  display: inline-block;
  position: relative;
}
.mini-spinner div {
  position: absolute;
  animation: mini-eclipse-spin 1s linear infinite;
  width: 40px;
  height: 40px;
  top: 5px;
  left: 5px;
  border-radius: 50%;
  box-shadow: 0 3px 0 0 #007bff; /* blue color */
  transform-origin: 20px 20px;
  box-sizing: border-box;
}


/* ──────────────────────────────
   Modal Layout & Dimensions
────────────────────────────── */
.full-height-modal {
  height: 90vh;
  display: flex;
  flex-direction: column;
}

.full-height-modal .modal-body {
  overflow-y: auto;
  flex-grow: 1;
}

/* Fixed modal width (60% of screen) */
.modal-dialog {
  width: 60vw !important;
  max-width: none !important;
  margin: auto;
}

/* ──────────────────────────────
   Photo Grid & Image Animation
────────────────────────────── */

/* ─────────────── Photo Grid ─────────────── */
.photo-grid img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.5s ease-in-out, transform 0.2s ease-in-out;
}

.photo-grid img.loaded {
  opacity: 1;
}

.photo-grid img:hover {
  transform: scale(1.05);
}

/* ─────────────── Folder Gallery Grid (Photo Stack Style) ─────────────── */
.folder-gallery-card {
  position: relative;
  background: #fff;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 5%; /* responsive padding */
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.folder-gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Folder body scales with card */
.folder-body {
  position: relative;
  width: 80%;      /* relative to card */
  height: 0;
  padding-bottom: 60%; /* aspect ratio 4:3 */
  margin: 0 auto;
}

/* Folder shape */
.folder-shape {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #ffc107;
  border-radius: 6px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* Folder tab */
.folder-tab {
  position: absolute;
  top: -10%;   /* relative */
  left: 0;
  width: 45%;
  height: 15%; /* relative */
  background: #ffd54f;
  border-top-left-radius: 5px;
  border-top-right-radius: 3px;
}

/* Stack of photos */
.folder-photo-stack {
  position: absolute;
  bottom: 5%;
  right: 5%;
  width: 70%;
  height: 65%;
}

.folder-photo-stack img {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  transition: transform 0.3s ease;
}

.folder-photo-stack img:nth-child(1) { transform: rotate(-4deg); z-index: 1; }
.folder-photo-stack img:nth-child(2) { transform: rotate(2deg); top: 4%; left: 4%; z-index: 2; }
.folder-photo-stack img:nth-child(3) { transform: rotate(-1deg); top: 8%; left: 8%; z-index: 3; }

.folder-gallery-card:hover .folder-photo-stack img {
  transform: scale(1.05);
}

/* Folder info */
.folder-info { margin-top: 10px; }
.folder-name {
  font-weight: 600;
  font-size: 0.6rem;
  color: #0a58ca;
  margin-bottom: 3px;
}
.folder-count {
  font-size: 0.6rem;
  color: #6c757d;
}


/* ─────────────── Loader & Animations ─────────────── */

/* Fade-in animation for loader container */
.fade-loader {
  text-align: center;
  padding: 15px;
  width: 100%;
  animation: fadeIn 0.4s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Spinner loader (used for folder or gallery loading) */
.spin-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 20px auto;
  border: 5px solid #e0e0e0;
  border-top-color: #0a58ca;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Dot loader (used for photo loading) */
.image-placeholder {
  position: relative;
  background: #f8f9fa;
  border-radius: 8px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.05);
}

.dot-loader.small-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.dot-loader.small-center div {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0a58ca;
  animation: dotFlash 1s infinite ease-in-out;
  opacity: 0.6;
}

.dot-loader.small-center div:nth-child(2) { animation-delay: 0.2s; }
.dot-loader.small-center div:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotFlash {
  from { opacity: 0.3; transform: scale(1); }
  to { opacity: 1; transform: scale(1.5); }
}
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(200, 200, 200, 0.4); /* Light grey overlay */
  backdrop-filter: blur(4px); /* Subtle blur behind overlay */
  -webkit-backdrop-filter: blur(4px); /* For Safari */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease-in-out;
}

.loading-overlay.show {
  opacity: 1;
  pointer-events: auto;
}



/* ✨ Soft white glow effect around spinner */
.glowing-spinner {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
  animation: pulseGlow 1.2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0% { filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6)); }
  50% { filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1)); }
  100% { filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6)); }
}
/* Lazy image fade-in */
img.lazy-img {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img.lazy-img.loaded {
  opacity: 1;
}

/* ─────────────── Modal Header ─────────────── */
.custom-modal-header {
  background: linear-gradient(90deg, #e3f5fc 0%, #d1ebf8 100%);
  border-bottom: 2px solid #c2e4f3;
  padding: 20px 25px;
  text-align: center;
  position: relative;
}

.custom-modal-header .modal-title {
  color: #17263e;
  font-weight: 600;
  font-size: 1.5rem;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.4;
}

.icon-btn {
  background: transparent;
  border: none;
  font-size: 0.8rem;
  color: #333;
  opacity: 0.8;
  transition: all 0.2s ease;
  cursor: pointer;
}

.icon-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.icon-btn i {
  font-size: 0.8rem;
}

#backToFolders {
  background: #fff;
  border: 1px solid #ccc;
  color: #0a58ca;
  font-weight: 300;
}
#backToFolders:hover {
  background: #eaf3ff;
}
/* ──────────────────────────────
  Responsive for Photo Grid 
────────────────────────────── */
@media (max-width: 576px) {
  /* For folders */
  #photoContainer .row > .col-sm-6,
  #photoContainer .row > .col-md-3 {
    flex: 0 0 50% !important;  /* 2 columns */
    max-width: 50% !important;
  }

  /* Shrink folder size slightly */
  .folder-gallery-card {
    padding: 3%;
  }

  .folder-body {
    width: 70%;
    padding-bottom: 55%;
  }

  .folder-photo-stack {
    width: 65%;
    height: 95%;
  }

  .folder-name,
  .folder-count {
    font-size: 0.55rem;
  }

  /* For photos */
  .photo-grid img,
  #photoContainer .image-placeholder {
    width: 100%;
    border-radius: 6px;
  }

  /* Reduce space between items */
  #photoContainer .mb-4 {
    margin-bottom: 10px !important;
  }
}

/* ──────────────────────────────
  End Responsive for Photo Grid 
────────────────────────────── */


/* ──────────────────────────────
   Responsive Adjustment
────────────────────────────── */
@media (max-width: 768px) {
  .modal-dialog {
    width: 95vw !important;
  }
  .full-height-modal {
    height: 80vh;
  }
}
/* ──────────────────────────────
   Executive Modal Styling
────────────────────────────── */
.executive-modal {
  max-width: 700px;
}

.executive-modal .modal-content {
  height: 80vh; /* fixed height on desktop */
  display: flex;
  flex-direction: column;
}

.executive-body {
  flex: 1;
  overflow-y: auto;
  background-color: #fdfdfd;
  padding: 40px 45px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #17263E;
  line-height: 1.9;
  font-size: 1rem;
}

/* Section Title */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #17263E;
}

/* Main Officers Box */
.main-officers-box {
  display: inline-block;
  text-align: left;
  background: #f8f9fc;
  border: 2px solid #dfe3eb;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 25px 40px;
  margin-top: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.main-officers-box:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.main-officers-box p {
  margin-bottom: 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Executive Members Grid */
.executive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px 30px;
  text-align: left;
  font-size: 0.8rem;
}

.executive-grid div {
  background: #f8f9fc;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #e4e6ef;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.executive-grid div:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* Animation */
.executive-content {
  animation: fadeInUp 0.4s ease-in-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────
   Shared Modal Header Styling
────────────────────────────── */
.custom-modal-header {
  position: sticky;
  top: 0;
  z-index: 1055;
  background: linear-gradient(90deg, #e3f5fc 0%, #d1ebf8 100%);
  border-bottom: 2px solid #c2e4f3;
  padding: 20px 25px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.custom-modal-header .modal-title {
  color: #17263e;
  font-weight: 700;
  font-size: 1rem;
}

/* Optional: subtle shadow when scrolling */
.modal-body {
  position: relative;
}

.modal-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.modal-body:hover::before {
  opacity: 1;
}
/* ──────────────────────────────
   End Shared Modal Header Styling
────────────────────────────── */

/* ──────────────────────────────
   Responsive Fix for Small Screens
────────────────────────────── */
@media (max-width: 768px) {
  .executive-modal {
    max-width: 90%;
    margin: auto;
  }

  .executive-modal .modal-content {
    height: 95vh; /* smaller height on tablets */
  }

  .executive-body {
    padding: 20px;
    font-size: 0.85rem;
  }

  .custom-modal-header {
    padding: 10px 15px;
  }

  .custom-modal-header .modal-title {
    font-size: 0.9rem;
  }

  .main-officers-box {
    padding: 15px 20px;
  }

  .executive-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .executive-modal .modal-content {
    height: 98vh; 
  }

  .executive-body {
    padding: 15px;
    font-size: 0.8rem;
  }

  .custom-modal-header .modal-title {
    font-size: 0.85rem;
  }
}

/* ──────────────────────────────
   End Responsive Fix for Small Screens
────────────────────────────── */

/* ──────────────────────────────
   Present Members Modal Styling
────────────────────────────── */
#presentMembersModal .modal-dialog {
  max-width: 900px;
  width: 95%;
  margin: auto;
}

#presentMembersModal .modal-content {
  border-radius: 10px;
  overflow: hidden;
  height: 80vh; /* Fixed modal height */
  display: flex;
  flex-direction: column;
}

#presentMembersModal .modal-header {
  background: linear-gradient(90deg, #e3f5fc 0%, #d1ebf8 100%);
  border-bottom: 2px solid #c2e4f3;
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

#presentMembersModal .modal-title {
  font-weight: 700;
  color: #17263e;
  text-align: center;
  font-size: 1rem;
}

/* Modal body scroll container */
#presentMembersModal .modal-body {
  flex: 1;
  background: #fcfdff;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Table container with internal scroll */
#presentMembersModal .table-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto; /* enable horizontal scroll for responsiveness */
  -webkit-overflow-scrolling: touch;
}

/* Make table responsive */
#presentMembersModal table {
  width: 100%;
  min-width: 600px; /* ensures no layout breaking on small screens */
  border-collapse: collapse;
}

/* Sticky header */
#presentMembersModal thead th {
  position: sticky;
  top: 0;
  background-color: #f1f8ff;
  color: #17263e;
  font-weight: 600;
  text-transform: uppercase;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.8rem;
  z-index: 5;
  box-shadow: 0 2px 3px rgba(0,0,0,0.1);
  text-align: center;
}

/* Table cells */
#presentMembersModal tbody td {
  padding: 12px 15px;
  text-align: center;
  vertical-align: middle;
  font-size: 0.8rem;
}

#presentMembersModal tbody tr:hover {
  background-color: #f2f8ff;
  transition: background 0.2s ease-in-out;
}

/* Hide scrollbar visually */
#presentMembersModal .table-container::-webkit-scrollbar {
  display: none;
}
#presentMembersModal .table-container {
  scrollbar-width: none;
}

/* ──────────────────────────────
   Responsive Present Members Modal
────────────────────────────── */
@media (max-width: 768px) {
  #presentMembersModal .modal-dialog {
    width: 95%;
  }

  #presentMembersModal .modal-content {
    height: 75vh;
  }

  #presentMembersModal .modal-title {
    font-size: 0.9rem;
  }

  #presentMembersModal thead th,
  #presentMembersModal tbody td {
    font-size: 0.75rem;
    padding: 8px;
  }

  #presentMembersModal table {
    min-width: 550px; /* allow horizontal scroll for smaller devices */
  }
}

@media (max-width: 480px) {
  #presentMembersModal .modal-dialog {
    width: 98%;
    margin: 0;
  }

  #presentMembersModal .modal-content {
    height: 95vh;
  }

  #presentMembersModal .modal-header {
    padding: 10px 15px;
  }

  #presentMembersModal .modal-title {
    font-size: 0.8rem;
  }

  #presentMembersModal thead th,
  #presentMembersModal tbody td {
    font-size: 0.7rem;
    padding: 6px;
    white-space: nowrap; /* prevent column wrapping */
  }

  #presentMembersModal table {
    min-width: 480px; /* small table scrolls horizontally */
  }
}
/* ──────────────────────────────
   Responsive Present Members Modal
────────────────────────────── */


/* ──────────────────────────────
   Constitution Modal Styling
────────────────────────────── */
.constitution-modal {
  max-width: 70%;
}

.constitution-body {
  max-height: 75vh;
  overflow-y: auto;
  background-color: #fdfdfd;
  padding: 40px 45px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #17263E;
  line-height: 1.9;
  font-size: 0.8rem;
}

/* Gradient header same as Executive modal */
#constitutionModal .modal-header {
  background: linear-gradient(90deg, #e3f5fc 0%, #d1ebf8 100%);
  border-bottom: 2px solid #c2e4f3;
  padding: 20px 25px;
}

#constitutionModal .modal-header h4 {
  color: #17263e;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0;
}

#constitutionModal .modal-body strong {
  color: #122844;
  font-weight: 700;
}

#constitutionModal ol, 
#constitutionModal ul {
  padding-left: 25px;
}

#constitutionModal ul ul {
  padding-left: 25px;
  list-style-type: circle;
}

#constitutionModal .modal-content {
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  animation: fadeInUp 0.4s ease-in-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ──────────────────────────────
   Responsive Constitution Modal + Header (Mobile)
────────────────────────────── */
@media (max-width: 768px) {

  /* Adjust modal width and spacing */
  .constitution-modal {
    max-width: 95% !important;
    margin: 10px auto !important;
  }

  /* Shrink modal padding for smaller screens */
  .constitution-body {
    max-height: 100vh;
    padding: 15px 18px;
    font-size: 0.75rem;
    line-height: 1.7;
  }

  /* Header tweaks inside modal */
  #constitutionModal .modal-header {
    padding: 10px 12px;
  }

  #constitutionModal .modal-header h4 {
    font-size: 1rem;
    line-height: 1.3;
  }

  #constitutionModal .close {
    font-size: 1.1rem;
  }

  /* Global header bar */
  .navbar-header {
    padding: 8px 0 !important;
  }

  .brand-text div:first-child {
    font-size: 130% !important;
  }

  .brand-text div:last-child {
    font-size: 90% !important;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  .constitution-modal {
    max-width: 96% !important;
  }

  .constitution-body {
    max-height: 95vh;
    padding: 12px 15px;
    font-size: 0.7rem;
  }

  #constitutionModal .modal-header h4 {
    font-size: 0.9rem;
  }

  .navbar-header {
    padding: 6px 0 !important;
  }

  .brand-text div:first-child {
    font-size: 110% !important;
  }

  .brand-text div:last-child {
    font-size: 80% !important;
  }
}
/* ──────────────────────────────
   End Constitution Modal Styling
────────────────────────────── */
