/*
Theme Name: Ferngla
Theme URI: https://www.ferngal-schweisstechnik.de
Author: Tim Gatzke <post@tim-gatzke.de>
Author URI: https://tim-gatzke.de/
Description: Proprietary theme for FERNGAL Schweisstechnik GmbH made by Tim Gatzke
Version: 1.0.0
*/

/* ========================================
   CSS RESET & BASE STYLES
======================================== */

* {
    font-family: Verdana, Geneva, Tahoma, Sans-Serif;
    font-size: 12px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html { 
    -webkit-text-size-adjust: none; 
    height: 100%;
}

body {
    width: 100%;
    color: #fff;
    background: #59595b url('assets/images/background.jpg') repeat fixed center top;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

img, #content a img {
    border: none;
    max-width: 100%;
    height: auto;
}

#content img {
    box-shadow: 0 1px 5px 0 #4A4A4A;
}

#content {
    word-wrap: break-word;	
}

/* ========================================
   TYPOGRAPHY
======================================== */

p, td {
    line-height: 22px;
}

h1, h2, .newsflash-title {
    font-size: 14px;
    margin-bottom: 30px;
    color: #009ee0;
}

h2 {
    font-size: 14px !important;
    color: #009ee0 !important;
    font-family: Verdana, Geneva, Tahoma, Sans-Serif !important;
}

a {
    text-decoration: none;
    color: #009ee0;
}

a:hover {
    text-decoration: underline;
}

/* ========================================
   MAIN LAYOUT STRUCTURE
======================================== */

#main {
    max-width: 995px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

#header {
    width: 100%;
    max-width: 995px;
    height: auto;
    min-height: 170px;
    z-index: 1;
    margin: 0 auto;
    position: relative;
}

#header img {
    margin-top: 30px;
    width: 100%;
    max-width: 995px;
    height: auto;
}

/* ========================================
   NAVIGATION MENU
======================================== */

#menu, #slider {
    width: 100%;
    max-width: 995px;
    height: auto;
    min-height: 33px;
    z-index: 2;
    position: relative;
    margin: 0 auto;
}

#menu {
    position: relative;
    overflow: visible;
}

#menu ul.nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

#menu ul.nav li {
    position: relative;
    margin: 0;
    padding: 0;
}

#menu ul.nav li a {
    color: #fff;
    font-family: Verdana;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
    padding: 5px 18px;
    margin-right: 8px;
    height: auto;
    min-height: 28px;
    display: block;
    white-space: nowrap;
    position: relative;
    transition: all 0.3s ease;
}

#menu ul.nav li a:hover,
#menu ul.nav li.current-menu-item a,
#menu ul.nav li.current_page_item a {
    background-color: #009ee0;
}

#menu ul.nav ul {
    display: none;
    position: absolute;
    background: transparent url('assets/images/menu_sub_bg.png') no-repeat scroll left bottom;
    padding: 8px 0;
    left: 0;
    top: 100%;
    min-width: 200px;
    z-index: 1000;
}

#menu ul.nav li:hover ul {
    display: block;
}

#menu ul.nav ul li {
    float: none;
    margin: 0;
    padding: 0px 20px;
    width: 100%;
}

#menu ul.nav ul li a {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-weight: normal;
    font-size: 12px;
    height: auto;
    padding: 8px 0;
    background: none;
    margin-right: 0;
    white-space: normal;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: #009ee0;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 10px;
    width: 100%;
    text-align: left;
}

.mobile-menu-toggle:hover {
    background: #007bb8;
}

/* ========================================
   LANGUAGE SWITCHER - FIXED POSITIONING
======================================== */

#language {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 100;
}

.language-switcher {
    text-align: right;
}

.language-switcher ul,
#language ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
    display: flex;
    flex-direction: row;
    gap: 5px;
    justify-content: flex-end;
}

