/* Add here all your CSS customizations */

/* Enhanced Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Header improvements */
    #header .header-body {
        padding: 15px 0;
        min-height: auto;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    #header .header-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    #header .header-column {
        width: 100%;
        text-align: center;
    }
    
    #header .col-md-2 {
        display: flex;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    #header .col-md-2 img {
        max-height: 60px;
        width: auto;
        transition: transform 0.3s ease;
    }
    
    #header .col-md-2 img:hover {
        transform: scale(1.05);
    }
    
    /* Social icons styling */
    .social-icons {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin: 15px 0 !important;
    }
    
    .social-icons li a {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(14, 180, 166, 0.3);
    }
    
    .social-icons li a:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(14, 180, 166, 0.4);
    }
    
    /* Search bar improvements */
    #header .col-md-4 {
        margin-top: 0 !important;
        padding: 0 15px;
    }
    
    #header .input-group {
        max-width: 300px;
        margin: 0 auto;
        border-radius: 25px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    
    #header .form-control {
        border: none;
        border-radius: 25px 0 0 25px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    #header .input-group-btn .btn {
        border: none;
        border-radius: 0 25px 25px 0;
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white;
        padding: 12px 20px;
        transition: all 0.3s ease;
    }
    
    #header .input-group-btn .btn:hover {
        background: linear-gradient(135deg, #0a8f84 0%, #0eb4a6 100%);
    }
    
    /* Mobile navigation button */
    .btn.header-btn-collapse-nav {
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white;
        border: none;
        border-radius: 10px;
        padding: 12px 20px;
        font-size: 16px;
        box-shadow: 0 4px 15px rgba(14, 180, 166, 0.3);
        transition: all 0.3s ease;
    }
    
    .btn.header-btn-collapse-nav:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(14, 180, 166, 0.4);
    }
    
    /* Navigation menu improvements */
    .header-nav-main {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-radius: 15px;
        margin-top: 10px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .header-nav-main nav ul.nav-pills {
        display: flex;
        flex-direction: column;
        padding: 10px;
    }
    
    .header-nav-main nav ul.nav-pills li {
        margin: 5px 0;
    }
    
    .header-nav-main nav ul.nav-pills li a {
        border-radius: 10px;
        padding: 15px 20px;
        font-weight: 500;
        transition: all 0.3s ease;
        border: none;
        background: transparent;
        color: #333 !important;
        text-decoration: none;
    }
    
    .header-nav-main nav ul.nav-pills li a:hover {
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white !important;
        transform: translateX(5px);
    }
    
    .header-nav-main nav ul.nav-pills li.active a {
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white !important;
    }
    
    /* Additional menu styling fixes */
    .header-nav-main nav ul li a {
        color: #333 !important;
        text-decoration: none;
        padding: 15px 20px;
        display: block;
        border-radius: 10px;
        transition: all 0.3s ease;
    }
    
    .header-nav-main nav ul li a:hover {
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white !important;
        transform: translateX(5px);
    }
    
    .header-nav-main nav ul li.active a {
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white !important;
    }
    
    /* Dropdown menu fixes */
    .header-nav-main .dropdown-menu a {
        color: #333 !important;
        padding: 10px 20px;
        border-radius: 8px;
        margin: 2px 0;
        transition: all 0.3s ease;
    }
    
    .header-nav-main .dropdown-menu a:hover {
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white !important;
        transform: translateX(3px);
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    /* Compact layout for smaller screens */
    #header .header-body {
        padding: 10px 0;
    }
    
    .social-icons li a {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    #header .input-group {
        max-width: 250px;
    }
    
    #header .form-control {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    #header .input-group-btn .btn {
        padding: 10px 15px;
    }
    
    /* Enhanced typography */
    body {
        font-size: 14px;
        line-height: 1.6;
    }
    
    h1, h2, h3, h4, h5, h6 {
        margin-bottom: 15px;
        font-weight: 600;
    }
    
    /* Content spacing improvements */
    .main {
        padding: 20px 15px;
    }
    
    /* Card and content improvements */
    .thumbnail,
    .panel,
    .well {
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        border: none;
        margin-bottom: 20px;
        transition: transform 0.3s ease;
    }
    
    .thumbnail:hover,
    .panel:hover,
    .well:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    }
}

