/*-----------------------------------------------------------------------------------
    Responsive CSS for JDIH Website
    Version: 1.0
    Description: Comprehensive responsive design for Laptop, Tablet, and Mobile (HP)
    
    Breakpoints:
    - Desktop/Laptop: 1200px and above
    - Large Laptop: 992px - 1199px  
    - Tablet: 768px - 991px
    - Mobile (HP): 576px - 767px
    - Small Mobile: Below 576px
-----------------------------------------------------------------------------------*/

/* ===================================
    Base Mobile-First Reset
====================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===================================
    Container Responsive Adjustments
====================================== */
.container {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================
    Large Laptop (992px - 1199px)
====================================== */
@media screen and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    /* Navigation adjustments */
    .navbar-nav > li {
        margin-left: 5px;
    }
    
    .navbar-nav > li > a {
        font-size: 12px !important;
        padding: 12px 8px !important;
    }
    
    /* Feature cards */
    .feature-inner {
        padding: 20px;
    }
    
    .feature-inner h5 {
        font-size: 14px !important;
    }
    
    .feature-inner h6 {
        font-size: 1.5rem !important;
    }
    
    /* Hero section */
    .line-banner .header-text h1 {
        font-size: 36px;
        line-height: 48px;
    }
    
    /* Page title */
    .page-title-section {
        padding: 70px 0;
    }
    
    .page-title-section h1 {
        font-size: 32px;
        line-height: 40px;
    }
    
    /* Cards */
    .card-body {
        padding: 20px !important;
    }
    
    /* Footer */
    footer h3 {
        font-size: 16px;
    }
}