.language-switcher li,
#language li,
.lang-item {
    display: inline-block !important;
    margin: 0;
    padding: 0;
    float: none !important;
}

#language .lang-item {
    margin: 0 3px 0 0;
}

#language ul li.lang-item {
    float: none !important;
    display: inline-block !important;
}

.language-switcher a,
#language a {
    display: inline-block;
    text-decoration: none;
    padding: 2px;
    border-radius: 2px;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.language-switcher a:hover,
#language a:hover {
    opacity: 1;
    transform: scale(1.05);
}

.language-switcher .active a,
#language .active a,
.language-switcher .current-lang a,
#language .current-lang a {
    opacity: 1.0;

}

.language-switcher img,
#language img {
    width: auto;
    height: 16px;
    max-width: 24px;
    border: 1px solid #ccc;
    display: inline-block;
    vertical-align: middle;
    transition: all 0.2s ease;
}

/* Force horizontal display for Polylang flags */
.pll-parent-menu-item,
.pll-parent-menu-item ul.sub-menu {
    display: inline-block !important;
}

/* ========================================
   SLIDER - SWIPER AUTOPLAY-ONLY IMPLEMENTATION
======================================== */

#slider-container {
    width: 100%;
    max-width: 995px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

#main-slider {
    width: 100%;
    height: auto;
    position: relative;
    background: #fff;
    box-shadow: 0px 1px 5px 0px #4a4a4a;
    cursor: default; /* Indicate no interaction */
}

#main-slider .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 373px;
    object-fit: cover;
    pointer-events: none; /* Disable all mouse interactions */
}

/* Hide all navigation and pagination elements */
#main-slider .swiper-button-next,
#main-slider .swiper-button-prev,
#main-slider .swiper-pagination,
.swiper-button-next,
.swiper-button-prev,
.swiper-pagination {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Disable selection and interaction on slider */
#main-slider,
#main-slider *,
#main-slider .swiper-wrapper,
#main-slider .swiper-slide {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Re-enable pointer events only for the container for proper rendering */
#slider-container {
    pointer-events: auto;
}

/* Responsive slider adjustments */
@media screen and (max-width: 991px) {
    #main-slider .swiper-slide img {
        max-height: 300px;
    }
}

@media screen and (max-width: 767px) {
    #main-slider .swiper-slide img {
        max-height: 200px;
    }
}

@media screen and (max-width: 575px) {
    #main-slider .swiper-slide img {
        max-height: 150px;
    }
}

/* ========================================
   CONTENT WRAPPER
======================================== */

#contentWrapper {
    width: 100%;
    margin: 0 auto;
    padding: 35px 15px;
    background: transparent url('assets/images/content_bg.png') repeat;
    overflow: hidden;
    margin-bottom: 30px;
}

#content {
    max-width: 995px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

#contentLeft {
    background-color: transparent;
    margin: 50px 0 30px 38px;
    opacity: 1;
    min-height: 180px;
    display: block;
    padding: 20px;
    flex: 1;
    min-width: 300px;
    color: #fff;
}

.vertical-divider {
    background-color: #ffffff;
    margin: 50px 0 30px 0;
    opacity: 1;
    min-height: 180px;
    display: block;
    flex: 0 0 1px;
    align-self: stretch;
}

#contentRight {
    width: 238px;
    min-height: 232px;
    padding: 15px;
    position: relative;
    flex: 0 0 auto;
    color: #fff;
}

#contentRight .newsflash,
#contentRight .widget {
    padding: 0;
    position: relative;
    padding-top: 10px;
}

/* Special styling for sidebar title */
#contentRight h4.newsflash-title, 
#contentRight .widget-title {
    margin-bottom: 15px;
    margin-left: 0;
    padding-left: 25px;
}

/* ========================================
   FOOTER
======================================== */

#footerWrapper {
    border-top: 1px solid #fff;
    width: 100%;
    background-color: transparent;
    position: relative;
    left: 0;
    right: 0;
    box-sizing: border-box;
    margin: 0 0 0 0;
    padding: 0;
    display: block;
}