/* Smooth animations and transitions */
* {
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* Remove transition from specific elements for performance */
html, body {
    -webkit-transition: none;
    -moz-transition: none;
    -o-transition: none;
    transition: none;
}

/*box head news*/
.box-item {
    float: left;
    opacity: 1;
    overflow: hidden;
    position: relative;
}

.box-item img {
    width: 100%;
}
.box-item a {color:#FFF;}

.box-item .box-post span.meta {
    font-family:  sans-serif;
    font-size: 12px;
    color: #fff;
    margin-top: 15px;
    display: block;
}

.box-item .box-post span.meta span {
    margin-right: 15px;
}

.box-item .box-post {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background:rgba(0,0,0,0.6);
    padding: 30px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Mobile content enhancements */
@media (max-width: 768px) {
    /* Reduce empty spaces and improve content flow */
    .main {
        padding: 15px 0 !important;
        min-height: auto !important;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Remove excessive margins */
    .row {
        margin: 0 !important;
    }
    
    .mt-md, .mt-lg, .mb-xl, .mb-lg {
        margin: 10px 0 !important;
    }
    
    /* Product and service cards */
    .box-item {
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        margin-bottom: 15px;
        transition: all 0.3s ease;
        min-height: 200px;
    }
    
    .box-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }
    
    .box-item .box-post {
        padding: 20px;
        background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4));
    }
    
    .box-item .box-post h1.post-title {
        font-size: 16px;
        margin-bottom: 8px;
        font-weight: 600;
    }
    
    .box-item .box-post span.meta {
        font-size: 11px;
        margin-top: 10px;
    }
    
    /* Button improvements */
    .btn {
        border-radius: 25px;
        padding: 12px 25px;
        font-weight: 500;
        transition: all 0.3s ease;
        border: none;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }
    
    .btn-primary {
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
    }
    
    .btn-primary:hover {
        background: linear-gradient(135deg, #0a8f84 0%, #0eb4a6 100%);
    }
    
    /* Form improvements */
    form {
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-control {
        border-radius: 10px;
        border: 1px solid #e0e0e0;
        padding: 12px 15px;
        font-size: 14px;
        transition: all 0.3s ease;
    }
    
    .form-control:focus {
        border-color: #0eb4a6;
        box-shadow: 0 0 0 3px rgba(14, 180, 166, 0.1);
    }
    
    /* Table improvements */
    .table {
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    }
    
    .table thead th {
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white;
        border: none;
        font-weight: 500;
    }
    
    /* Alert improvements */
    .alert {
        border-radius: 10px;
        border: none;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    }
    
    /* Pagination improvements */
    .pagination > li > a,
    .pagination > li > span {
        border-radius: 10px;
        margin: 0 3px;
        border: none;
        color: #0eb4a6;
        transition: all 0.3s ease;
    }
    
    .pagination > li > a:hover,
    .pagination > li > span:hover {
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white;
        transform: translateY(-2px);
    }
    
    .pagination > .active > a,
    .pagination > .active > span {
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white;
    }
    
    /* Footer improvements */
    #footer {
        padding: 30px 0;
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white;
    }
    
    #footer h3 {
        color: white;
        margin-bottom: 20px;
        font-weight: 600;
    }
    
    #footer a {
        color: rgba(255, 255, 255, 0.8);
        transition: color 0.3s ease;
    }
    
    #footer a:hover {
        color: white;
    }
    
    /* Loading animations */
    .loading {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 3px solid rgba(14, 180, 166, 0.3);
        border-radius: 50%;
        border-top-color: #0eb4a6;
        animation: spin 1s ease-in-out infinite;
    }
    
    @keyframes spin {
        to { transform: rotate(360deg); }
    }
}
.box-item .box-post h1.post-title {  
   margin-bottom:10px;
}

.row.display-flex {
  display: flex;
  flex-wrap: wrap;
}
.row.display-flex > [class*='col-'] {
  display: flex;
  flex-direction: column;
}

