/**
 * Modern Responsive Design - Click Village
 * Enhanced responsive design for all devices
 */

/* CSS Custom Properties for responsive design */
:root {
    --mobile-padding: 15px;
    --tablet-padding: 30px;
    --desktop-padding: 50px;
    --section-padding-mobile: 60px 0;
    --section-padding-tablet: 80px 0;
    --section-padding-desktop: 100px 0;
    --container-max-width: 1400px;
}

/* Container improvements */
.container {
    max-width: var(--container-max-width);
    padding-left: var(--desktop-padding);
    padding-right: var(--desktop-padding);
}

/* Mobile First Approach - Base styles for mobile */
@media (max-width: 575.98px) {
    :root {
        --mobile-padding: 15px;
        --section-padding-mobile: 50px 0;
    }
    
    .container {
        padding-left: var(--mobile-padding);
        padding-right: var(--mobile-padding);
    }
    
    /* Hero Section Mobile */
    .welcome-hero {
        min-height: 70vh;
        padding: 40px 0;
    }
    
    .welcome-hero-txt h2 {
        font-size: 2rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .welcome-hero-txt p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .welcome-hero-serch-box {
        padding: 20px 15px;
        margin: 0 10px;
        border-radius: 20px;
    }
    
    .welcome-hero-form {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .single-welcome-hero-form input {
        padding: 12px 15px 12px 45px;
        font-size: 14px;
    }
    
    .welcome-hero-form-icon {
        top: 40px;
        font-size: 16px;
    }
    
    .search-button {
        height: 50px !important;
        font-size: 14px !important;
        padding: 12px 20px !important;
    }
    
    /* Navigation Mobile */
    .navbar-nav {
        margin-top: 15px;
    }
    
    .navbar-nav > li > a {
        padding: 12px 20px;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Categories Mobile */
    .list-topics {
        padding: var(--section-padding-mobile);
    }
    
    .list-topics-content ul {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .single-list-topics-content {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .single-list-topics-icon img {
        width: 60px;
        height: 60px;
    }
    
    .single-list-topics-content h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .single-list-topics-content p {
        font-size: 13px;
    }
    
    /* Info Section Mobile */
    .works {
        padding: var(--section-padding-mobile);
    }
    
    .section-header h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .section-header p {
        font-size: 14px;
        margin-bottom: 40px;
    }
    
    .single-how-works {
        padding: 25px 20px;
        margin-bottom: 20px;
        border-radius: 15px;
    }
    
    .single-how-works-icon img {
        width: 60px;
        height: 60px;
    }
    
    .single-how-works h2 {
        font-size: 18px;
    }
    
    .single-how-works p {
        font-size: 13px;
        line-height: 1.5;
    }
    
    /* Households Mobile */
    .explore {
        padding: var(--section-padding-mobile);
    }
    
    .single-explore-item {
        margin-bottom: 25px;
        border-radius: 15px;
    }
    
    .single-explore-img {
        height: 200px;
    }
    
    .single-explore-txt {
        padding: 20px;
    }
    
    .single-explore-txt h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .explore-person {
        margin-bottom: 15px;
    }
    
    .explore-open-close-part {
        flex-direction: column;
        gap: 15px;
    }
    
    .explore-open-close-part .row {
        margin: 0;
    }
    
    .explore-open-close-part .col-sm-5,
    .explore-open-close-part .col-sm-7 {
        padding: 0;
        text-align: center;
    }
    
    /* Products Mobile */
    .products-section {
        padding: var(--section-padding-mobile);
    }
    
    .products-slider-wrapper {
        padding: 0 20px;
    }
    
    .products-slider {
        padding: 15px;
        border-radius: 15px;
    }
    
    .products-track {
        gap: 20px;
    }
    
    .product-slide {
        min-width: 260px;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .product-content {
        padding: 20px 15px;
    }
    
    .product-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .product-farm {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .product-status {
        font-size: 12px;
    }
    
    .price-tag {
        padding: 6px 10px;
        font-size: 12px;
        top: 15px;
        right: 15px;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .overlay-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .view-all-btn {
        padding: 12px 25px;
        font-size: 14px;
        margin-top: 30px;
    }
    
    /* Statistics Mobile */
    .statistics {
        padding: var(--section-padding-mobile);
    }
    
    .statistics-counter {
        flex-direction: column;
        gap: 20px;
    }
    
    .single-ststistics-box {
        padding: 30px 20px;
        min-width: auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .counter {
        font-size: 2.5rem;
    }
    
    .statistics-content span {
        font-size: 1.2rem;
    }
    
    /* Events Mobile */
    .blog {
        padding: var(--section-padding-mobile);
    }
    
    .single-blog-item {
        margin-bottom: 25px;
        border-radius: 15px;
    }
    
    .single-blog-item-img {
        height: 200px;
    }
    
    .manifestacija-date-badge {
        top: 10px;
        right: 10px;
        padding: 6px 8px;
        border-radius: 6px;
    }
    
    .date-day {
        font-size: 14px;
    }
    
    .date-month {
        font-size: 9px;
    }
    
    .single-blog-item-txt {
        padding: 20px;
    }
    
    .single-blog-item-txt h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .manifestacija-info {
        margin-bottom: 12px;
    }
    
    .manifestacija-date,
    .manifestacija-location {
        font-size: 12px;
        margin: 3px 0;
    }
    
    .explore-open-close-part {
        margin-top: 15px;
    }
    
    /* Dark Mode Toggle Mobile */
    .dark-mode-toggle {
        width: 45px;
        height: 45px;
        font-size: 16px;
        bottom: 80px;
        right: 15px;
    }
    
    /* Scroll to top button mobile */
    .scroll-to-top {
        width: 40px !important;
        height: 40px !important;
        bottom: 20px !important;
        right: 20px !important;
        font-size: 14px !important;
    }
}

/* Small tablets and large phones */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        padding-left: var(--tablet-padding);
        padding-right: var(--tablet-padding);
    }
    
    .welcome-hero {
        min-height: 80vh;
    }
    
    .welcome-hero-txt h2 {
        font-size: 2.5rem;
    }
    
    .welcome-hero-serch-box {
        padding: 25px 20px;
    }
    
    .list-topics-content ul {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    
    .product-slide {
        min-width: 280px;
    }
    
    .single-ststistics-box {
        max-width: 250px;
    }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        padding-left: var(--tablet-padding);
        padding-right: var(--tablet-padding);
    }
    
    /* Hero Section Tablet */
    .welcome-hero {
        min-height: 85vh;
    }
    
    .welcome-hero-txt h2 {
        font-size: 3rem;
    }
    
    .welcome-hero-serch-box {
        padding: 30px 25px;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .welcome-hero-form {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    /* Categories Tablet */
    .list-topics {
        padding: var(--section-padding-tablet);
    }
    
    .list-topics-content ul {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 25px;
    }
    
    /* Info Section Tablet */
    .works {
        padding: var(--section-padding-tablet);
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    /* Households Tablet */
    .explore {
        padding: var(--section-padding-tablet);
    }
    
    .single-explore-img {
        height: 220px;
    }
    
    /* Products Tablet */
    .products-section {
        padding: var(--section-padding-tablet);
    }
    
    .products-slider-wrapper {
        padding: 0 40px;
    }
    
    .product-slide {
        min-width: 300px;
    }
    
    .product-image-container {
        height: 220px;
    }
    
    /* Statistics Tablet */
    .statistics {
        padding: var(--section-padding-tablet);
    }
    
    .statistics-counter {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 25px;
    }
    
    /* Events Tablet */
    .blog {
        padding: var(--section-padding-tablet);
    }
    
    .single-blog-item-img {
        height: 220px;
    }
}

/* Large tablets and small desktops */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        padding-left: 40px;
        padding-right: 40px;
    }
    
    .welcome-hero-txt h2 {
        font-size: 3.2rem;
    }
    
    .list-topics-content ul {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .product-slide {
        min-width: 310px;
    }
    
    .products-slider-wrapper {
        padding: 0 50px;
    }
    
    .section-header h2 {
        font-size: 2.3rem;
    }
}

/* Extra large screens */
@media (min-width: 1200px) {
    .container {
        max-width: var(--container-max-width);
    }
    
    /* Hero improvements for large screens */
    .welcome-hero-txt h2 {
        font-size: 3.5rem;
        line-height: 1.2;
    }
    
    .welcome-hero-txt p {
        font-size: 1.3rem;
    }
    
    .welcome-hero-serch-box {
        max-width: 800px;
        padding: 35px 40px;
    }
    
    /* Enhanced product slider for large screens */
    .product-slide {
        min-width: 320px;
    }
    
    .product-image-container {
        height: 300px;
    }
    
    .products-slider-wrapper {
        max-width: 1400px;
        padding: 0 60px;
    }
    
    /* Statistics enhancements */
    .statistics-counter {
        display: flex;
        justify-content: space-around;
        max-width: 1000px;
        margin: 0 auto;
    }
    
    .single-ststistics-box {
        min-width: 220px;
        padding: 50px 40px;
    }
}

/* Ultra-wide screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1600px;
    }
    
    .welcome-hero-txt h2 {
        font-size: 4rem;
    }
    
    .section-header h2 {
        font-size: 2.8rem;
    }
    
    .products-slider-wrapper {
        max-width: 1600px;
    }
}

/* Landscape phone orientation */
@media (max-width: 767.98px) and (orientation: landscape) {
    .welcome-hero {
        min-height: 100vh;
        padding: 20px 0;
    }
    
    .welcome-hero-txt {
        margin-bottom: 30px;
    }
    
    .welcome-hero-txt h2 {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    
    .welcome-hero-serch-box {
        padding: 20px 15px;
    }
    
    .welcome-hero-form {
        grid-template-columns: 1fr 1fr auto;
        align-items: end;
    }
    
    .search-button {
        width: auto !important;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn, button, .nav-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .hover-lift:hover,
    .hover-scale:hover,
    .hover-rotate:hover {
        transform: none;
    }
    
    /* Simplify animations on touch devices */
    .card-animated:hover::before {
        transform: none;
    }
    
    /* Larger slider navigation buttons */
    .slider-nav {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    /* Adjust dark mode toggle for touch */
    .dark-mode-toggle {
        width: 55px;
        height: 55px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    /* Ensure images are crisp on retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    /* Adjust font weights for better readability */
    .welcome-hero-txt h2 {
        font-weight: 600;
    }
    
    .section-header h2 {
        font-weight: 600;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    /* Disable auto-play animations */
    .products-track {
        transition: none;
    }
    
    /* Reduce animation intensity */
    .hover-lift:hover {
        transform: translateY(-2px);
    }
    
    .hover-scale:hover {
        transform: scale(1.01);
    }
    
    /* Simplify stagger animations */
    .stagger-item {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Print styles */
@media print {
    .dark-mode-toggle,
    .scroll-to-top,
    .floating-buttons,
    .scroll-progress {

    }
    
    .welcome-hero {
        min-height: auto;
        padding: 40px 0;
        background: none !important;
        color: #000 !important;
    }
    
    .welcome-hero-txt h2 {
        color: #000 !important;
        font-size: 2rem;
    }
    
    .section-header h2 {
        color: #000 !important;
        font-size: 1.5rem;
    }
    
    .products-slider-wrapper {
        padding: 0;
    }
    
    .products-track {
        display: block;
    }
    
    .product-slide {
        min-width: auto;
        width: 100%;
        margin-bottom: 20px;
        break-inside: avoid;
    }
}