/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    text-align: center;
    padding-top: 150px; /* Adjusted for fixed header height */
}

/* Fixed Navigation Bar */
nav {
    background-color: lightblue; /* Navigation bar background */
    position: fixed;
    top: 0px;
    width: 100%;
    padding: 10px 0;
    z-index: 1100; /* Highest layer */
}

/* First Fixed Header (YUEN ARCHITECTURE) */
.header {
    background-color: navy; /* Navy blue background */
    color: lightblue; /* Light blue text */
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    font-style: italic;
    padding: 60px 0;
    position: fixed;
    top: 40px; /* Directly below navbar */
    width: 100%;
    z-index: 1000; /* Lower than navbar but above content */
}

/* Second Fixed Header (Innovative Designs for Modern UK Living) */
.secondary-header {
    background-color: lightblue; /* Light blue background */
    color: navy; /* Navy blue text */
    text-align: center;
    font-size: 14px; /* Adjusted font size */
    padding: 0px 0;
    position: fixed;
    top: 135px; /* Directly below first header */
    width: 100%;
    z-index: 1000; /* Lower than first header */
    font-weight: normal !important; /* Unbold the text */
}

/* Navigation Links */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

nav ul li {
    display: inline;
    margin: 0 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    padding: 10px;
}

/* Prevent Content from Overlapping Fixed Headers */
body {
    margin-top: 100px; /* Ensures content starts below all fixed elements */
}

/* Hero Section */
.hero {
    background-color: #f4f4f4;
    padding: 30px 0;
}

/* Buttons */
.btn {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    display: inline-block;
    margin-top: 20px;
}

/* Contact Form */
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
}

button {
    background-color: #333;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 20px 0;
    text-align: center;
    position: relative;
    width: 100%;
    bottom: 0;
}

/* Footer Styling */
.footer {
    background-color: navy; /* Changes footer background to navy blue */
    color: white; /* White text for contrast */
    text-align: center;
    padding: 15px 0;
    font-size: 14px;
    position: relative; /* Keeps it at the bottom without overlapping */
    width: 100%;
}

img {
    width: 40%;  /* Scales the image to 40% of its original size */
    height: auto; /* Maintains aspect ratio */
    display: block;
    margin: 10px auto; /* Centers the image */
}

.yuen-italic {
    font-style: italic;
}

/* Navigation Bar */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: navy; /* Navy blue background */
    text-align: center;
}

nav ul li {
    display: inline-block;
    position: relative;
}

nav ul li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
}

nav ul li:hover {
    background-color: darkblue; /* Slight hover effect */
}

