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

        html, body {
            width: 100%;
            max-width: 100vw;
            overflow-x: hidden;
            position: relative;
        }

        /* Background Video */
        .background-video {
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            width: 100vw;
            height: 100vh;
            object-fit: cover;
            z-index: -1;
        }

        /* Overlay for better readability */
        .video-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            background: rgba(189, 195, 199, 0.3);
            z-index: -1;
        }

        /* Header - ลดความสูง */
        .header {
            background: #F7C873;
            padding: 8px 0px; /* ลดจาก 10px เป็น 8px */
            text-align: center;
            position: fixed;
            width: 100vw;
            max-width: 100%;
            top: 0;
            left: 0;
            z-index: 1500;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            box-sizing: border-box;
            height: 90px; /* กำหนดความสูงให้แน่นอน */
        }

        .header h1 {
            font-size: 4rem;
            color: #2A363B;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
            letter-spacing: 2px;
            font-family: 'Srisakdi', serif;
            z-index: 1600;
            position: absolute;
            white-space: nowrap;
            margin: 0;
        }

        /* Main Content */
        .main-content {
            position: relative;
            width: 100%;
            max-width: 100vw;
            height: 100vh;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .featured-video {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            object-fit: cover;
            z-index: -2;
            transition: transform 0.3s ease;
        }

        /* Event Section */
        .event-section {
            background: #f8f6f6;
            min-height: 60vh;
            width: 100%;
            max-width: 100vw;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 30px 20px;
            position: relative;
            overflow: hidden;
        }

        .event-header {
            text-align: center;
            margin-bottom: 60px;
            font-family: 'Charmonman', serif;
            width: 100%;
        }

        .event-header h1 {
            font-size: clamp(2.5rem, 6vw, 5rem);
            color: #2c3e50;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
            margin-bottom: 20px;
            word-wrap: break-word;
        }

        .facebook-container {
            background: #ffeeb6;
            border-radius: 20px;
            padding: 60px 40px;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            max-width: min(700px, 95vw);
            width: 100%;
            margin-bottom: 40px;
            position: relative;
            overflow: hidden;
        }

        .facebook-container::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
            transform: rotate(45deg);
            animation: shimmer 3s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
            100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
        }

        /* Facebook Plugin Loading */
        .facebook-loading {
            background: #f0f2f5;
            padding: 40px;
            border-radius: 15px;
            text-align: center;
            color: #666;
            min-height: 400px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
        }

        .loading-spinner {
            border: 4px solid #f3f3f3;
            border-top: 4px solid #1877f2;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 2s linear infinite;
            margin-bottom: 20px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Sacred Objects Section */
        .sacred-objects-section {
            background: rgb(248, 246, 246);
            min-height: 95vh;
            width: 100%;
            max-width: 100vw;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 80px 20px;
            position: relative;
            overflow: hidden;
        }

        .sacred-objects-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
                        radial-gradient(circle at 70% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
            z-index: 1;
        }

        .sacred-objects-header {
            text-align: center;
            margin-bottom: 60px;
            z-index: 2;
            position: relative;
            font-family: 'Charmonman', serif;
            width: 100%;
        }

        .sacred-objects-header h1 {
            font-size: clamp(2.5rem, 6vw, 5rem);
            color: #2A363B;
            font-weight: bold;
            text-shadow: 0 4px 5px rgba(0,0,0,0.5);
            margin-bottom: 20px;
            letter-spacing: 2px;
            word-wrap: break-word;
        }

        .sacred-objects-container {
            max-width: 1200px;
            width: 100%;
            height: 100%;
            z-index: 2;
            position: relative;
        }

        .sacred-objects-grid {
            display: grid;
            justify-content: space-around;
            padding: 0 20px;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 50px;
            max-width: 100%;
        }

        .sacred-object-item {
            max-width: 300px;
            width: 100%;
            padding: 15px 10px;
            text-align: center;
            transition: all 0.4s ease;
            justify-self: center;
        }

        .sacred-object-item:hover {
            transform: translateY(-15px) scale(1.05);
        }

        .sacred-object-image {
            width: 100%;
            max-width: 250px;
            height: 200px;
            margin: 0 auto 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }

        .sacred-object-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            display: block;
        }

        .sacred-object-description {
            font-size: clamp(1.2rem, 2.5vw, 1.8rem);
            color: #2c3e50;
            font-weight: bold;
            line-height: 1.4;
            word-wrap: break-word;
        }

        .view-more-container {
            text-align: center;
            position: absolute;
            right: 30px;
            bottom: 40px;
            z-index: 10;
        }

        .view-more-btn {
            background: linear-gradient(45deg, #CF4647, #ee5a52);
            color: white;
            border: none;
            padding: 20px 40px;
            border-radius: 50px;
            font-size: clamp(1rem, 2vw, 1.5rem);
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 10px 25px rgba(116, 0, 0, 0.6);
            position: relative;
            overflow: hidden;
        }

        .view-more-btn a {
            color: white;
            text-decoration: none;
            display: block;
            width: 100%;
            height: 100%;
        }

        .view-more-btn:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(116, 0, 0, 0.6);
            background: linear-gradient(45deg, #CF4647, #ff6b6b);
        }

        .view-more-btn:active {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(116, 0, 0, 0.6);
        }

        /* Contact Section */
        .contact-section {
            width: 100%;
            max-width: 100vw;
            min-height: 90vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .contact-container {
            width: 100%;
            max-width: 100vw;
            min-height: 100vh;
            background-image: url("img/DSC_4154.JPG");
            background-size: cover;
            background-position: center;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .contact-info {
            background: rgba(248, 246, 246, 0.705);
            padding: 25px 20px;
            box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
            text-align: center;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            width: 100%;
            max-width: 100vw;
            margin: auto;
        }

        .contact-info iframe {
            max-width: 100%;
            width: min(400px, 95vw);
            height: 300px;
        }

        .contact-title {
            color: #2c3e50;
            font-size: clamp(2rem, 5vw, 50px);
            font-weight: bold;
            margin-bottom: 25px;
        }

        .address {
            color: #2c3e50;
            font-size: clamp(1rem, 2.5vw, 26px);
            font-weight: normal;
            margin-bottom: 20px;
            line-height: 1.4;
            max-width: 100%;
            word-wrap: break-word;
        }

        .social-info {
            color: #2c3e50;
            font-size: clamp(1rem, 2.5vw, 26px);
            font-weight: normal;
            margin-bottom: 10px;
            word-wrap: break-word;
        }

        .phone {
            color: #2c3e50;
            font-size: clamp(1rem, 2.5vw, 26px);
            font-weight: normal;
            word-wrap: break-word;
        }

        .contact-header {
            background: #ffffff;
            padding: 40px 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            width: 100%;
            max-width: 100vw;
        }

        .contact-header img {
            max-width: min(400px, 95vw);
            width: 100%;
            height: auto;
        }

        .contact-footer {
            background: #F7C873;
            padding: 25px 20px;
            text-align: center;
            font-size: clamp(0.8rem, 2vw, 20px);
            color: #1e1d2b;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
            letter-spacing: 1px;
            position: relative;
            margin-top: auto;
            flex-shrink: 0;
            width: 100%;
            max-width: 100vw;
            word-wrap: break-word;
            line-height: 1.4;
        }

        /* Navigation Bar */
        .navbar {
            background: rgba(248, 246, 246, 0.575);
            padding: 25px 20px;
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            width: 100%;
            max-width: 100vw;
            z-index: 1001;
            box-shadow: inset 0 0 50px 60px rgb(248, 246, 246);
        }

        .nav-container {
            display: flex;
            justify-content: space-around;
            align-items: center;
            max-width: 1200px;
            width: 100%;
            margin: 0 auto;
            flex-wrap: wrap;
            gap: 10px;
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-decoration: none;
            color: #2c3e50;
            transition: all 0.3s ease;
            padding: 15px 10px;
            border-radius: 15px;
            flex: 1;
            max-width: 150px;
            min-width: 80px;
        }

        .nav-item:hover {
            background: rgba(255,255,255,0.3);
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        }

        .nav-icon {
            margin-bottom: 8px;
            width: 70px;
            height: 70px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .nav-icon img {
            width: 80px;
            height: 80px;
            object-fit: contain;
            max-width: 100%;
        }

        .nav-text {
            font-size: clamp(0.8rem, 2vw, 1.5rem);
            font-weight: bold;
            text-align: center;
            color: #2c3e50;
            line-height: 1.2;
            word-wrap: break-word;
        }

        /* Facebook Plugin Responsive */
        .fb-page {
            max-width: 100% !important;
        }

        .fb-page span {
            max-width: 100% !important;
        }

        .fb-page iframe {
            max-width: 100% !important;
        }

/* Responsive */
@media (max-width: 1024px) {
    .sacred-objects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .view-more-container {
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 8px 15px;
    }
    
    .facebook-container {
        padding: 30px 15px;
        margin: 0 10px 40px;
    }

    .event-section {
        padding: 40px 15px;
    }

    .sacred-objects-section {
        padding: 40px 15px;
    }

    .sacred-objects-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 0 10px;
    }

    .sacred-object-item {
        padding: 10px 5px;
    }

    .sacred-object-image {
        height: 120px;
        margin-bottom: 15px;
    }

    .nav-container {
        gap: 5px;
        padding: 0 5px;
    }

    .nav-item {
        padding: 10px 5px;
        min-width: 60px;
    }

    .nav-icon {
        width: 50px;
        height: 50px;
    }

    .nav-icon img {
        width: 60px;
        height: 60px;
    }

    .contact-info {
        padding: 20px 15px;
    }

    .contact-footer {
        padding: 20px 15px;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 480px) {
    .sacred-objects-grid {
        grid-template-columns: 1fr;
        padding: 0 5px;
    }

    .nav-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item {
        flex: none;
        width: calc(20% - 10px);
        min-width: 50px;
    }

    .facebook-container {
        margin: 0 5px 20px;
        padding: 20px 10px;
    }
}

/* Utility classes */
.img-responsive {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.img-cover {
    object-fit: cover;
    object-position: center;
}

.img-contain {
    object-fit: contain;
    object-position: center;
}