#footer {
    max-width: 995px;
    width: 100%;
    margin: 5px auto 0;
    background: transparent url('assets/images/scheinfootermenue.png') no-repeat scroll right;
    height: auto;
    min-height: 96px;
    position: relative;
    z-index: 1;
    padding: 15px;
}

#footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: right;
    padding-top: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

#footer ul li {
    display: inline-block;
    margin: 0;
    padding: 0 5px;
    position: relative;
    vertical-align: middle;
}

#footer .separator {
    color: #fff;
    opacity: 0.7;
    font-size: 16px;
    line-height: 16px;
    margin: 0 5px;
    display: inline-block;
    vertical-align: middle;
}

#footer ul li a {
    color: #fff;
    text-decoration: none;
}

#footer ul li a:hover {
    text-decoration: underline;
}

#contentFooter {
    max-width: 995px;
    width: 100%;
    height: auto;
    min-height: 60px;
    background: transparent url('assets/images/contentFooter_bg.jpg') no-repeat;
    margin: 30px auto 0;
    position: relative;
    z-index: 2;
    padding: 15px;
}

#contentFooter td, #contentFooter a {
    color: #fff;
    text-decoration: none;
}

#contentFooter td {
    padding: 12px;
}

p {
    margin: 0 0 22px;
}

/* Force horizontal display for Polylang flags - overriding any Polylang defaults */
.pll-parent-menu-item ul.sub-menu,
ul.pll-parent-menu-item,
#language ul.lang-inline,
ul.lang-inline {
    display: flex !important;
    flex-direction: row !important;
    gap: 5px !important;
}

/* Handle individual language items */
.pll-parent-menu-item li,
ul.lang-inline li,
.lang-item {
    float: none !important;
    display: inline-block !important;
    margin: 0 3px 0 0 !important;
}

/* Remove any box model properties that might cause stacking */
#language ul li.lang-item + li.lang-item {
    clear: none !important;
    float: none !important;
}

/* Finally, add !important to essential positioning properties */
#language {
    position: absolute !important;
    top: 15px !important;
    right: 20px !important;
    z-index: 100 !important;
}

/* ========================================
   RESPONSIVE MEDIA QUERIES
======================================== */

/* Large Desktop (1200px and up) */
@media screen and (min-width: 1200px) {
    #main {
        padding: 0 30px;
    }
}

/* Desktop/Laptop (992px to 1199px) */
@media screen and (max-width: 1199px) {
    #main {
        padding: 0 20px;
    }
    
    #footer {
        background-size: contain;
    }
}

/* Tablet (768px to 991px) */
@media screen and (max-width: 991px) {
    #main {
        padding: 0 15px;
    }
    
    #header {
        text-align: center;
    }
    
    #header img {
        margin-top: 20px;
    }
    
    #menu ul.nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    #menu ul.nav li a {
        font-size: 14px;
        padding: 5px 12px;
        margin-right: 4px;
    }
    
    #content {
        flex-direction: column;
        gap: 15px;
    }
    
    #contentLeft {
        margin: 20px 0;
        min-width: auto;
        width: 100%;
        background-color: transparent;
        color: #fff;
    }
    
    .vertical-divider {
        display: none;
    }
    
    #contentRight {
        width: 100%;
        padding: 15px 0;
        color: #fff;
    }
    
    #footer ul {
        justify-content: center;
        text-align: center;
        padding-top: 20px;
    }
    
    #language {
        position: static;
        text-align: center;
        margin: 0 0;
        transform: none;
        margin-top: -12px; /* Move flags up on tablet */
    }
    
    #language ul {
        justify-content: center;
    }

    .language-switcher img,
    #language img {
        border: none;
    }
}

