#gallery{
    padding:40px 0;
}

#gallery h1, #gallery p, #gallery ul, #gallery a{
    margin:0;
    padding:0;
    list-style:none;
    line-height:normal;
}

#gallery li{display:inline;}

#gallery a.swap:link, #gallery a.swap:visited, #gallery a.swap:hover{
    display:block;
    float:left;
    width:290px;
    height:105px;
    margin:0 0 7px 10px;
    padding:4px;
    color:#666666;
    background-color:#F5F5F5;
    border:1px solid #DADADA;
    cursor: pointer;
}

#gallery .image_holder {
    display: none;
    position: absolute;
}

#gallery .image_holder:first-child {
    display: block;
}

#gallery li.placeholder, #gallery a.swap{
    background:4px 4px no-repeat;
}

#gallery li.last a.swap{
    margin-bottom:0;
}

a.swap:hover {
    white-space:normal;
}

a.swap:link strong, a.swap:visited strong, a.swap:active strong{
    height: 30px;
    background: #E8A220;
    display: block;
    position: relative;
    top: 73px;
    opacity: .9;
    color: #FFF;
    text-align: center;
    padding-top: 3px;
    font-size: 14px;
    cursor: pointer;
}

a.swap:hover strong {
    background: #F5F5F5;
    color: #666;
}

a.swap:link span, a.swap:visited span, a.swap:active span{
    visibility:hidden;
    position:absolute;
    top:45px;
    left:5px;
    width:640px;
    height:349px;
}

a.swap:active span, a.swap:hover span, a.swap:focus span{
    visibility:visible;
}

a.swap:active img, a.swap:focus img {
    position:relative;
    z-index:50;
}

#gallery .placeholder{
    display:block;
    float:left;
    width:640px;
    height:349px;
    margin:0;
    padding:4px;
    color:#666666;
    background-color:#F5F5F5;
    border:1px solid #DADADA;
}

#image_holder img {
    width: 640px;
    height: 349px;
}

#gallery_navigation ul li img {
    display: block;
}

#gallery_navigation ul li a {
    display: block;
    float: left;
    width: 290px;
    height:105px;
    margin: 0 0 7px 10px;
    padding: 4px;
    color: #666666;
    background-color:#F5F5F5;
    border:1px solid #DADADA;
    display: block;
}

#gallery_navigation span {
    height: 30px;
    background: #E8A220;
    opacity: .9;
    color: #FFF;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    width: 290px;
    position: absolute;
    margin-top: -35px;
    font-weight: bold;
    padding-top: 5px;
    display: block;
}

/* ----------------------------------------------Middle Content Block-------------------------------------*/

#content .homecontent{
    display:block;
    width:630px;
    margin:20px 0 0 0;
    padding:0;
}

#content .homecontent ul{
    margin:0;
    padding:0;
    list-style:none;
}

#content .homecontent li{
    display:block;
    float:left;
    width:300px;
    margin:0 30px 0 0;
    padding:0;
}

#content .homecontent li.last{margin-right:0;}

#content .homecontent li p.imgholder{
    display:block;
    width:286px;
    height:100px;
    margin:0 0 15px 0;
    padding:6px;
    color:#666666;
    background-color:#F7F7F7;
    border:1px solid #CCCCCC;
}

#content .homecontent li h2{
    margin:0;
    padding:0 0 8px 0;
    font-size:13px;
    font-weight:bold;
    color:#666666;
    background-color:#FFFFFF;
    line-height:normal;
    border-bottom:1px dashed #CCCCCC;
}

#content .homecontent p.readmore{
    display:block;
    width:300px;
    font-weight:bold;
    text-align:right;
    line-height:normal;
}

