* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: DM Sans, sans-serif;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

.container {
    display: flex;
    justify-content: space-between;
    margin: 20px;
}

.left-container, .center-container, .right-container {
    width: 30%;
    padding: 10px;
}

.left-container h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.left-container p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.highlight {
    color: #00a8e8;
    font-weight: bold;
}

.center-container img {
    width: 100%;
    border-radius: 8px;
}

.right-container {
    display: flex;
    justify-content: center;
}

.navigator-bar ul {
    list-style: none;
}

.navigator-bar ul li {
    font-size: 16px;
    padding: 0px 0;
    display: flex;
    align-items: center;
    font-weight: bold;
}

.navigator-bar ul li span {
    margin-right: 10px;
    font-size: 20px;
}

.gallery-item-image img {
    cursor: pointer; /* Change cursor to indicate the image is clickable */
    transition: transform 0.5s ease; /* Smooth transition for image scaling */
}

/* Styles for fullscreen image */
.fullscreen-img {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* Full width */
    height: 100vh; /* Full height */
    z-index: 9999; /* Ensure it is on top */
    background-color: black; /* Optional: Add a background color */
    cursor: zoom-out; /* Change cursor to indicate exit */
    object-fit: contain; /* Maintain aspect ratio */
    opacity: 0; /* Start with opacity 0 for fade effect */
    transition: opacity 0.5s ease; /* Smooth fade transition */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.left-container::-webkit-scrollbar {
    display: none; /* Hides the scrollbar */
}

/* Swiper styles */
.swiper-container {
    width: 100%;
    height: 300px;
    position: relative;
}

.swiper-container .swiper-pagination {
    bottom: 10px;
    z-index: 10;
}

.swiper-container .swiper-pagination-bullet {
    background: #999;
    opacity: 0.7;
}

.swiper-container .swiper-pagination-bullet-active {
    background: #666;
    opacity: 1;
}

/* Overlay for Semi-Transparent Background */
#overlay {
    position: fixed; 
    display: none; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(0, 0, 0, 0.9); 
    z-index: 1001
}

/* Pop-up styles */
#popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 600px;
    background: white;
    border-radius: 3px;
    overflow: hidden;
    z-index: 1002;
    display: none; /* Hidden by default */
}

/* Title and Text styles */
.popup-title {
    text-align: center;
    font-size: 10pt;
    margin: 15px 15px 10px 15px;
    font-weight: bold;
}

.popup-text {
    text-align: center;
    font-style: italic;
    margin: 10px 15px 15px 15px;
    font-size: 8pt;
}


/**/

/* Tablet breakpoint */
@media (max-width: 1024px) {
    /* Stack main page columns */
    .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .left-container,
    .center-container,
    .right-container {
        width: 80% !important;
        padding: 20px 0 !important;
    }

    .left-container h2 {
        margin-left: 0 !important;
    }

    .left-container p {
        margin-left: 0 !important;
    }
    
    /* Moments: 3 columns on tablets */
    .moments-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .desktop-gallery {
        column-count: 2;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    /* First page: full-width stacked */
    .container {
        flex-direction: column;
        margin: 10px;
    }

    .left-container,
    .center-container,
    .right-container {
        width: 100% !important;
        padding: 10px 0 !important;
    }

    .center-container img {
        margin-top: 20px !important;
        max-width: 250px;
    }

    /* Blogs: single column */
    #blogs > div {
        flex-direction: column !important;
        width: 100% !important;
    }

    /* Gallery: Hide desktop gallery, show mobile carousel */
    .desktop-gallery {
        display: none !important;
    }

    .mobile-gallery {
        display: block !important;
    }

    .gallery-title {
        margin-bottom: 3vh !important;
    }

    #blogs > div > div {
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
    }

    #blogs > div > div + div {
        margin-top: 2rem;
    }

    /* Moments: Hide desktop grid, show mobile carousel */
    .desktop-moments {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    .mobile-moments {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Mobile: 1 column grid (as backup in case grid shows) */
    .moments-grid {
        grid-template-columns: 1fr !important;
    }

}

/* Hide the vertical divider for blogs in mobile view */
@media (max-width: 768px) { 
    .vertical-divider {
        display: none !important;
    }
}

/* Centralize the icons for main-page on mobile view */
@media (max-width: 768px) {
    .left-container div[style*="display: flex"][style*="align-items: center"] {
        justify-content: center !important;
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .law_info {
        background: #f0f0f0;
        font-size: 12px;
        padding: 10px;
    }

    .law_info a {
        color: #333;
        text-decoration: none;
    }
}

/* Top bar styles */
.top-bar {
    background-color: #fefefe;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ccc;
}

.top-bar.fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.fullscreen-btn {
    margin-left: 5vw;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
}

.night-mode-btn {
    margin-right: 5vw;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.night-mode-btn:hover {
    transform: scale(1.1);
}

/* Night mode styles */
body.night-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.night-mode .top-bar {
    background-color: #2a2a2a;
    border-bottom: 1px solid #444;
}

body.night-mode #blogs {
    background-color: #1f1f1f;
}

body.night-mode #moments {
    background-color: #1f1f1f;
}

body.night-mode .moments-section {
    background-color: #1f1f1f;
}

body.night-mode .blog-link {
    color: #b0b0b0;
    border-bottom: 1px solid #555;
}

body.night-mode .blog-link a {
    color: #b0b0b0;
}

body.night-mode .blog-link a:hover {
    color: #73bdeb;
}

body.night-mode .moments-item {
    background-color: #2a2a2a;
    border: 1px solid #444;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

body.night-mode .moments-item h3,
body.night-mode .moments-item p {
    color: #e0e0e0;
}

body.night-mode .moments-swiper-container {
    background-color: transparent;
}

body.night-mode .moments-swiper-container .swiper-slide {
    background-color: transparent;
}

body.night-mode .vertical-divider {
    background-color: #444;
}

body.night-mode #gallery-container {
    background-color: #1a1a1a;
}

body.night-mode .law-info a {
    color: #b0b0b0;
}

/* Main page container */
#main-page {
    height: 100vh;
}