/* Mobile Large (576px to 767px) */
@media screen and (max-width: 767px) {
    body {
        background-attachment: scroll;
    }
    
    #main {
        padding: 0 10px;
    }
    
    #header {
        height: auto;
        min-height: auto;
    }
    
    #header img {
        margin-top: 15px;
    }
    
    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: block;
    }
    
    #menu ul.nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(0, 0, 0, 0.9);
        padding: 10px 0;
        border-radius: 5px;
    }
    
    #menu ul.nav.mobile-active {
        display: flex;
    }
    
    #menu ul.nav li {
        width: 100%;
        margin: 0;
    }
    
    #menu ul.nav li a {
        display: block;
        width: 100%;
        padding: 10px 15px;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 14px;
        color: #fff;
    }
    
    #menu ul.nav li:last-child a {
        border-bottom: none;
    }
    
    #menu ul.nav ul {
        position: static;
        display: block;
        background: rgba(0, 158, 224, 0.2);
        padding: 0;
        margin-left: 20px;
    }
    
    #menu ul.nav ul li a {
        padding: 8px 15px;
        font-size: 12px;
        color: #fff;
    }
    
    /* Content adjustments */
    #contentWrapper {
        padding: 20px 10px;
    }
    
    #contentLeft {
        margin: 10px 0;
        padding: 15px;
        background-color: transparent;
        color: #fff;
    }
    
    #contentRight {
        padding: 10px 0;
        color: #fff;
    }
    
    #contentRight p, 
    #contentRight .textwidget {
        color: #fff;
    }
    
    #contentRight h4.newsflash-title, 
    #contentRight .widget-title {
        padding-left: 15px;
        color: #009ee0 !important;
    }
    
    /* Footer adjustments */
    #footer {
        background: none;
        padding: 10px;
        text-align: center;
    }
    
    #footer ul {
        flex-direction: column;
        gap: 10px;
        padding-top: 15px;
    }
    
    #footer .separator {
        display: none;
    }
    
    #contentFooter {
        background: none;
        padding: 10px;
    }
    
    /* Typography adjustments */
    h1, h2, .newsflash-title {
        font-size: 16px;
        margin-bottom: 20px;
        color: #009ee0;
    }
    
    p, td {
        line-height: 20px;
    }
    
    * {
        font-size: 14px;
    }
    
    #menu ul.nav li a {
        font-size: 14px;
    }
    
    /* Mobile responsive sidebar fixes */
    .responsive-sidebar {
        background: transparent;
        padding: 0;
        border-radius: 0;
    }
    
    .responsive-sidebar .widget {
        padding: 0;
        margin-bottom: 20px;
        background: transparent;
    }
    
    .responsive-sidebar .widget-title {
        font-size: 16px !important;
        text-align: left;
        padding-left: 15px;
        color: #009ee0 !important;
        margin-bottom: 20px !important;
    }
    
    .contact-info {
        padding-left: 15px;
        color: #fff;
    }
    
    .contact-info p {
        font-size: 14px;
        margin-bottom: 20px;
        color: #fff;
    }
    
    .contact-details {
        flex-direction: column;
        gap: 12px;
    }
    
    .contact-item {
        min-width: auto;
        padding: 0;
        background: transparent;
        border-radius: 0;
        margin-bottom: 8px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-label {
        margin-right: 0;
        margin-bottom: 2px;
        color: #fff;
    }
    
    .contact-phone,
    .contact-email {
        font-size: 13px;
        padding: 0;
        color: #009ee0 !important;
    }
    
    .contact-phone:hover,
    .contact-email:hover {
        color: #fff !important;
    }
    
    .contact-fax {
        font-size: 13px;
        color: #fff;
    }
    
    .additional-widgets .widget {
        padding: 0;
        text-align: left;
        background: transparent;
    }
    
    .additional-widgets .widget-title {
        font-size: 16px !important;
        color: #009ee0 !important;
        padding-left: 15px;
    }
    
    .additional-widgets .textwidget {
        font-size: 14px;
        color: #fff;
        padding-left: 15px;
    }
    
    /* Responsive content fixes */
    .entry-title {
        font-size: 18px !important;
        line-height: 1.3;
        color: #009ee0;
    }
    
    .entry-meta {
        font-size: 11px;
        text-align: center;
        color: #ccc;
    }
    
    .responsive-content {
        font-size: 14px;
        line-height: 1.5;
        color: #fff;
    }
}