/* ===================================
    Tablet (768px - 991px)
====================================== */
@media screen and (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    /* Header & Navigation */
    .navbar-header-custom {
        padding: 10px 0;
    }
    
    header #logo {
        max-height: 45px !important;
    }
    
    /* Mobile Menu */
    .navbar-nav {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        display: none;
        flex-direction: column;
        padding: 15px 0;
        z-index: 9999;
    }
    
    .navbar-nav.show {
        display: flex !important;
    }
    
    .navbar-nav > li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .navbar-nav > li > a {
        padding: 15px 20px !important;
        font-size: 14px !important;
    }
    
    .navbar-nav > li > a::after {
        display: none !important;
    }
    
    /* Dropdown menus for tablet */
    .navbar ul ul,
    #nav ul {
        position: relative !important;
        left: 0 !important;
        width: 100%;
        box-shadow: none !important;
        background: #f8fafc !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .navbar ul ul li a,
    #nav ul li a {
        padding: 12px 30px !important;
    }
    
    /* Mobile menu toggle button */
    .navbar-toggler {
        display: block !important;
        position: absolute;
        right: 15px;
        top: 20px;
        width: 40px;
        height: 35px;
        background: var(--primary-color, #2563eb);
        border: none;
        border-radius: 5px;
        cursor: pointer;
        z-index: 10000;
    }
    
    .navbar-toggler::before,
    .navbar-toggler::after {
        content: '';
        position: absolute;
        left: 10px;
        width: 20px;
        height: 2px;
        background: #fff;
        transition: 0.3s ease;
    }
    
    .navbar-toggler::before {
        top: 12px;
    }
    
    .navbar-toggler::after {
        top: 17px;
        height: 8px;
        border-top: 2px solid #fff;
        border-bottom: 2px solid #fff;
        background: transparent;
    }
    
    /* Hero section */
    .line-banner .header-text h1 {
        font-size: 32px;
        line-height: 42px;
    }
    
    .line-banner {
        padding: 60px 0;
    }
    
    /* Search box */
    .bg-white-opacity {
        padding: 20px !important;
        margin: 0 15px;
    }
    
    .bg-white-opacity .form-control {
        font-size: 14px !important;
        padding: 10px 15px !important;
    }
    
    /* Feature cards - 2 columns on tablet */
    .feature-inner {
        margin-bottom: 20px;
    }
    
    .feature-inner:hover {
        transform: translateY(-4px);
    }
    
    .feature-inner h5 {
        font-size: 13px !important;
    }
    
    .feature-inner h6 {
        font-size: 1.25rem !important;
    }
    
    /* Page title */
    .page-title-section {
        padding: 50px 0;
    }
    
    .page-title-section h1 {
        font-size: 28px;
        line-height: 36px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 20px;
    }
    
    .card:hover {
        transform: translateY(-4px);
    }
    
    .card-body {
        padding: 15px !important;
    }
    
    .card-title {
        font-size: 16px !important;
    }
    
    /* Buttons */
    .butn {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
    
    /* Section spacing */
    section {
        padding: 40px 0;
    }
    
    section h3 {
        font-size: 24px !important;
    }
    
    section h3::after {
        width: 50px;
        margin-top: 10px;
    }
    
    /* Footer */
    footer {
        padding: 40px 0 20px;
    }
    
    footer .col-md-3,
    footer .col-lg-3 {
        margin-bottom: 30px;
    }
    
    footer h3 {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .footer-bar {
        text-align: center;
    }
    
    /* Sidebar */
    .side-bar {
        padding-left: 0;
        margin-top: 40px;
    }
    
    /* Scroll to top */
    .scroll-to-top {
        width: 40px !important;
        height: 40px !important;
        line-height: 40px !important;
        right: 15px;
        bottom: 15px;
    }
    
    /* About section */
    .bg-white.border {
        margin-bottom: 20px;
    }
    
    .bg-white.border:hover {
        transform: translateY(-3px);
    }
    
    /* Grid adjustments for tablet */
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .row > [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* ===================================
    Mobile / HP (576px - 767px)
====================================== */
@media screen and (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    /* Header & Navigation */
    .navbar-header-custom {
        padding: 8px 0;
    }
    
    header #logo {
        max-height: 40px !important;
    }
    
    .navbar-toggler {
        top: 15px;
        right: 10px;
    }
    
    /* Hero section */
    .line-banner .header-text h1 {
        font-size: 26px;
        line-height: 36px;
    }
    
    .line-banner {
        padding: 40px 0;
    }
    
    /* Search tags */
    .searchs ul li {
        margin-bottom: 8px;
    }
    
    .searchs ul li a {
        padding: 6px 15px !important;
        font-size: 12px !important;
    }
    
    /* Search box */
    .bg-white-opacity {
        padding: 15px !important;
        margin: 0 10px;
        border-radius: 12px !important;
    }
    
    .bg-white-opacity .form-control {
        font-size: 13px !important;
        padding: 8px 12px !important;
        height: 40px;
    }
    
    /* Feature cards - full width on mobile */
    .feature-inner {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .feature-inner h5 {
        font-size: 14px !important;
        margin-bottom: 10px;
    }
    
    .feature-inner h6 {
        font-size: 1.25rem !important;
    }
    
    .feature-inner .bg-icon {
        font-size: 50px;
    }
    
    /* Page title */
    .page-title-section {
        padding: 40px 0;
    }
    
    .page-title-section h1 {
        font-size: 24px;
        line-height: 32px;
    }
    
    .page-title-section ul li a {
        font-size: 12px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px !important;
    }
    
    .card-title {
        font-size: 15px !important;
        line-height: 1.4 !important;
    }
    
    .card-text {
        font-size: 13px;
    }
    
    /* Buttons */
    .butn {
        padding: 10px 18px !important;
        font-size: 12px !important;
        width: 100%;
        text-align: center;
    }
    
    .butn.small {
        padding: 8px 15px !important;
    }
    
    /* Section spacing */
    section {
        padding: 30px 0;
    }
    
    section h3 {
        font-size: 20px !important;
    }
    
    section h3::after {
        width: 40px;
        height: 3px;
        margin-top: 8px;
    }
    
    /* Footer */
    footer {
        padding: 30px 0 15px;
        text-align: center;
    }
    
    footer .col-md-3,
    footer .col-lg-3,
    footer .col-sm-6 {
        margin-bottom: 25px;
    }
    
    footer h3 {
        font-size: 15px;
        margin-bottom: 15px;
    }
    
    footer h3::after {
        margin-left: auto;
        margin-right: auto;
    }
    
    footer ul {
        text-align: center;
    }
    
    .footer-bar p {
        font-size: 12px;
    }
    
    /* Social icons */
    .social-icon-style li a {
        width: 32px;
        height: 32px;
        line-height: 30px;
        font-size: 13px;
    }
    
    /* Form elements */
    .form-control {
        height: 42px;
        font-size: 14px;
    }
    
    /* Table responsive */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Testimonial */
    .testmonial-single p:before {
        font-size: 100px;
        top: 30px;
    }
    
    /* Countdown */
    ul.countdown li {
        width: 80px;
        height: 80px;
        padding: 15px;
        margin-right: 10px;
    }
    
    ul.countdown li span {
        font-size: 22px;
    }
    
    ul.countdown li p {
        font-size: 10px;
    }
    
    /* Blog */
    .blogs .post .content .post-title h5 {
        font-size: 18px;
    }
    
    .blogs .post .content .meta li {
        font-size: 13px;
        padding: 0 10px;
    }
    
    /* Sidebar */
    .side-bar {
        margin-top: 30px;
    }
    
    .side-bar h3 {
        font-size: 18px;
    }
    
    /* Utility classes for mobile */
    .mobile-text-center {
        text-align: center !important;
    }
    
    .mobile-mb-20 {
        margin-bottom: 20px !important;
    }
    
    .mobile-mb-30 {
        margin-bottom: 30px !important;
    }
    
    .mobile-hide {
        display: none !important;
    }
    
    /* Grid - full width columns on mobile */
    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-lg-3,
    .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Two columns layout for feature boxes */
    .feature-inner-wrapper .col-md-4,
    .feature-inner-wrapper .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ===================================
    Small Mobile (Below 576px)
====================================== */
@media screen and (max-width: 575px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Header */
    header #logo {
        max-height: 35px !important;
    }
    
    .navbar-toggler {
        width: 35px;
        height: 30px;
        top: 12px;
    }
    
    .navbar-toggler::before {
        top: 10px;
        width: 18px;
        left: 8px;
    }
    
    .navbar-toggler::after {
        top: 14px;
        width: 18px;
        left: 8px;
        height: 6px;
    }
    
    /* Hero section */
    .line-banner .header-text h1 {
        font-size: 22px;
        line-height: 30px;
    }
    
    .line-banner {
        padding: 30px 0;
    }
    
    /* Search box */
    .bg-white-opacity {
        padding: 12px !important;
        border-radius: 10px !important;
    }
    
    .bg-white-opacity .row {
        flex-direction: column;
    }
    
    .bg-white-opacity .form-control {
        margin-bottom: 10px;
    }
    
    .bg-white-opacity .butn {
        width: 100%;
        margin-top: 10px;
    }
    
    /* Feature cards - single column */
    .feature-inner-wrapper .col-md-4,
    .feature-inner-wrapper .col-lg-4,
    .col-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .feature-inner {
        padding: 15px;
    }
    
    .feature-inner h5 {
        font-size: 13px !important;
    }
    
    .feature-inner h6 {
        font-size: 1.1rem !important;
    }
    
    /* Page title */
    .page-title-section {
        padding: 30px 15px;
    }
    
    .page-title-section h1 {
        font-size: 20px;
        line-height: 28px;
    }
    
    .page-title-section ul {
        margin-top: 10px;
    }
    
    .page-title-section ul li {
        display: block;
        margin-bottom: 5px;
    }
    
    .page-title-section ul li::after {
        display: none;
    }
    
    /* Cards */
    .card-body {
        padding: 12px !important;
    }
    
    .card-title {
        font-size: 14px !important;
    }
    
    /* Section spacing */
    section {
        padding: 25px 0;
    }
    
    section h3 {
        font-size: 18px !important;
    }
    
    /* Footer */
    footer {
        padding: 25px 0 10px;
    }
    
    footer h3 {
        font-size: 14px;
    }
    
    .footer-bar {
        padding: 15px;
    }
    
    .footer-bar p {
        font-size: 11px;
        line-height: 1.6;
    }
    
    /* Countdown - 2x2 grid */
    ul.countdown {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    ul.countdown li {
        width: 70px;
        height: 70px;
        padding: 12px;
        margin: 5px;
    }
    
    ul.countdown li span {
        font-size: 18px;
    }
    
    /* Blog */
    .blogs .post .content .post-title h5 {
        font-size: 16px;
    }
    
    .blogs .comments-area .comment-box:nth-child(odd) {
        margin-left: 0;
    }
    
    .blogs .comment-box .author-thumb {
        width: 60px;
    }
    
    .blogs .comment-box .comment-info {
        margin-left: 70px;
    }
    
    /* Pricing */
    .pricing {
        margin-bottom: 20px;
    }
    
    /* Contact form */
    .contact-form {
        margin-top: -40px;
    }
    
    /* Mobile utility classes */
    .mobile-padding-15 {
        padding: 15px !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
    
    /* Hide on small mobile */
    .xs-hide {
        display: none !important;
    }
}

/* ===================================
    Landscape Phone Orientation
====================================== */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .line-banner {
        min-height: auto;
        padding: 30px 0;
    }
    
    .line-banner .header-text h1 {
        font-size: 22px;
        line-height: 28px;
    }
    
    .navbar-nav {
        max-height: 250px;
        overflow-y: auto;
    }
}

/* ===================================
    High DPI / Retina Display
====================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ===================================
    Print Styles
====================================== */
@media print {
    .navbar-toggler,
    .scroll-to-top,
    .social-icon-style,
    .attr-nav {
        display: none !important;
    }
    
    header {
        position: relative !important;
        box-shadow: none !important;
    }
    
    footer {
        page-break-before: always;
    }
}

/* ===================================
    Touch Device Optimizations
====================================== */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .navbar-nav > li > a {
        padding: 15px 20px !important;
    }
    
    .butn {
        min-height: 44px;
    }
    
    /* Remove hover effects that don't work on touch */
    .feature-inner:hover,
    .card:hover,
    .bg-white.border:hover {
        transform: none;
    }
    
    /* Add active states instead */
    .feature-inner:active,
    .card:active,
    .bg-white.border:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* ===================================
    Safe Area Insets (for notched phones)
====================================== */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    .footer-bar {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}
