body {
    padding: 0;
    margin: 0;
    font-family: Arial, sans-serif;
    background: url('background.png') center/cover no-repeat fixed;
    height: 100vh; 
    height: calc(var(--vh, 1vh) * 100); /* Use dynamic viewport height */
    overflow: hidden;
}

/* Frosted glass blur overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('background.png') center/cover no-repeat fixed;
    filter: blur(8px);
    z-index: -1;
}

#main {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: fixed;
    overflow: hidden;
}

.sections-container {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

.section {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 2rem 5rem; /* Increased bottom padding to create space for dots */
    box-sizing: border-box;
    color: #333;
}

/* Colorful section themes */
.section:nth-child(1) { background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 142, 83, 0.2)); }
.section:nth-child(2) { background: linear-gradient(135deg, rgba(72, 219, 251, 0.2), rgba(118, 174, 230, 0.2)); }
.section:nth-child(3) { background: linear-gradient(135deg, rgba(162, 155, 254, 0.2), rgba(205, 132, 241, 0.2)); }
.section:nth-child(4) { background: linear-gradient(135deg, rgba(46, 213, 115, 0.2), rgba(0, 210, 211, 0.2)); }

/* Dot navigation */
.dots-nav {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10000; /* Make sure it's above everything */
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.dot.active {
    background: linear-gradient(135deg, #ff6b6b, #feca57, #48dbfb, #1dd1a1, #5f27cd, #ee5253, #f368e0);
    background-size: 200% 200%;
    animation: rainbow-dot 2s linear infinite;
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    border-color: #fff;
}

@keyframes rainbow-dot {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* Header logo styling */
.header-logo {
    display: block;
    margin-top: 5px;
    margin-bottom: 1.5rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

/* Section content styling */
.section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
}

.section p {
    font-size: 1.2rem;
    text-align: center;
    line-height: 1.6;
    max-width: 600px;
    color: #34495e;
    background: none;         /* Remove background */
    padding: 0;               /* Remove padding */
    border-radius: 0;         /* Remove border radius */
    backdrop-filter: none;    /* Remove blur */
    margin: 0 auto;           /* Keep centered */
}

/* --- New Styles for Section Content --- */

/* Section 1: Ensure header image and text always fit */
.section:nth-child(1) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    box-sizing: border-box;
    padding-top: 2.5vh;
    padding-bottom: 2.5vh;
    overflow: hidden;
}

.section:nth-child(1) .header-logo {
    max-width: 90vw;
    max-height: 28vh;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-top: 0;
    margin-bottom: 0.4rem;
    display: block;
}

.section:nth-child(1) .social-icons {
    margin-top: 0;
    margin-bottom: 1rem;
}

.section:nth-child(1) p {
    flex: 1 1 auto;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    font-size: 1.2rem;
    text-align: center;
    line-height: 1.6;
    max-width: 600px;
    color: #34495e;
    background: rgba(255,255,255,0.38);
    border-radius: 18px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1.2rem;
    box-shadow: 0 2px 12px rgba(44,62,80,0.07);
    transition: background 0.2s;
    min-height: 0; /* Prevents flexbox from adding extra space */
    overflow: auto;
    height: auto;
}

/* Section 2 specific styles */
.section:nth-child(2) h2 {
    font-size: clamp(1.8rem, 4vw, 2.2rem); /* Reduced from 2.5rem max */
    margin-bottom: 0.5rem; /* Reduced from default */
}

.section:nth-child(2) p {
    font-size: clamp(0.9rem, 2.5vw, 1rem); /* Reduced from 1.1rem max */
    margin-bottom: 1rem; /* Reduced from 1.5rem */
    line-height: 1.4; /* Slightly tighter line height */
}

/* Section 2: Make header clearly visible and set max width */
.section:nth-child(2) {
    color: #222;
    overflow: auto;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 2rem 1rem 1.5rem 1rem;
}

.section:nth-child(2) h2 {
    color: #222;
    text-shadow: none;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* Image grid: allow more items and images */
.section:nth-child(2) .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 18px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    padding-bottom: 1.5rem;
}

.section:nth-child(2) .image-placeholder {
    aspect-ratio: 1 / 1;
    background: rgba(255,255,255,0.25);
    border: 2px dashed rgba(44,62,80,0.18);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    min-width: 0;
    min-height: 0;
}

.section:nth-child(2) .image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
    background: #fff;
    display: block;
}

/* Section 3: Ensure content always fits */
.section:nth-child(3) {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    max-height: 100vh;
    overflow: hidden;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
}

.section:nth-child(3) .content-wrapper {
    width: 100%;
    max-width: 500px;
    max-height: 100%;
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem; /* Tighter gap */
}

.section:nth-child(3) h2 {
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    margin-bottom: 0.3rem;
}

.section:nth-child(3) p {
    font-size: clamp(0.85rem, 2vw, 1rem);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    text-align: center;
}

.section:nth-child(3) img,
.section:nth-child(3) .image-placeholder {
    max-width: 90%;
    height: auto;
    max-height: 25vh;
    margin-bottom: 0.5rem;
    border-radius: 10px;
}

.section:nth-child(3) button,
.section:nth-child(3) .button {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    padding: 0.5em 1.2em;
    margin: 0.3rem 0;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
}

/* Section 3: Testimonials frosted glass effect */
.section:nth-child(3) .testimonial {
    background: rgba(255, 255, 255, 0.35); /* semi-transparent white */
    backdrop-filter: blur(8px);            /* frosted glass blur */
    -webkit-backdrop-filter: blur(8px);    /* Safari support */
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(44,62,80,0.08);
    padding: 1.2rem 1.1rem;
    margin: 0.7rem 0;
    max-width: 90vw;
    width: 100%;
    color: #2c3e50;
    text-align: center;
    transition: box-shadow 0.2s;
    width: 90%;
    max-width: 600px; /* Optional: limit to a reasonable max width */
    margin-left: auto;
    margin-right: auto;
}

/* Section 4: Contact Details */
.contact-details {
    background: rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    width: 100%;
    max-width: 500px;
}

/* Section 4: Ensure content fits and form is scrollable */
.section:nth-child(4) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Prevent section overflow */
}

