* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-image picture,
.background-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    background-blend-mode: overlay;
    opacity: 0.4; /* Set exactly between 0.5 and 0.3 */
    z-index: 1;
}

/* Add blur effect to the background image */
.background-image img {
    filter: blur(0.5px);
    transform: scale(1.01); /* Fix for blur edges */
}

.container {
    text-align: center;
    padding: 2rem;
}

.content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    padding: 0;
    background: none;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    position: relative;
    z-index: 2;
}

/* Main Content Layout */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header Styles */
.header {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;  /* Align to top */
    align-items: center;
    text-align: center;
    padding: 2rem;
    margin: 15vh 0 0 0;  /* Start with mobile margin */
}

/* Desktop-specific header adjustments */
@media (min-width: 768px) {
    .header {
        margin: 38vh 0 0 0;  /* Moved up by 5% to 45vh */
        padding: 0 2rem;
        justify-content: flex-start;
    }
    
    .header h1 {
        margin-top: 0;
    }
}

h1 {
    font-family: 'Kanit', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.25rem, 3.5vw, 2rem);
    font-weight: 300;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

/* Desktop Footer */
.desktop-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    z-index: 10;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
}

.desktop-footer .inquiries {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 1.2rem;  /* Increased from 1rem */
    color: #FFFFFF;  /* Pure white for maximum contrast */
    line-height: 1.4;  /* Better line spacing */
    font-weight: 400;  /* Slightly bolder for better readability */
}

.desktop-footer .copyright {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.7;
}

/* Mobile Footer */
.mobile-footer {
    width: 100%;
    text-align: center;
    padding: 0 1rem 2rem 1rem; /* Reduced bottom padding */
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem; /* Reduced gap */
    position: fixed; /* Changed from relative to fixed */
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent; /* Ensure transparency */
    z-index: 1000; /* Ensure it stays above other content */
    min-height: 140px;
    color: rgba(255, 255, 255, 0.95);  /* Brighter white for all mobile footer text */
}

.mobile-footer .inquiries {
    display: block;
    width: 100%;
    max-width: 100%;
    color: #FFFFFF;  /* Pure white for maximum contrast */
    text-align: center;
    position: absolute;
    bottom: 120px;  /* Moved up further */
    left: 50%;
    transform: translateX(-50%);
    margin: 0 auto;
}

.mobile-footer .inquiries-label {
    font-size: 1.5rem;  /* Further increased */
    margin-bottom: 0.5rem;  /* More space */
    font-weight: 400;  /* Slightly bolder for better readability */
    color: #FFFFFF;  /* Pure white for maximum contrast */
}

.mobile-footer .inquiries-email {
    font-size: 1.4rem;  /* Further increased */
    letter-spacing: -0.005em;  /* Slightly tighter */
    font-weight: 400;
}

/* Email link styles */
.email-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.email-link:hover,
.email-link:focus {
    opacity: 0.8;
    text-decoration: underline;
}

/* Hide the loading text before JavaScript runs */
.inquiries:not(.js-loaded),
.inquiries-email:not(.js-loaded) {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.mobile-footer .copyright {
    display: block;
    width: 90%;
    max-width: 300px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.95);  /* Brighter white */
    opacity: 0.9;  /* Slightly more opaque for better readability */
    word-break: break-word;
    padding: 0.5rem;
    text-align: center;
    position: absolute;
    bottom: 25px;  /* Adjusted position from bottom */
    left: 50%;
    transform: translateX(-50%);
    margin: 0 auto;
}

/* Show/Hide based on screen size */
@media (max-width: 767px) {
    .desktop-footer {
        display: none;
    }
    
    .mobile-footer {
        display: block;
    }
    
    .content {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .header {
        padding: 0 1.5rem;
        margin-top: 15vh;
    }
    
    /* Adjust logo position on mobile */
    .logo-container {
        top: 15px;
    }
}

@media (min-width: 768px) {
    .mobile-footer {
        display: none;
    }
    
    .desktop-footer {
        display: flex;
    }
}

/* Mobile Layout */
@media (max-width: 767px) {
    .header {
        padding: 0 1.5rem 12rem;
        justify-content: flex-start;
        margin-top: 15vh;
    }
    
    h1 {
        font-size: clamp(2rem, 10vw, 3.5rem);
        margin-bottom: 0.5rem;
    }
    
    h2 {
        font-size: clamp(1.1rem, 4vw, 1.5rem);
        margin-bottom: 1rem;
    }
    
    .footer-container {
        position: relative;
        padding: 1.5rem 1rem;
        text-align: center;
        background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
        margin-top: 2rem;
    }
    
    .inquiries {
        margin-bottom: 0.75rem;
        display: block;
        padding: 0.5rem 0;
    }
    
    .copyright {
        display: block;
        padding: 0.5rem 0;
    }
}

.logo-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.logo-link {
    display: block;
    line-height: 0; /* Remove extra space below image */
}

.logo {
    width: 60px;
    height: auto;
    display: block;
    filter: 
        brightness(0) invert(1) /* Makes the logo white */
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.05);
}

h1 {
    font-family: 'Kanit', sans-serif;
    font-size: clamp(3rem, 10vw, 6.6rem);
    font-weight: 600;
    color: #fff;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
    line-height: 1.1;
    word-break: break-word;
}

h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 500;
    margin: 0.5rem 0 0 0;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.copyright {
    position: fixed;
    bottom: 15px;
    right: 15px;
    left: 15px; /* Add left spacing for better mobile */
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    text-align: right;
    z-index: 10;
    margin: 0;
    padding: 8px 0; /* Add some vertical padding */
    background: rgba(0, 0, 0, 0.1); /* Slight background for better readability */
    padding-right: 10px; /* Add some right padding */
}

.contact {
    position: fixed;
    left: 15px;
    bottom: 50px; /* Moved up to make room for copyright */
    font-size: clamp(0.9rem, 1.5vw, 1.1rem); /* Slightly smaller font */
    color: rgba(255, 255, 255, 0.8);
    transition: opacity 0.3s ease;
    text-align: left;
    z-index: 10;
    margin: 0;
    padding: 8px 0; /* Add some vertical padding */
    line-height: 1.4; /* Better line spacing */
    max-width: 90%; /* Prevent text from going off screen */
}

.contact:hover {
    opacity: 1;
    cursor: pointer;
}

@media (max-width: 768px) {
    .header {
        padding: 1rem;
        padding-top: 20vh;
    }
    
    h1 {
        font-size: clamp(2.5rem, 12vw, 4rem);
        margin-bottom: 0.5rem;
    }
    
    h2 {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
        margin-bottom: 1.5rem;
    }
    
    .contact, .copyright {
        position: fixed;
        width: auto;
        max-width: 80%;
        margin: 0;
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .contact {
        left: 10px;
        bottom: 10px;
        right: auto;
    }
    
    .copyright {
        right: 10px;
        bottom: 10px;
        left: auto;
    }
    
    /* Stack contact and copyright on very small screens */
    @media (max-width: 400px) {
        .contact {
            bottom: 50px;
        }
        .copyright {
            bottom: 10px;
            right: 10px;
            left: 10px;
            text-align: center;
        }
    }
}

#emailDisplay {
    font-family: monospace;
    padding-left: 0.5rem;
}