.main-page-left {
    width: 30%;
    padding: 50px;
}

.main-page-left h2 {
    font-size: 38px;
    margin-left: 25px;
    margin-top: 50px;
    font-family: DM Sans, sans-serif;
}

.main-page-left .intro-text {
    font-size: 24px;
    line-height: 1.6;
    margin-left: 25px;
    margin-top: 80px;
    font-family: DM Sans, sans-serif;
}

.main-page-left .quote-text {
    font-size: 18px;
    line-height: 1.6;
    margin-left: 25px;
    margin-top: 80px;
    font-style: italic;
    font-family: DM Sans, sans-serif;
}

.social-icons {
    display: flex;
    align-items: center;
    margin-left: 25px;
    margin-top: 50px;
}

.social-icons a {
    margin-right: 15px;
}

.social-icons img {
    width: 20px;
    height: 20px;
}

.main-page-center {
    width: 35%;
    padding: 10px;
}

.main-page-center img {
    width: 100%;
    border-radius: 2px;
    margin-top: 10%;
}

.main-page-right {
    width: 30%;
    padding: 10px;
}

/* Blogs section */
#blogs {
    height: 100vh;
    padding: 10vh;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 16px;
    font-family: DM Sans, sans-serif;
    text-align: center;
    margin-bottom: 5vh;
}

.blogs-container {
    width: 50%;
    display: flex;
    justify-content: space-between;
    align-items: start;
    position: relative;
}

.blogs-column {
    width: 49%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.blogs-column.left {
    padding-right: 2%;
}

.blogs-column.right {
    padding-left: 2%;
}

.blog-link {
    font-size: 10pt;
    line-height: 1.6;
    font-family: DM Sans, sans-serif;
    color: #555;
    border-bottom: 1px solid #555;
    padding-bottom: 2px;
    width: 100%;
    text-align: left;
}

.blog-link a {
    text-decoration: none;
    color: inherit;
}

.vertical-divider {
    width: 0.1px;
    background-color: #ddd;
    height: 100%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Gallery section */
#gallery-container {
    width: 80%;
    margin: auto;
    padding-top: 20px;
}

.gallery-title {
    font-size: 16px;
    font-family: DM Sans, sans-serif;
    margin-top: 10%;
    text-align: center;
    margin-bottom: 10vh;
}

/* Desktop Gallery - waterfall layout */
.gallery-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.gallery-carousel-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.desktop-gallery {
    column-count: 3;
    column-gap: 15px;
    margin-bottom: 10vh;
    width: 100%;
}

.gallery-item {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 0px;
    display: block;
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05);
}

/* Mobile Gallery - carousel */
.mobile-gallery {
    display: none;
    width: 100%;
    margin-bottom: 10vh;
}

.gallery-swiper-container {
    width: 100%;
    height: 100vw;
    max-height: 500px;
    background-color: #000;
}

.gallery-swiper-container .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
}

.gallery-swiper-container .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    box-sizing: border-box;
    background-color: #fff;
}

.gallery-swiper-container .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}

.gallery-swiper-container .swiper-pagination-bullet-active {
    background: #73bdeb;
    opacity: 1;
}

/* Fullscreen container */
#fullscreen-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#fullscreen-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

/* Moments section */
#moments {
    height: 100vh;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.moments-section {
    padding-bottom: 20vh;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.moments-title {
    font-size: 16px;
    font-family: DM Sans, sans-serif;
    margin-top: 10%;
    text-align: center;
    margin-bottom: 0vh;
}

.moments-container {
    width: 80%;
    margin-left: 10%;
    display: block !important;
    margin: 0 auto !important;
}

/* Desktop Moments - grid layout */
.desktop-moments {
    display: block;
    width: 100%;
    padding: 20px 0;
    overflow-x: hidden;
}

.moments-grid-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.mobile-moments {
    display: none;
    width: 100%;
    padding: 20px;
}

.moments-carousel-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.moments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    padding: 0;
}

.moments-item {
    cursor: pointer;
    height: auto;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.moments-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Mobile Moments - carousel */
.moments-swiper-container {
    width: 100%;
    height: 70vw;
    max-height: 500px;
    background-color: transparent;
    border-radius: 0;
    overflow: visible;
    margin-bottom: 3vh;
}

.moments-swiper-container .swiper-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

.moments-swiper-container .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    min-height: 100%;
    width: 100%;
}

.moments-swiper-container .swiper-pagination {
    bottom: 10px;
    z-index: 10;
}

.moments-swiper-container .swiper-pagination-bullet {
    background-color: #666;
    opacity: 0.5;
}

.moments-swiper-container .swiper-pagination-bullet-active {
    background-color: #333;
    opacity: 1;
}

.moments-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin: 0;
    display: block;
    max-width: 100%;
    overflow: hidden;
}

.moments-item h3 {
    margin: 3%;
    font-size: 16px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.moments-item p {
    margin: 3%;
    margin-top: 2%;
    font-style: italic;
    font-size: 12px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.moments-item.full-date h3 {
    margin: 5%;
}

.moments-item.full-date p {
    margin: 5%;
    margin-top: 5%;
    font-style: italic;
}

/* Law info */
.law-info {
    padding: 3vh;
    font-size: 10px;
    font-family: Arial, sans-serif;
    text-align: center;
}

.law-info a {
    color: #555;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 1024px) {
    #gallery {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    #gallery {
        column-count: 1;
    }
}