/* Touch optimizations and final mobile enhancements */
@media (max-width: 768px) {
    /* Touch-friendly tap targets */
    .btn, .social-icons li a, .pagination > li > a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improved scroll performance */
    .header-nav-main {
        -webkit-overflow-scrolling: touch;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    /* Remove hover effects on touch devices */
    @media (hover: none) {
        .btn:hover,
        .social-icons li a:hover,
        .box-item:hover,
        .thumbnail:hover,
        .panel:hover,
        .well:hover {
            transform: none;
        }
    }
    
    /* Image optimizations */
    img {
        max-width: 100%;
        height: auto;
        border-radius: 10px;
    }
    
    /* Text selection improvements */
    ::selection {
        background: rgba(14, 180, 166, 0.3);
        color: #333;
    }
    
    ::-moz-selection {
        background: rgba(14, 180, 166, 0.3);
        color: #333;
    }
    
    /* Focus states for accessibility */
    a:focus, button:focus, .btn:focus {
        outline: 2px solid #0eb4a6;
        outline-offset: 2px;
    }
    
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
    }
    
    /* Reduced motion for users who prefer it */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* Small mobile optimizations (480px and below) */
@media (max-width: 480px) {
    /* Further reduce spacing for small screens */
    .main {
        padding: 10px 0 !important;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .section {
        padding: 20px 0 !important;
    }
    
    .section-no-background {
        padding: 15px 0 !important;
    }
    
    /* Compact product cards */
    .thumb-info-wrapper {
        height: 120px;
    }
    
    .thumb-info-caption {
        min-height: 100px;
        padding: 15px;
    }
    
    .thumb-info-caption h4 {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .thumb-info-caption p {
        font-size: 12px;
        line-height: 1.3;
    }
    
    /* Compact carousel */
    .carousel-inner img {
        height: 150px;
    }
    
    /* Compact news items */
    .col-md-3 {
        margin-bottom: 15px;
    }
    
    .recent-posts h5 {
        font-size: 13px;
    }
    
    /* Remove unnecessary margins */
    .margin-bottom-25, .margin-top-none {
        margin: 5px 0 !important;
    }
    
    /* Ensure no empty spaces */
    .heading {
        margin-bottom: 15px;
    }
    
    .heading-border {
        padding-bottom: 10px;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    #header .header-body {
        padding: 10px 0;
    }
    
    .social-icons {
        margin: 10px 0 !important;
    }
    
    .header-nav-main {
        max-height: 50vh;
    }
    
    /* Reduce vertical spacing in landscape */
    .section {
        padding: 15px 0 !important;
    }
    
    .main {
        padding: 10px 0 !important;
    }
}

/* Comprehensive menu text visibility fixes */
@media (max-width: 768px) {
    /* Fix all menu text colors */
    .header-nav-main a,
    .header-nav-main .dropdown-toggle,
    .header-nav-main .menu-item a,
    .header-nav-main .td-menu-item a,
    .header-nav-main .sf-menu a,
    .header-nav-main .sub-menu a,
    .header-nav-main .dropdown-menu a,
    .header-nav-main .dropdown-mega-content a,
    .header-nav-main .dropdown-mega-sub-nav a {
        color: #333 !important;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    /* Hover states for all menu elements */
    .header-nav-main a:hover,
    .header-nav-main .dropdown-toggle:hover,
    .header-nav-main .menu-item a:hover,
    .header-nav-main .td-menu-item a:hover,
    .header-nav-main .sf-menu a:hover,
    .header-nav-main .sub-menu a:hover,
    .header-nav-main .dropdown-menu a:hover,
    .header-nav-main .dropdown-mega-content a:hover,
    .header-nav-main .dropdown-mega-sub-nav a:hover {
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white !important;
        border-radius: 8px;
        transform: translateX(3px);
    }
    
    /* Active states */
    .header-nav-main .current-menu-item a,
    .header-nav-main .current-menu-parent a,
    .header-nav-main .active a {
        background: linear-gradient(135deg, #0eb4a6 0%, #0a8f84 100%);
        color: white !important;
        border-radius: 8px;
    }
    
    /* Menu titles and descriptions */
    .header-nav-main h3,
    .header-nav-main h4 {
        color: #333 !important;
    }
    
    /* Menu container styling */
    .header-nav-main .dropdown-menu {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 15px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
        border: 1px solid rgba(14, 180, 166, 0.2);
        padding: 15px;
    }
    
    .header-nav-main .dropdown-mega-content {
        background: transparent;
    }
    
    /* Remove any conflicting styles */
    .header-nav-main .dropdown-mega-content h3[style] {
        color: #0eb4a6 !important;
    }
    
    .header-nav-main .dropdown-mega-sub-title h4[style] {
        color: #0a8f84 !important;
    }
    
    /* Fix content sections that appear cut off */
    .section {
        padding: 30px 0 !important;
        min-height: auto !important;
    }
    
    .section-no-background {
        background: transparent !important;
        padding: 20px 0 !important;
    }
    
    /* Product/service section improvements */
    .thumb-info-wrapper {
        height: 150px;
        overflow: hidden;
    }
    
    .thumb-info-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .thumb-info-caption {
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    /* Carousel improvements for mobile */
    .carousel {
        margin-bottom: 20px;
    }
    
    .carousel-inner {
        border-radius: 10px;
        overflow: hidden;
    }
    
    .carousel-inner img {
        height: 200px;
        object-fit: cover;
    }
    
    /* News section improvements */
    .recent-posts {
        margin-bottom: 15px;
    }
    
    .recent-posts h5 {
        font-size: 14px;
        line-height: 1.4;
        margin: 10px 0;
    }
    
    /* Agenda section */
    .recent-posts .post {
        padding: 10px;
        border-radius: 8px;
        background: #f8f9fa;
        margin-bottom: 10px;
    }
    
    /* Ensure content fills the viewport */
    .body {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .main {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    /* Remove empty footer space on mobile */
    #footer {
        margin-top: 0;
        padding: 20px 0;
    }
}