/* Responsive Gallery Styles */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    #gallery {
        padding: 20px 0;
    }

    #gallery .placeholder {
        display: none;
    }

    #image_holder img {
        width: 100%;
        height: auto;
        max-height: 300px;
        object-fit: cover;
    }

    #gallery_navigation {
        padding: 20px 0;
    }

    #gallery_navigation ul {
        display: flex;
        flex-direction: row;
        gap: 15px;
        padding: 0;
        margin: 0;
        justify-content: space-between;
    }

    #gallery_navigation ul li {
        flex: 1;
        margin: 0;
        list-style: none;
    }

    #gallery_navigation ul li a {
        width: 100%;
        height: auto;
        min-height: 90px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 15px;
        box-sizing: border-box;
        border-radius: 8px;
        transition: all 0.3s ease;
        float: none;
    }

    #gallery_navigation ul li a:hover {
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        border-left: 4px solid #E8A220;
        border-right: 1px solid #e0e0e0;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
    }

    #gallery_navigation ul li a:hover span::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, #E8A220 0%, #f39c12 100%);
        border-radius: 1px;
    }

    #gallery_navigation ul li.active a {
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        border-left: 4px solid #E8A220;
        border-right: 1px solid #e0e0e0;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
    }

    #gallery_navigation ul li.active span::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, #E8A220 0%, #f39c12 100%);
        border-radius: 1px;
    }

    #gallery_navigation ul li img {
        width: 70px;
        height: 70px;
        object-fit: cover;
        margin-right: 20px;
        border-radius: 6px;
        flex-shrink: 0;
        display: block;
    }

    #gallery_navigation span {
        position: relative;
        width: auto;
        height: auto;
        background: none;
        color: #333;
        font-size: 16px;
        font-weight: 600;
        padding: 0;
        margin: 0;
        text-align: left;
        line-height: 1.4;
        opacity: 1;
        display: block;
    }
}

@media screen and (max-width: 768px) {
    #gallery {
        padding: 20px 0;
    }

    #gallery .placeholder {
        display: none;
    }

    #image_holder img {
        width: 100%;
        height: auto;
        max-height: 250px;
        object-fit: cover;
    }

    #gallery_navigation {
        padding: 20px 0;
    }

    #gallery_navigation ul {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 0;
        margin: 0;
    }

    #gallery_navigation ul li {
        width: 100%;
        margin: 0;
        list-style: none;
    }

    #gallery_navigation ul li a {
        width: 100%;
        height: auto;
        min-height: 90px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 15px;
        box-sizing: border-box;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    #gallery_navigation ul li a:hover {
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        border-left: 4px solid #E8A220;
        border-right: 1px solid #e0e0e0;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
    }

    #gallery_navigation ul li a:hover span::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, #E8A220 0%, #f39c12 100%);
        border-radius: 1px;
    }

    #gallery_navigation ul li.active a {
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        border-left: 4px solid #E8A220;
        border-right: 1px solid #e0e0e0;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
    }

    #gallery_navigation ul li.active span::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, #E8A220 0%, #f39c12 100%);
        border-radius: 1px;
    }

    #gallery_navigation ul li img {
        width: 70px;
        height: 70px;
        object-fit: cover;
        margin-right: 20px;
        border-radius: 6px;
        flex-shrink: 0;
    }

    #gallery_navigation span {
        position: relative;
        width: auto;
        height: auto;
        background: none;
        color: #333;
        font-size: 18px;
        font-weight: 600;
        padding: 0;
        margin: 0;
        text-align: left;
        line-height: 1.4;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
}

@media screen and (max-width: 480px) {
    #gallery_navigation {
        padding: 15px 0;
    }

    #gallery_navigation ul {
        gap: 12px;
    }

    #gallery_navigation ul li a {
        min-height: 80px;
        padding: 12px;
    }

    #gallery_navigation ul li img {
        width: 60px;
        height: 60px;
        margin-right: 15px;
    }

    #gallery_navigation span {
        font-size: 16px;
        font-weight: 600;
        line-height: 1.3;
    }

    #image_holder img {
        max-height: 200px;
    }
}