/* Mobile Small (up to 575px) */
@media screen and (max-width: 575px) {
    #main {
        padding: 0 5px;
    }
    
    #header img {
        margin-top: 10px;
    }
    
    #contentWrapper {
        padding: 15px 5px;
    }
    
    #contentLeft {
        padding: 10px;
        background-color: transparent;
        color: #fff;
    }
    
    #language img {
        height: 14px;
    }
    
    /* Even smaller typography for very small screens */
    * {
        font-size: 13px;
    }
    
    h1, h2, .newsflash-title {
        font-size: 15px;
        color: #009ee0;
    }
    
    #menu ul.nav li a {
        font-size: 13px;
        padding: 8px 12px;
        color: #fff;
    }
    
    .responsive-sidebar {
        margin-top: 15px;
        padding: 0;
        background: transparent;
    }
    
    .responsive-sidebar .widget {
        padding: 0;
        margin-bottom: 15px;
        background: transparent;
    }
    
    .responsive-sidebar .widget-title {
        font-size: 15px !important;
        color: #009ee0 !important;
        padding-left: 10px;
    }
    
    .contact-info p {
        font-size: 13px;
        line-height: 1.4;
        color: #fff;
    }
    
    .contact-phone,
    .contact-email {
        font-size: 13px;
        word-break: break-all;
        color: #009ee0 !important;
    }
    
    .contact-fax {
        font-size: 13px;
        color: #fff;
    }
    
    .additional-widgets .textwidget {
        font-size: 13px;
        color: #fff;
        padding-left: 10px;
    }
    
    .entry-title {
        font-size: 16px !important;
        color: #009ee0;
    }
    
    .responsive-content {
        font-size: 13px;
        color: #fff;
    }
}

/* Very Small Mobile (up to 400px) */
@media screen and (max-width: 400px) {
    #main {
        padding: 0 3px;
    }
    
    #contentLeft {
        padding: 8px;
        background-color: transparent;
        color: #fff;
    }
    
    #contentWrapper {
        padding: 10px 3px;
    }
    
    * {
        font-size: 12px;
    }
    
    h1, h2, .newsflash-title {
        font-size: 14px;
        color: #009ee0;
    }
    
    .responsive-sidebar {
        padding: 0;
        background: transparent;
    }
    
    .responsive-sidebar .widget {
        padding: 0;
        background: transparent;
    }
    
    .responsive-sidebar .widget-title {
        font-size: 14px !important;
        color: #009ee0 !important;
        padding-left: 8px;
    }
    
    .contact-info p {
        font-size: 12px;
        color: #fff;
    }
    
    .contact-phone,
    .contact-email {
        font-size: 12px;
        color: #009ee0 !important;
    }
    
    .contact-fax {
        color: #fff;
    }
    
    .additional-widgets .textwidget {
        color: #fff;
        padding-left: 8px;
    }
    
    .entry-title {
        font-size: 15px !important;
        margin-bottom: 15px;
        color: #009ee0;
    }
    
    .responsive-content {
        font-size: 12px;
        color: #fff;
    }
    
    .responsive-pagination a,
    .responsive-pagination .current {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    #menu, #language, #footer, .mobile-menu-toggle {
        display: none;
    }
    
    #main {
        width: 100%;
        max-width: none;
        padding: 0;
    }
    
    #content {
        flex-direction: column;
    }
    
    #contentLeft, #contentRight {
        width: 100%;
        background: white;
        box-shadow: none;
    }
    
    .responsive-sidebar .widget-title,
    .contact-info,
    .contact-phone,
    .contact-email,
    .contact-fax,
    .additional-widgets .textwidget {
        color: black !important;
    }
}

