/* Reset margins and padding for all elements */
*, html {
    margin: 0;
    padding: 0;
}

body {
    font-family: verdana, arial, sans-serif;
    font-size: 14px;
    background: #457a92;
}

a {
    color: #457a92;
    text-decoration: none;
}

a:hover {
    color: #ccc;
}

img {
    border: none;
}

h1, h2, h3 {
    float: left;
    width: auto;
    font-size: 18px;
    color: #c1c1c1;
}

div.hdwb_heading {
    border-bottom: 1px solid #ccc;
    float: left;
    width: 100%;
    color: #c1c1c1;
    padding: 5px 5px 5px 20px;
    margin-bottom: 20px;
}

/* Adjust header to be fully responsive */
#hdwb_header {
    width: 100%;
    max-width: 1400px;
    float: left;
    padding: 15px 0 0 20px;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 18px;
}

/* Main container */
#hdwb_main_box {
    margin: 0 auto;
    width: 100%;
    max-width: 1400px;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
    background: #f7f7f7;
}

/* Content sections */
#hdwb_content, #hdwb_content_left {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    float: left;
    box-sizing: border-box;
}

/* Flex container for wallpapers with proper alignment */
.hdwb_wallpaper_grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

/* Each wallpaper thumb */
.hdwb_thumb {
    flex-basis: calc(25% - 20px); /* 4 images per row */
    box-sizing: border-box;
    text-align: center;
    margin-bottom: 10px;
}

.hdwb_thumb img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    box-shadow: 0 0 7px #ccc;
    transition: box-shadow 0.3s ease-in-out;
}

.hdwb_thumb img:hover {
    box-shadow: 0 0 10px #457a92;
}

.hdwb_thumb span {
    display: block;
    margin-top: 10px;
    color: #333;
    text-align: center;
}

/* Pagination styles */
.hdwb_pagination {
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

.hdwb_pagination a.pagenav,
.hdwb_pagination span.hdwb_pagenav {
    border: 1px solid #ccc;
    padding: 5px;
    margin: 3px;
    color: #457a92;
    text-decoration: none;
    background-color: #fff;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.hdwb_pagination a.pagenav:hover {
    border-color: #457a92;
    background-color: #457a92;
    color: #fff;
}

.hdwb_pagination span.hdwb_pagenav.current {
    background-color: #457a92;
    color: #fff;
    font-weight: bold;
}

.hdwb_pagination span.hdwb_pagenav {
    color: #333;
}

/* Ensure pagination is visible and not overlapping */
#hdwb_pagination_top {
    margin-bottom: 30px;
}

#hdwb_pagination_bottom {
    margin: 10px 0 20px 0;
}

.hdwb_pagination span.hdwb_pagenav,
.hdwb_pagination a.pagenav {
  display: inline-block;
  min-width: 30px;
  text-align: center;
}

/* Detail Page Main Image and Information */
#wallpaper-detail {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.wallpaper-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    box-shadow: 0 0 10px #ccc;
}

/* Small Images Thumbnails */
.small_images {
    display: flex;
    justify-content: space-evenly;
    max-width: 878px;
    margin: 20px auto;
    gap: 10px;
    font-size: 12px;
    padding: 0 20px;
}

.small_images span {
    display: block;
    text-align: center;
    color: #333;
    padding: 5px 5px 10px 5px;
}

.small_wallpaper {
    flex-grow: 1;
    height: auto;
    overflow: hidden;
    border: 1px solid #ccc;
    text-align: center;
    background: #fff;
    max-width: 200px;
}

.small_wallpaper img {
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

.small_wallpaper img:hover {
    transform: scale(1.1);
}

/* Wallpaper Information Section */
.wallpaper-info {
    background: #fff;
    padding: 15px 30px;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px #ddd;
    text-align: left;
    margin: 0 auto;
    max-width: 800px;
}

.wallpaper-info p {
    margin: 10px 0;
}

#resolutions a {
    display: inline-block;
    padding: 8px 12px;
    background: #457a92;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

#resolutions a:hover {
    background: #2e5d70;
}

/* Footer */
#hdwb_footer {
    float: left;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    border-top: 1px solid #ccc;
    padding: 10px 0;
    display: inline;
}

/* Responsive breakpoints */
@media only screen and (max-width: 768px) {
    .hdwb_thumb {
        flex-basis: calc(50% - 20px); /* 2 images per row */
    }

    .wallpaper-info {
        padding: 10px 20px;
    }

    .small_images {
        justify-content: space-evenly;
    }

    .small_wallpaper {
        width: 80px;
        height: auto;
    }
}

@media only screen and (max-width: 480px) {
    .hdwb_thumb {
        flex-basis: 100%; /* 1 image per row */
    }

    .wallpaper-image img {
        width: 100%;
    }

    .wallpaper-info {
        max-width: 100%;
    }

    .small_wallpaper {
        width: 60px;
        height: auto;
    }
}

/* Existing CSS remains as it is */

/* Styles for the privacy policy and contact form pages */
#hdwb_privacy, #hdwb_contact {
    background-color: #fff;
    padding: 20px 30px;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px #ddd;
    margin: 0 auto;
    max-width: 800px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    clear: both;
}

div.line-break {
    margin-bottom: 20px;
}

#hdwb_privacy b, #hdwb_contact b {
    font-weight: bold;
    color: #457a92;
}

#hdwb_privacy p, #hdwb_contact p {
    margin-bottom: 15px;
}

#hdwb_privacy a, #hdwb_contact a {
    color: #457a92;
    text-decoration: underline;
}

#hdwb_privacy a:hover, #hdwb_contact a:hover {
    color: #2e5d70;
}

/* Contact form styles */
#hdwb_contact .field {
    margin-bottom: 15px;
}

#hdwb_contact .label_style {
    font-weight: bold;
    margin-bottom: 5px;
    display: inline-block;
    color: #457a92;
}

#hdwb_contact .input_style {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

#hdwb_contact textarea {
    width: calc(100% - 20px);
    height: 150px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

#hdwb_contact fieldset {
    border: none;
}

#hdwb_contact .send_it {
    background-color: #457a92;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#hdwb_contact .send_it:hover {
    background-color: #2e5d70;
}

@media only screen and (max-width: 768px) {
    /* Adjust padding and margins for mobile view */
    #hdwb_privacy, #hdwb_contact {
        padding: 15px 20px;
    }

    #hdwb_contact .input_style, #hdwb_contact textarea {
        width: calc(100% - 15px);
    }
}

@media only screen and (max-width: 480px) {
    /* Further adjustment for smaller devices */
    #hdwb_privacy, #hdwb_contact {
        padding: 10px;
    }

    #hdwb_contact .input_style, #hdwb_contact textarea {
        width: calc(100% - 10px);
    }
}

