 @import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap');

 :root {
   --primary: #1a365d;
   --secondary: #2b6cb0;
   --accent: #ecc94b;
   --light: #f7fafc;
   --dark: #2d3748;
   --gray: #718096;
   --success: #38a169;
   --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
   --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
   --radius: 8px;
 }

 * {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
   font-family: 'Source Sans 3', system-ui, -apple-system, BlinkMacSystemFont,
     'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
 }

 body {
   font-family: 'Source Sans 3', system-ui, -apple-system, BlinkMacSystemFont,
     'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
   line-height: 1.6;
   color: var(--dark);
   background-color: var(--light);
   overflow-x: hidden;
 }

 .container {
   max-width: 1200px;
   margin: 0 auto;
   padding: 20px;
 }

 /* Navigation */
 .sticky-nav {
   position: sticky;
   top: 0;
   background: white;
   box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
   z-index: 1000;
 }

 .nav-container {
   max-width: 1200px;
   margin: 0 auto;
   padding: 0 20px;
   /* height: 130px; */
 }

 .fa-arrow-left:before {
   margin-left: -5px;
 }

 .main-nav {
   display: flex;
   /* justify-content: space-between; */
   align-items: center;
   padding: 10px 0;
   position: relative;
 }

 .back-btn {
   font-size: 26px;
   width: 55px;
   height: 55px;
   margin-top: -30px;

 }

 /* .back-btn {
      background-color: rgb(75, 147, 203);
      margin-top: 30px;
      color: white;
      padding: 10px 20px;
      border-radius: var(--radius);
      text-decoration: none;
      font-weight: 600;
      transition: all 0.3s ease;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    } */

 /* .back-btn:hover {
   background-color: #1a252f;
   transform: translateY(-2px);
 } */

 /* Gallery Page Styles */
 .gallery-page {
   padding: 40px 0;
 }

 .section-header {
   text-align: center;
   margin-bottom: 40px;
 }

 .section-header h2 {
   font-size: 2.5rem;
   color: var(--primary);
   margin-bottom: 10px;
 }

 .section-header h3 {
   font-size: 1.2rem;
   color: var(--gray);
 }

 h2 {
   font-size: 1.8rem;
   color: var(--primary);
   margin-bottom: 0px;
   position: relative;
   /* padding-bottom: 15px; */
   font-weight: 600;
 }

 .nav-title {
   position: absolute;
   left: 50%;
   transform: translateX(-50%);
 }

 .nav-title h2::after {
   left: 50%;
   transform: translateX(-50%);
 }



 /* Gallery Categories */
 .gallery-categories {
   display: flex;
   justify-content: center;
   margin-bottom: 30px;
   flex-wrap: wrap;
   gap: 10px;
 }

 .category-btn {
   padding: 10px 20px;
   background: var(--light);
   border: none;
   border-radius: 30px;
   cursor: pointer;
   font-weight: 500;
   transition: all 0.3s ease;
   color: var(--dark);
 }

 .category-btn.active,
 .category-btn:hover {
   background: var(--secondary);
   color: white;
 }

 /* Category Gallery */
 .category-gallery {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
   gap: 35px;
   margin-bottom: 40px;
 }

 .category-gallery.hidden {
   display: none;
 }

 .gallery-item {
   border-radius: var(--radius);
   overflow: hidden;
   box-shadow: var(--shadow);
   position: relative;
   transition: transform 0.3s ease;
   cursor: pointer;
 }

 .gallery-item:hover {
   transform: scale(1.05);
 }

 .gallery-item img {
   width: 100%;
   height: 200px;
   object-fit: cover;
   display: block;
 }

 .gallery-caption {
   position: absolute;
   bottom: 0;
   left: 0;
   right: 0;
   background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
   padding: 15px;
   color: white;
 }

 .gallery-caption p {
   margin: 0;
   font-size: 0.9rem;
 }

 /* Modal */
 .modal {
   display: none;
   position: fixed;
   z-index: 1000;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(0, 0, 0, 0.9);
   animation: fadeIn 0.3s ease;
 }

 .modal-content {
   display: block;
   margin: auto;
   max-width: 90%;
   max-height: 80%;
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   border-radius: 8px;
   box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
 }

 .close-btn {
   position: absolute;
   top: 20px;
   right: 35px;
   color: #fff;
   font-size: 40px;
   font-weight: bold;
   cursor: pointer;
   z-index: 1001;
   transition: color 0.3s ease;
 }

 .close-btn:hover {
   color: #ccc;
 }

 .modal-caption {
   position: absolute;
   bottom: 20px;
   left: 50%;
   transform: translateX(-50%);
   color: white;
   text-align: center;
   font-size: 16px;
   background: rgba(0, 0, 0, 0.7);
   padding: 10px 20px;
   border-radius: 20px;
   max-width: 80%;
 }

 @keyframes fadeIn {
   from {
     opacity: 0;
   }

   to {
     opacity: 1;
   }
 }






 /* Mobile Responsive */
 @media (max-width: 768px) {
   .category-gallery {
     grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
     gap: 20px;
   }

   .section-header h2 {
     font-size: 2rem;
   }

   .gallery-categories {
     gap: 5px;
   }

   .category-btn {
     padding: 8px 16px;
     font-size: 0.9rem;
   }

   .main-nav {
     display: flex;
     /* justify-content: space-between; */
     /* align-items: center; */
     padding: 10px 0;
     position: relative;
   }
 }

 @media (max-width: 480px) {
   .category-gallery {
     grid-template-columns: 1fr;
     gap: 15px;
   }

   .section-header h2 {
     font-size: 1.8rem;
   }


 }

 /* ===== TABLET STYLES (768px and up) ===== */
 @media (min-width: 768px) {
   .sticky-nav {
     padding: 6px 0;
   }

   .nav-container {
     padding: 0 20px;
   }

   .main-nav {
     min-height: 80px;
   }

   .back-btn {
     font-size: 26px;
     width: 55px;
     height: 55px;
     margin-bottom: -50px;

   }

   .fa-arrow-left:before {
     margin-left: 25px;
   }

   .nav-title h2 {
     font-size: 1.6rem;
   }

   .gallery-page {
     padding: 30px 0 50px;
   }

   .section-header {
     margin-bottom: 40px;
   }

   .section-header h2 {
     font-size: 2.2rem;
   }

   .section-header h3 {
     font-size: 1.1rem;
   }

   h2 {
     font-size: 1.8rem;
     /* margin-bottom: 25px; */
   }

   .gallery-categories {
     margin-bottom: 30px;
     gap: 12px;
   }

   .category-btn {
     padding: 12px 22px;
     font-size: 1rem;
   }

   .category-gallery {
     grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
     gap: 25px;
     margin-bottom: 40px;
   }

   .gallery-item img {
     height: 250px;
   }

   .close-btn {
     top: 20px;
     right: 30px;
     font-size: 40px;
     width: 45px;
     height: 45px;
   }

   .modal-caption {
     font-size: 15px;
     bottom: 25px;
   }
 }

 /* ===== DESKTOP STYLES (1024px and up) ===== */
 @media (min-width: 1024px) {
   .container {
     padding: 0 30px;
   }

   .nav-container {
     padding: 0 30px;
   }

   .main-nav {
     min-height: 90px;
   }

   .back-btn {
     font-size: 28px;
     width: 60px;
     height: 60px;
   }

   .nav-title h2 {
     font-size: 1.8rem;
     text-align: center;
   }

   .gallery-page {
     padding: 40px 0 60px;
   }

   .section-header h2 {
     font-size: 2.5rem;
   }

   .section-header h3 {
     font-size: 1.2rem;
   }

   h2 {
     font-size: 2rem;
     /* margin-bottom: 30px; */
   }

   .gallery-categories {
     margin-bottom: 35px;
     gap: 15px;
   }

   .category-btn {
     padding: 12px 24px;
     font-size: 1rem;
   }

   .category-gallery {
     grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
     gap: 30px;
     margin-bottom: 50px;
   }

   .gallery-item img {
     height: 280px;
   }

   .gallery-caption {
     padding: 15px;
   }

   .gallery-caption p {
     font-size: 0.9rem;
   }

   .modal-content {
     max-width: 90%;
     max-height: 80%;
   }

   .close-btn {
     top: 25px;
     right: 35px;
     font-size: 45px;
     width: 50px;
     height: 50px;
   }

   .modal-caption {
     font-size: 16px;
     bottom: 30px;
   }
 }

 /* ===== LARGE DESKTOP STYLES (1200px and up) ===== */
 @media (min-width: 1200px) {
   .category-gallery {
     grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
     gap: 35px;
   }

   .gallery-item img {
     height: 300px;
   }
 }

 /* ===== SMALL MOBILE STYLES (480px and below) ===== */
 @media (max-width: 480px) {
   .container {
     padding: 0 15px;
   }

   .nav-container {
     padding: 0 10px;
   }

   .main-nav {
     min-height: 50px;
   }

   .back-btn {
     font-size: 24px;
     width: 0px;
     height: 0px;
     /* padding: 8px; */
   }

   /* .fa-arrow-left:before{
        margin-right: 10px;
     } */

   .nav-title h2 {
     font-size: 1.2rem;
   }

   .gallery-page {
     padding: 15px 0 30px;
   }

   .section-header {
     margin-bottom: 20px;
   }

   .section-header h2 {
     font-size: 1.6rem;
   }

   .section-header h3 {
     font-size: 0.9rem;
   }

   h2 {
     font-size: 1.3rem;
     margin-bottom: 15px;
     padding-bottom: 8px;
   }

   h2::after {
     width: 40px;
     height: 2px;
   }

   .gallery-categories {
     margin-bottom: 20px;
     gap: 6px;
   }

   .category-btn {
     padding: 8px 14px;
     font-size: 0.8rem;
     border-radius: 20px;
   }

   .category-gallery {
     grid-template-columns: 1fr;
     gap: 15px;
     margin-bottom: 25px;
     padding: 0 5px;
   }

   .gallery-item img {
     height: 200px;
   }

   .gallery-caption {
     padding: 10px;
     transform: translateY(0);
     background: rgba(0, 0, 0, 0.7);
   }

   .gallery-caption p {
     font-size: 0.8rem;
   }

   .modal-content {
     max-width: 98%;
     max-height: 90%;
   }

   .close-btn {
     top: 10px;
     right: 15px;
     font-size: 30px;
     width: 35px;
     height: 35px;
   }

   .modal-caption {
     font-size: 12px;
     bottom: 15px;
     padding: 8px 16px;
     max-width: 95%;
   }
 }

 /* ===== EXTRA SMALL MOBILE STYLES (360px and below) ===== */
 @media (max-width: 360px) {
   .container {
     padding: 0 10px;
   }

   .fa-arrow-left:before {
     margin-left: -10px;
   }

   .nav-title h2 {
     font-size: 10px;
   }

   .section-header h2 {
     font-size: 1.4rem;
   }

   .category-btn {
     padding: 6px 12px;
     font-size: 0.75rem;
   }

   .gallery-item img {
     height: 180px;
   }

   .gallery-caption p {
     font-size: 0.75rem;
   }
 }

 /* ===== ACCESSIBILITY AND PERFORMANCE ===== */
 @media (prefers-reduced-motion: reduce) {
   * {
     animation-duration: 0.01ms !important;
     animation-iteration-count: 1 !important;
     transition-duration: 0.01ms !important;
   }
 }

 /* High contrast mode support */
 @media (prefers-contrast: high) {
   :root {
     --primary: #000000;
     --secondary: #0000ff;
     --accent: #ff0000;
     --light: #ffffff;
     --dark: #000000;
     --gray: #666666;
   }
 }

 /* Touch device improvements */
 @media (hover: none) {
   .gallery-item:hover {
     transform: none;
   }

   .gallery-item:hover img {
     transform: none;
   }

   .gallery-caption {
     transform: translateY(0);
     background: rgba(0, 0, 0, 0.7);
   }

   .category-btn:hover {
     transform: none;
   }
 }

 /* Print styles */
 @media print {

   .sticky-nav,
   .gallery-categories,
   .close-btn {
     display: none !important;
   }

   .category-gallery {
     display: block !important;
   }

   .gallery-item {
     break-inside: avoid;
     margin-bottom: 20px;
   }

   .gallery-item img {
     height: auto;
     max-height: 300px;
   }
 }

 @media (max-width: 768px) {

   .main-nav {
     position: relative;
   }

   .nav-title {
     position: absolute;
     left: 50%;
     transform: translateX(-50%);
     width: 100%;
     text-align: center;
     pointer-events: none;
     /* allows clicking back arrow */
   }

   .nav-title h2 {
     margin: 0;
   }

   .back-btn {
     margin-top: -40px;
     margin-left: 20px;
   }

 }