/* --- Global Styles & Variables --- */
:root {
    --primary-blue: #0056b3;
    --light-blue: #e6f0ff;
    --text-dark: #333333;
    --text-light: #ffffff;
    --border-color: #dddddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* FIX: Sticky Header Overlap */
section, h2, h3 {
    scroll-margin-top: 100px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-blue);
}

main {
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff; 
    border-radius: 8px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    margin-top: 2rem; 
    margin-bottom: 2rem; 
}

h1, h2, h3, h4 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}
h4 {
    color: #555;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

ul {
    list-style-position: inside;
    padding-left: 0;
}
li {
    margin-bottom: 0.5rem;
}

/* --- Sticky Social Bar --- */
.sticky-social {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.social-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    margin-bottom: 2px;
    text-decoration: none;
    transition: width 0.3s, background-color 0.3s;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    box-shadow: -2px 2px 5px rgba(0,0,0,0.2);
}

.social-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.social-btn:hover {
    width: 55px;
}

.insta {
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
}
.x-icon {
    background-color: #000;
}
.yt {
    background-color: #FF0000;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--primary-blue);
    color: var(--text-light);
    padding: 1rem;
    position: sticky; 
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header-container {
    display: flex;
    align-items: center; 
    justify-content: space-between; 
}

.header-logo {
    height: 40px; 
    margin-right: 10px; 
    flex-shrink: 0;
}

header h1 {
    color: var(--text-light);
    font-size: 1.25rem; 
    margin: 0;
    flex-grow: 1;
}

.lang-toggle {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0 1rem;
    flex-shrink: 0;
}
.lang-btn {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.lang-btn:hover, .lang-btn.active {
    opacity: 1;
    font-weight: bold;
}

.menu-toggle {
    display: block; 
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}
.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: all 0.3s;
}

.nav-links {
    list-style: none;
    display: none; 
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
}
.nav-links.active {
    display: flex; 
}
.nav-links li {
    margin: 0;
}
.nav-links a {
    color: var(--text-light);
    display: block;
    padding: 0.75rem 0;
    text-align: center;
    border-bottom: 1px solid #004a99;
}
.nav-links a:hover {
    background-color: #004a99;
    text-decoration: none;
}

/* --- Content Cards --- */
.card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background-color: var(--text-light); 
    border-radius: 5px; 
    overflow: hidden; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
thead th {
    background-color: #f4f4f4;
}
tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}
.table-spacer {
    margin-top: 2rem;
}
.table-spacer-small {
    margin-top: 1.5rem;
}

/* --- Pilgrim Info Section --- */
.info-subsection {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.info-subsection:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* --- Notices Section --- */
.notice-item {
    background-color: #f9f9f9;
    border-left: 5px solid var(--primary-blue);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}
.notice-item:last-child {
    margin-bottom: 0;
}

/* --- Contact Section --- */
#contact li {
    list-style: none;
}

/* --- App Store Button Styles --- */
.app-store-links {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}
.app-store-button {
    display: flex;
    align-items: center;
    background-color: #000;
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
    min-width: 180px;
}
.app-store-button:hover {
    background-color: #333;
    transform: scale(1.03);
    text-decoration: none;
    color: #fff;
}
.app-store-button svg {
    width: 30px;
    height: 30px;
    margin-right: 1rem;
}
.app-store-button .button-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.app-store-button .button-text span:first-child {
    font-size: 0.75rem; 
    opacity: 0.8;
}
.app-store-button .button-text span:last-child {
    font-size: 1.1rem; 
    font-weight: bold;
}

/* --- Footer --- */
.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0; 
    text-align: center;
}
.footer-nav li {
    display: inline-block; 
    margin: 0.25rem 0.5rem; 
}
footer {
    text-align: center;
    padding: 2rem 1rem;
    background-color: #333;
    color: #aaa;
    margin-top: 0; 
}
footer p {
    margin: 0.25rem 0;
}
footer a {
    color: var(--text-light);
}

/* Social Media Links (Footer) */
.social-links {
    margin: 1.5rem 0;
}
.social-links h4 {
    color: #fff;
    margin-bottom: 1rem;
}
.social-links a {
    display: inline-block;
    margin: 0 0.75rem;
    color: #fff; 
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}
.social-links a:hover {
    opacity: 1;
    transform: scale(1.1);
    text-decoration: none;
}
.social-links svg {
    width: 28px;
    height: 28px;
}

