/**
 * Responsive Styles
 * Mobile First Approach
 */

/* ========== Tablet (768px and below) ========== */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* Header */
    .logo img {
        max-height: 60px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Navigation */
    .main-nav {
        position: relative;
        top: 0;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 1000px;
    }

    .nav-menu > li {
        width: 100%;
    }

    .nav-menu > li > a {
        border: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: none;
    }

    .has-dropdown.active .dropdown-menu {
        max-height: 500px;
    }

    .dropdown-menu a {
        padding-left: 40px;
    }

    /* Slider with Sidebar - Stack on Tablet/Mobile */
    .slider-with-sidebar {
        grid-template-columns: 1fr !important;
    }

    .slider-with-sidebar .hero-slider {
        height: 300px !important;
    }

    .sidebar-inline {
        width: 100% !important;
        height: auto !important;
    }

    /* Hero Slider */
    .hero-slider {
        height: 300px;
    }

    .slide-caption h2 {
        font-size: 1.2rem;
    }

    .slide-caption {
        padding: 15px 20px;
        bottom: 20px;
    }

    .slider-btn {
        font-size: 20px;
        padding: 10px 15px;
    }

    .slider-btn.prev {
        left: 10px;
    }

    .slider-btn.next {
        right: 10px;
    }

    /* Content */
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .main-area {
        padding: 20px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    /* Services & Categories */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
    }

    .social-links {
        justify-content: center;
    }

    /* WhatsApp Float */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float img {
        width: 28px;
        height: 28px;
    }
}

/* ========== Mobile (480px and below) ========== */
@media screen and (max-width: 480px) {
    /* Typography */
    body {
        font-size: 14px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }
    h3 { font-size: 1.1rem; }

    /* Header */
    .logo img {
        max-height: 50px;
    }

    /* Hero Slider */
    .hero-slider {
        height: 250px;
    }

    .slide-caption {
        padding: 10px 15px;
        bottom: 15px;
        max-width: 90%;
    }

    .slide-caption h2 {
        font-size: 1rem;
    }

    .slider-btn {
        font-size: 18px;
        padding: 8px 12px;
    }

    /* Content */
    .main-area {
        padding: 15px;
    }

    .main-content {
        padding: 20px 0;
    }

    /* Services */
    .service-card {
        padding: 20px;
    }

    .service-icon {
        font-size: 2.5rem;
    }

    /* Categories */
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

    .category-item {
        padding: 15px 10px;
    }

    .category-item img {
        width: 40px;
        height: 40px;
    }

    .category-item span {
        font-size: 0.85rem;
    }

    /* Sidebar */
    .sidebar-widget {
        padding: 15px;
    }

    .sidebar-widget h3 {
        margin: -15px -15px 15px;
        padding: 12px;
        font-size: 1.1rem;
    }

    #time {
        font-size: 1.5rem;
    }

    /* Footer */
    .site-footer {
        padding: 30px 0 10px;
    }

    .footer-column {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .copyright {
        padding: 15px 0;
    }

    .copyright-content p {
        font-size: 0.85rem;
    }

    /* WhatsApp Float */
    .whatsapp-float {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }

    .whatsapp-float img {
        width: 25px;
        height: 25px;
    }
}

/* ========== Large Desktop (1200px and above) ========== */
@media screen and (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    .hero-slider {
        height: 600px;
    }

    .slide-caption h2 {
        font-size: 2.2rem;
    }

    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== Print Styles ========== */
@media print {
    .site-header,
    .main-nav,
    .sidebar,
    .site-footer,
    .whatsapp-float,
    .slider-btn,
    #preloader {
        display: none !important;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .main-area {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* ========== Accessibility ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Keyboard Navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000FF;
        --secondary-color: #0080FF;
        --text-color: #000;
    }

    a {
        text-decoration: underline;
    }
}