/* ========================================
   RESPONSIVE CONTENT STYLES - FIXED
======================================== */

.responsive-post {
    margin-bottom: 30px;
}

.entry-header {
    margin-bottom: 20px;
}

.entry-title {
    word-wrap: break-word;
    hyphens: auto;
    color: #009ee0;
}

.entry-meta {
    font-size: 12px;
    color: #ccc;
    margin-top: 10px;
}

.responsive-media {
    margin: 20px 0;
    text-align: center;
}

.responsive-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 5px 0 #4A4A4A;
}

.responsive-content {
    line-height: 22px;
    color: #fff;
}

.responsive-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 4px;
    box-shadow: 0 1px 5px 0 #4A4A4A;
}

.responsive-content iframe,
.responsive-content embed,
.responsive-content object,
.responsive-content video {
    max-width: 100%;
    height: auto;
}

.responsive-pagination {
    margin-top: 20px;
    text-align: center;
}

.responsive-pagination a {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    background: #009ee0;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.responsive-pagination a:hover {
    background: #007bb8;
}

.responsive-pagination .current {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    background: #666;
    color: white;
    border-radius: 4px;
}

/* Table responsive wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
}

.table-responsive table {
    min-width: 600px;
    width: 100%;
    border-collapse: collapse;
}

.table-responsive table th,
.table-responsive table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.table-responsive table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

/* Responsive utilities */
.hide-mobile { 
    display: block; 
}

.show-mobile { 
    display: none; 
}

.text-center-mobile { 
    text-align: left; 
}