.disclaimer {
    font-size: 0.8rem;
    color: #999;
    margin-top: 1.5rem;
    padding: 0 1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.website-maker {
    font-size: 0.8rem;
    color: #777;
    margin-top: 1rem;
    line-height: 1.5;
}
.maker-highlight {
    color: white; 
    font-weight: bold;
    font-size: 0.9rem; 
}

/* --- Gallery Styles --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.gallery-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

.gallery-item .caption {
    padding: 0.8rem;
    text-align: center;
    font-size: 0.95rem;
    color: #555;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    margin: 0;
}

/* Gallery Hover & Overlay Effects */
.image-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Zoom effect on hover */
.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

/* The "Click to View" Overlay */
.overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: .3s ease;
    background-color: rgba(0, 0, 0, 0.5); /* Dark tint */
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.view-btn {
    color: white;
    font-size: 1rem;
    font-weight: bold;
    border: 2px solid white;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: rgba(0,0,0,0.5);
}

/* --- Full Screen Modal (Lightbox) --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 3000; 
    padding-top: 50px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.95);
}

/* Modal Image */
.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px;
    max-height: 80vh; 
    object-fit: contain;
    border: 2px solid white;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {transform:scale(0.8); opacity: 0;} 
    to {transform:scale(1); opacity: 1;}
}

/* Caption of Modal Image */
#modalCaption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #fff;
    padding: 15px 0;
    font-size: 1.2rem;
}

/* The Close Button */
.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 3002;
}

.close-modal:hover {
    color: #bbb;
}

/* --- Next & Previous Buttons --- */
.prev-slide, .next-slide {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 3001;
    background-color: rgba(0, 0, 0, 0.3);
}

.next-slide {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev-slide {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.prev-slide:hover, .next-slide:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Highlight current page in menu */
.nav-links a.active-page {
    background-color: #004a99;
    font-weight: bold;
}

/* --- Back to Top Button --- */
#backToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: var(--primary-blue);
    color: white;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 50%;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

#backToTop:hover {
    background-color: #003d80;
}

/* --- Floating WhatsApp Button --- */
.float-wa {
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.float-wa:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

.float-wa svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* --- Main Buttons (Gallery & WhatsApp) --- */
.button-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.main-gallery-btn {
    background-color: var(--primary-blue);
    color: white;
    font-size: 1.2rem;
    padding: 15px 30px;
    border: none;
    border-radius: 50px; 
    cursor: pointer;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.4);
    transition: transform 0.2s, background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.main-gallery-btn:hover {
    background-color: #003d80;
    transform: translateY(-3px);
}

.main-gallery-btn:active {
    transform: translateY(1px);
}

.whatsapp-channel-btn {
    background-color: #25D366; 
    color: white;
    font-size: 1rem;
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s, background-color 0.2s;
    display: inline-flex;
    align-items: center;
    font-weight: bold;
}

.whatsapp-channel-btn:hover {
    background-color: #1ebc57;
    transform: translateY(-3px);
    text-decoration: none;
}

/* --- Responsive Code for Laptops --- */
@media (min-width: 768px) {
    .menu-toggle {
        display: none; 
    }
    .nav-links {
        display: flex !important; 
        flex-direction: row;
        margin-top: 0;
        width: auto;
    }
    .nav-links li {
        margin: 0 0.5rem;
    }
    .nav-links a {
        padding: 0.5rem 1rem;
        border: none;
        border-radius: 5px;
    }
    .nav-links a:hover {
        background-color: #004a99;
    }

    header {
        display: flex;
        justify-content: space-between; 
        align-items: center;
        padding: 1rem 2rem;
    }
    header h1 {
        font-size: 1.75rem;
        flex-grow: 0; 
    }
    .header-logo {
        height: 50px; 
    }
    main {
        padding: 2rem;
    }
}

/* --- MOBILE OPTIMIZATIONS --- */
@media only screen and (max-width: 700px) {
    /* 1. Show Social Icons (We removed 'display: none') 
       and make them slightly smaller */
    .social-btn {
        width: 35px;
        height: 35px;
    }
    .social-btn svg {
        width: 18px;
        height: 18px;
    }

    /* 2. Gallery Modal Adjustments */
    .modal-content {
        width: 95%;
        max-height: 70vh;
    }
    
    /* 3. Arrow Adjustments for Touch */
    .prev-slide, .next-slide {
        font-size: 24px;
        padding: 15px;
        background-color: rgba(0,0,0,0.5); /* Easier to see */
        top: 50%;
        margin-top: -30px;
    }

    /* 4. Overlay & View Button Adjustments */
    .overlay {
        background-color: transparent;
        opacity: 1;
        justify-content: flex-end;
        align-items: flex-end;
        pointer-events: none; 
    }
    .view-btn {
        background-color: rgba(0,0,0,0.7);
        border: none;
        padding: 5px 10px;
        font-size: 0.8rem;
        margin: 5px;
    }
    
    /* 5. Main Buttons Full Width */
    .main-gallery-btn, .whatsapp-channel-btn {
        width: 100%;
        max-width: 350px;
        justify-content: center;
        font-size: 1rem;
    }
}