/* Dropdown Menu */
.dropdown-content,
.sub-dropdown-content {
    display: none;
    position: absolute;
    background-color: navy;
    min-width: 160px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show dropdowns on hover */
.dropdown:hover .dropdown-content,
.sub-dropdown:hover .sub-dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Sub-Dropdown Position */
.sub-dropdown-content {
    top: 0;
    left: 100%; /* Moves the submenu to the right */
    background: navy;
    min-width: 180px;
}

/* Dropdown Links */
.dropdown-content li a,
.sub-dropdown-content li a {
    padding: 10px 15px;
    color: whit;
    display: block;
    text-decoration: none;
    white-space: nowrap;
}

.dropdown-content li a:hover,
.sub-dropdown-content li a:hover {
    background: #f1f1f1;
    color: #333;
}

/* Ensure content appears below the fixed header */
.content {
    margin-top: 30px; /* Adjust based on header height */
    padding: 20px;
}

/* Layout for Modern House, Art Gallery, etc. */
.modern-house-container, .art-gallery-container, .rear-extension-container, .exhibition-hall-container, .cafe-container, .restaurant-container, .rear-terrace-extension-container {
    display: flex;
    align-items: center; /* Aligns image and text vertically */
    justify-content: space-between; /* Ensures spacing */
    gap: 20px; /* Adds spacing between the image and text */
    padding: 20px;
}

/* Image Styles (for Modern House, Art Gallery, etc.) */
.modern-house-image, .art-gallery-image, .rear-extension-image, .exhibition-hall-image, .cafe-image, .restaurant-image, .rear-terrace-extension-image{
    width: 28%; /* Adjusts image width */
    max-width: 600px; /* Prevents image from being too large */
}

/* Text Styles (for Modern House, Art Gallery, etc.) */
.modern-house-text, .art-gallery-text, .rear-extension-text, .exhibition-hall-text, .cafe-text, .restaurant-text, .rear-terrace-extension-text {
    width: 50%;
    display: flex;
    flex-direction: column; /* Stacks header above description */
}

/* Header Styles (for Modern House, Art Gallery, etc.) */
.modern-house-header, .art-gallery-header, .rear-extension-header, .exhibition-hall-header, .cafe-header, .restaurant-header, .rear-terrace-extension-header {
    font-size: 22px; /* Adjust header size */
    font-weight: bold;
    text-align: left; /* Aligns header to the left */
    margin: 0; /* Removes extra margin */
}

/* Description Styles (for Modern House, Art Gallery, etc.) */
.modern-house-description, .art-gallery-description, .rear-extension-description, .exhibition-hall-description, .cafe-description, .restaurant-description, .rear-terrace-extension-description {
    font-size: 16px;
    line-height: 1.2;
    text-align: justify; /* Ensures description is well-formatted */
    margin: 10px 0; /* Adds spacing above and below */
}

/* Contact Form */
.contact-form {
    width: 80%;  /* Adjusts form width */
    max-width: 400px; /* Ensures the form doesn't get too wide */
    margin: 0 auto; /* Centers the form */
    text-align: center; /* Centers everything inside */
}

.contact-form label {
    display: block; /* Places each label on its own line */
    font-weight: bold;
    margin-bottom: 5px; /* Adds space between label and input */
    text-align: left; /* Aligns label text to the left */
}

.contact-form input,
.contact-form textarea {
    width: 100%; /* Makes all input boxes the same width */
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    display: block;
    margin: 0 auto 15px auto; /* Centers input boxes */
}

.contact-form textarea {
    height: 60px; /* Adjusts message box height */
    resize: vertical;
}

.contact-form button {
    width: 100%; /* Ensures the button matches input width */
    padding: 10px;
    font-size: 18px;
    background-color: lightblue;
    color: black;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.contact-form button:hover {
    background-color: #87CEEB;
}

/* Ensure bottom margin for Scope of Works content */
.scope-of-works-content {
    display: block;  /* Ensures block-level behavior */
    margin-bottom: 40px !important; /* Forces more space at the bottom */
    padding-bottom: 40px; /* Adds extra spacing inside the content */
}

/* Ensure bottom margin for Home page content */
.home-content {
    display: block;  /* Ensures block-level behavior */
    margin-bottom: 20px !important; /* Forces more space at the bottom */
    padding-bottom: 40px; /* Adds extra spacing inside the content */
}

/* Schematic Design Paragraph */
.schematic-paragraph {
    text-align: center; /* Aligns text to the center */
    font-style: italic; /* Makes text italic */
    margin-top: 30px; /* Adds space above the paragraph */
    font-size: 18px; /* Adjusts text size */
    color: #333; /* Dark gray text color */
}

@media (max-width: 768px) {
    .hero {
        padding: 20px 0; /* Adjust the padding for mobile screens */
    }

    .btn {
        padding: 8px 15px; /* Adjust button size for mobile */
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .modern-house-container, .art-gallery-container, .rear-extension-container, .rear-terrace-extension-container, .cafe-container, .restaurant-container, .exhibition-hall-container {
        flex-direction: column; /* Stacks content on smaller screens */
        text-align: center; /* Centers content */
    }

    .modern-house-image, .art-gallery-image, .rear-extension-image, .rear-terrace-extension-image, .cafe-image, .restaurant-image, .exhibition-hall-image {
        width: 80%; /* Adjusts image width for small screens */
    }

    .modern-house-text, .art-gallery-text, .rear-extension-text, .rear-terrace-extension-text, .cafe-text, .restaurant-text, .exhibition-hall-text {
        width: 100%; /* Adjusts text width for small screens */
    }

  /* Global styles for navigation */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: navy;
    display: flex;  /* Flexbox to align items in a horizontal row */
    justify-content: center; /* Center items horizontally */
    text-align: center;
}

nav ul li {
    display: inline-block; /* Ensure items are displayed in a row */
    margin: 0 20px;
}

nav ul li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
}

nav ul li:hover {
    background-color: darkblue; /* Hover effect */
}


    .secondary-header {
        font-size: 12px; /* Smaller font size for small screens */
    }

    .footer {
        font-size: 12px; /* Smaller font size for footer */
    }
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}
@media (max-width: 768px) {
    .content {
        padding: 20px;
        margin-top: 60px; /* Adjust top margin */
    }
     .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}
.gallery img {
    width: 80%; /* Reduce width */
    max-width: 200px; /* Limit maximum size */
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}
.home-content {
    display: block !important;
    visibility: visible !important;
    margin-top: 180px; /* Pushes content down below fixed headers */
    padding: 20px;
    text-align: center;
}
.home-page {
    margin-top: 200px !important;
}

/* Reset margin for other pages */
body:not(.home-page) {
    margin-top: 60px !important;
}
.contact-content {
    width: 100%;
    margin: 0 auto; /* Center the section */
    text-align: center; /* Center headings and intro text */
}

.contact-content ul {
    text-align: center; /* Ensures list items align left */
    display: inline-block; /* Prevents full-width stretching */
    margin-top: 10px; /* Adds space between paragraph and list */
    padding-left: 20px; /* Adjusts list indentation */
}

@media (max-width: 768px) {
    .gallery p {
        display: block; /* Ensures correct rendering */
        line-height: 1.2 !important;
        font-size: 14px !important;
        margin: 5px 0 !important;
    }
}