.responsive-embed {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.responsive-embed::before {
    display: block;
    content: "";
}

.responsive-embed .responsive-embed-item,
.responsive-embed iframe,
.responsive-embed embed,
.responsive-embed object,
.responsive-embed video {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 16:9 aspect ratio */
.responsive-embed-16by9::before {
    padding-top: 56.25%;
}

/* 4:3 aspect ratio */
.responsive-embed-4by3::before {
    padding-top: 75%;
}

/* Gallery responsive styles */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.gallery-item {
    flex: 1 1 calc(33.333% - 10px);
    min-width: 200px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ========================================
   RESPONSIVE MEDIA QUERIES - ADDITIONAL - CLEANED
======================================== */

@media screen and (max-width: 767px) {
    .hide-mobile { 
        display: none !important; 
    }
    
    .show-mobile { 
        display: block !important; 
    }
    
    .text-center-mobile { 
        text-align: center !important; 
    }
    
    .gallery-item {
        flex: 1 1 calc(50% - 10px);
        min-width: 140px;
    }
    
    .table-responsive table {
        min-width: 480px;
        font-size: 12px;
    }
    
    .table-responsive table th,
    .table-responsive table td {
        padding: 6px 8px;
    }
}

@media screen and (max-width: 575px) {
    .gallery-item {
        flex: 1 1 100%;
        min-width: auto;
    }
    
    .table-responsive table {
        min-width: 320px;
        font-size: 11px;
    }
    
    .table-responsive table th,
    .table-responsive table td {
        padding: 4px 6px;
    }
}

/* ========================================
   RESPONSIVE SIDEBAR STYLES - FIXED
======================================== */

.responsive-sidebar {
    background: transparent;
    border-radius: 0;
    margin-top: 0;
}

.responsive-sidebar .widget {
    margin-bottom: 20px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.responsive-sidebar .widget-title {
    color: #009ee0 !important;
    font-size: 14px !important;
    margin-bottom: 30px !important;
    padding-bottom: 0;
    border-bottom: none;
    padding-left: 25px;
}

.contact-info {
    color: #fff;
    padding-left: 25px;
}

.contact-info p {
    margin-bottom: 15px;
    line-height: 22px;
    color: #fff;
}

.contact-details {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding-left: 0; /* Reset padding to align with parent */
}

.contact-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-width: 200px;
    padding: 4px;
    background: rgba(0, 158, 224, 0.05);
    border-radius: 6px;
    margin-left: 0; /* Ensure no left margin */
}

.contact-label {
    font-weight: normal;
    margin-right: 8px;
    min-width: 40px;
    color: #fff;
}

.contact-phone,
.contact-email {
    color: #009ee0 !important;
    text-decoration: none;
    font-weight: normal;
    transition: color 0.3s ease;
    font-size: 14px;
    padding: 5px 0;
}

.contact-phone:hover,
.contact-email:hover {
    color: #fff !important;
    text-decoration: underline;
}

.contact-fax {
    color: #fff;
    font-size: 14px;
}

.additional-widgets .widget {
    margin-bottom: 15px;
    padding: 0;
    background: transparent;
}

.additional-widgets .widget-title {
    font-size: 14px !important;
    margin-bottom: 30px !important;
    color: #009ee0 !important;
    padding-left: 25px;
}

.additional-widgets .textwidget {
    font-size: 12px;
    line-height: 22px;
    color: #fff;
    padding-left: 25px;
}

/* ========================================
   RESPONSIVE SIDEBAR MEDIA QUERIES
======================================== */

@media screen and (max-width: 991px) {
    .responsive-sidebar {
        margin-top: 30px;
        background: transparent;
        padding: 0;
        border-radius: 0;
    }
    
    .responsive-sidebar .widget {
        margin-bottom: 25px;
        padding: 0;
        background: transparent;
    }
    
    .contact-info {
        text-align: center;
        color: #fff;
        padding-left: 0; /* Reset padding for mobile */
    }
    
    .contact-details {
        justify-content: center;
        padding-left: 0; /* Reset padding for mobile */
    }
    
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-left: 0; /* Reset margin for mobile */
    }
    
    .contact-label {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

@media screen and (max-width: 767px) {
    .responsive-sidebar {
        margin-top: 20px;
        padding: 15px;
        border-radius: 8px;
    }
    
    .responsive-sidebar .widget {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .responsive-sidebar .widget-title {
        font-size: 18px !important;
        text-align: center;
        padding-bottom: 10px;
    }
    
    .contact-info p {
        text-align: center;
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .contact-details {
        flex-direction: column;
        gap: 12px;
    }
    
    .contact-item {
        min-width: auto;
        margin-bottom: 8px;
    }
    
    .contact-phone,
    .contact-email,
    .contact-fax {
        font-size: 13px;
    }
}

@media screen and (max-width: 575px) {
    .responsive-sidebar {
        margin-top: 15px;
        padding: 12px;
    }
    
    .responsive-sidebar .widget {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .responsive-sidebar .widget-title {
        font-size: 16px !important;
    }
    
    .contact-info p {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .contact-phone,
    .contact-email {
        font-size: 14px;
        word-break: break-all;
    }
    
    .contact-fax {
        font-size: 13px;
    }
    
    .additional-widgets .textwidget {
        font-size: 13px;
    }
}

@media screen and (max-width: 400px) {
    .responsive-sidebar {
        padding: 10px;
    }
    
    .responsive-sidebar .widget {
        padding: 10px;
    }
    
    .responsive-sidebar .widget-title {
        font-size: 15px !important;
    }
    
    .contact-info p {
        font-size: 12px;
    }
    
    .contact-phone,
    .contact-email {
        font-size: 13px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    #menu, #language, #footer, .mobile-menu-toggle {
        display: none;
    }
    
    #main {
        width: 100%;
        max-width: none;
        padding: 0;
    }
    
    #content {
        flex-direction: column;
    }
    
    #contentLeft, #contentRight {
        width: 100%;
        background: white;
        box-shadow: none;
    }
}