.section:nth-child(4) h2 {
    font-size: clamp(1.8rem, 5vw, 2.7rem);
    margin-bottom: 1.5rem;
    text-align: center;
    color: #2c3e50;
    text-shadow: 2px 2px 8px rgba(255,255,255,0.7);
    word-break: break-word;
    line-height: 1.1;
    letter-spacing: 0.01em;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Make the contact form scrollable with visible scrollbar */
.contact-form {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  background: rgba(255,255,255,0.07);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(44,62,80,0.07);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  /* Limit height to fit inside section, allow scrolling */
  max-height: calc(100vh - 8rem); /* Adjust as needed for header/footer */
  overflow: auto;
  /* Always show scrollbar */
  scrollbar-width: auto;
  scrollbar-color: #3498db #f8fafc;
}

/* For Webkit browsers (Chrome, Edge, Safari) */
.contact-form::-webkit-scrollbar {
    width: 10px;
}
.contact-form::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 6px;
}
.contact-form::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 6px;
}

/* Contact Form Styles */
.contact-form {
  max-width: 400px;
  margin: 0 auto 0 auto; /* Remove top margin */
  background: rgba(255,255,255,0.07);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(44,62,80,0.07);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Inline label styles for contact form */
.contact-form .form-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-form label {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: #888;
  font-size: 1rem;
  pointer-events: none;
  transition: 0.18s all;
  padding: 0 0.2em;
  z-index: 2;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select {
  padding: 0.9rem 0.7rem 0.5rem 0.7rem;
  border: 1px solid #bfc9d1;
  border-radius: 7px;
  font-size: 1rem;
  background: #f8fafc;
  margin-bottom: 0.7rem;
  transition: border 0.2s;
}

.contact-form input[type="file"] {
  margin-bottom: 0.7rem;
}

.contact-form input:focus + label,
.contact-form input:not(:placeholder-shown) + label,
.contact-form select:focus + label,
.contact-form select:not([value=""]) + label {
  top: 0.25rem;
  left: 0.7rem;
  font-size: 0.82rem;
  color: #3498db;
  background: #f8fafc;
  padding: 0 0.2em;
}

.contact-form input:focus,
.contact-form select:focus {
  border-color: #3498db;
  outline: none;
}

/* Adjust for select and file input */
.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.contact-form .form-group small {
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

/* Make help text readable and match main text color */
.contact-form small {
  color: #34495e; /* Match main text color for readability */
  font-size: 0.95rem;
  margin-top: 0.1rem;
  background: none;
  padding: 0;
}

.contact-form .submit-btn {
  background: #3498db;
  color: #fff;
  border: none;
  padding: 0.7rem 0;
  border-radius: 7px;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.7rem;
  transition: background 0.2s;
}

.contact-form .submit-btn:hover,
.contact-form .submit-btn:focus {
  background: #217dbb;
}

.form-status {
  margin-top: 0.7rem;
  font-size: 1rem;
  min-height: 1.2em;
  color: #2c3e50;
  font-weight: 500;
  text-align: center;
}

@media (max-width: 600px) {
  .contact-form {
    padding: 1.2rem 0.5rem 1rem 0.5rem;
    max-width: 98vw;
  }
  .contact-form label {
    font-size: 0.98rem;
  }
  .contact-form .submit-btn {
    font-size: 1rem;
  }
  /* Make the page 4 title even smaller on small screens */
  .section:nth-child(4) h2 {
    font-size: clamp(1.1rem, 6vw, 1.5rem);
  }
  
  .section:nth-child(2) .image-placeholder {
    max-width: 70px;
    max-height: 70px;
    font-size: clamp(0.65rem, 2vw, 0.9rem);
  }
  
  .section:nth-child(2) .image-grid {
        margin-left: auto;
        margin-right: auto;
        justify-items: center;
    }
    .section:nth-child(2) {
        align-items: center;
    }
}

/* Landscape mode */
@media screen and (orientation: landscape) {
    #main {
        height: 96vh;
        width: 70vw;
        min-width: 480px;
        top: 2vh;
        margin: 0 auto;
        position: relative;
    }

    .header-logo {
        width: 95%;
        max-width: 350px;
        height: auto;
        object-fit: contain;
        margin-top: 5px;
        margin-bottom: 1.5rem;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    .section h2 {
        font-size: 2.8rem;
    }

    .section p {
        font-size: 1.3rem;
    }
    
    /* Tighter spacing for landscape */
    .section:nth-child(2) h2 {
        font-size: clamp(1.6rem, 3.5vw, 2rem);
        margin-bottom: 0.3rem;
    }
    
    .section:nth-child(2) p {
        font-size: clamp(0.8rem, 2vw, 0.95rem);
        margin-bottom: 0.8rem;
        line-height: 1.3;
    }
    
    /* Adjust image grid for landscape */
    .image-grid {
        max-width: min(450px, 55vw); /* Slightly smaller */
        max-height: calc(96vh - 8rem); /* Reduced from 12rem */
        gap: 8px; /* Smaller gap in landscape */
        margin-top: 0.3rem;
    }
    
    .image-placeholder {
        font-size: clamp(0.7rem, 1.3vw, 1rem);
        min-height: 50px; /* Smaller minimum */
    }
}

/* Portrait mode */
@media screen and (orientation: portrait) {
    #main {
        width: 100vw;
        height: 100vh;
        height: calc(var(--vh, 1vh) * 100);
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        margin: 0;
        box-sizing: border-box;
        border-radius: 0;
    }

    /* Header logo: at very top, 85vw wide, auto height, centered */
    .section:first-child .header-logo {
        margin-top: 0;
        margin-bottom: 2rem;
        width: 85vw;
        max-width: 85vw;
        max-height: 28vh;
        height: auto;
        object-fit: contain;
        display: block;
        align-self: center;
    }

    .section:nth-child(1) {
        padding-top: 2.5vh;
        padding-bottom: 2.5vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        height: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .section:nth-child(1) p {
        flex: 1 1 auto;
        overflow: auto;
        max-height: calc(100% - 32vh);
        width: 100%;
        margin: 0 auto 1.2rem auto;
        box-sizing: border-box;
        font-size: 1.2rem;
        text-align: center;
        line-height: 1.6;
        max-width: 600px;
        color: #34495e;
        background: rgba(255,255,255,0.38);      /* Frosted glass background */
        border-radius: 18px;
        backdrop-filter: blur(8px);              /* Frosted glass blur */
        -webkit-backdrop-filter: blur(8px);      /* Safari support */
        padding: 1.2rem 1.2rem 1.2rem 1.2rem;    /* Add padding for content */
        box-shadow: 0 2px 12px rgba(44,62,80,0.07);
        transition: background 0.2s;
    }

    /* Make image placeholders larger in portrait mode */
    .section:nth-child(2) .image-placeholder {
        max-width: 150px;
        max-height: 150px;
        min-width: 90px;
        min-height: 90px;
        font-size: clamp(1.1rem, 4vw, 1.3rem);
    }
    .section:nth-child(2) .image-grid {
        max-width: 95vw;
        gap: 16px;
    }
}

@media screen and (max-width: 600px) {
    .section:nth-child(3) .content-wrapper {
        max-width: 98vw;
        gap: 0.5rem;
    }
    .section:nth-child(3) img,
    .section:nth-child(3) .image-placeholder {
        max-height: 18vh;
    }
}

/* Social icons styling */
.social-icons {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.7rem;
    margin-bottom: 0.2rem;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(44,62,80,0.08);
    text-decoration: none;
    pointer-events: auto;
}

.social-icons a:hover {
    background: rgba(255,255,255,1);
    box-shadow: 0 4px 16px rgba(44,62,80,0.13);
}

.social-icons svg {
    display: block;
    width: 24px;
    height: 24px;
}

/* Remove floating social icons styles */
.social-icons-floating {
    display: none !important;
}

.section:nth-child(3),
.section:nth-child(4) {
    margin-left: 0 !important;
    padding-left: 0 !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
    align-items: center;
    justify-content: flex-start;
}

.section:nth-child(3) .testimonial,
.section:nth-child(4) .contact-form {
    margin-left: auto !important;
    margin-right: auto !important;
}

.section:nth-child(4) .contact-form {
    width: 90%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Lightbox styles */
.image-lightbox {
    position: fixed;
    z-index: 99999;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30,30,30,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.2s;
}

.image-lightbox .lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    background: #fff;
    margin: 2.5rem 0 1rem 0;
    object-fit: contain;
}

.image-lightbox .lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 2rem;
    color: #222;
    cursor: pointer;
    z-index: 100000;
    box-shadow: 0 2px 8px rgba(44,62,80,0.13);
    transition: background 0.2s;
}
.image-lightbox .lightbox-close:hover {
    background: #fff;
}

@media (max-width: 600px) {
    .image-lightbox .lightbox-img {
        max-width: 98vw;
        max-height: 65vh;
        margin-top: 2.5rem;
    }
    .image-lightbox .lightbox-close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 1.5rem;
    }
}

/* Desktop fix for section 2 image grid overlap */
@media (min-width: 700px) {
    .section:nth-child(2) .image-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 180px; /* Set a fixed row height */
        max-width: 700px;
        gap: 24px;
    }
    .section:nth-child(2) .image-placeholder {
        aspect-ratio: unset;
        height: 100%;
        min-height: 0;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    .section:nth-child(2) .image-placeholder img {
        width: 90%;
        height: 90%;
        object-fit: contain;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(44,62,80,0.07);
        background: #fff;
        display: block;
    }
}

@media (min-width: 634px) and (max-width: 699px) {
    .section:nth-child(2) .image-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
        max-width: 480px;
        gap: 18px;
    }
    .section:nth-child(2) .image-placeholder {
        aspect-ratio: unset;
        height: 100%;
        min-height: 0;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    .section:nth-child(2) .image-placeholder img {
        width: 90%;
        height: 90%;
        object-fit: contain;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(44,62,80,0.07);
        background: #fff;
        display: block;
    }
}

.contact-form textarea {
  padding: 0.9rem 0.7rem 0.5rem 0.7rem;
  border: 1px solid #bfc9d1;
  border-radius: 7px;
  font-size: 1rem;
  background: #f8fafc;
  margin-bottom: 0.7rem;
  transition: border 0.2s;
  min-height: 90px;
  resize: vertical;
}

.contact-form textarea:focus + label,
.contact-form textarea:not(:placeholder-shown) + label {
  top: 0.25rem;
  left: 0.7rem;
  font-size: 0.82rem;
  color: #3498db;
  background: #f8fafc;
  padding: 0 0.2em;
}