


@media (max-width: 1024px) {
    .container,
    .admin-container {
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .instructors-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 850px) {

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }


    .container,
    .admin-container {
        padding: 0 1rem !important;
    }


    header,
    .admin-header {
        position: sticky !important;
        top: 0 !important;
        transform: none !important;
    }
    
    .admin-header.hidden {
        display: block !important;
        transform: none !important;
        visibility: visible !important;
    }

    .logo {
        font-size: 1.5rem;
    }


    .hero {
        padding: 60px 0;
        min-height: 350px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .hero .btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }


    .btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
        min-height: 44px;
    }

    .btn-sm {
        min-height: 38px;
    }


    .stats-section {
        padding: 60px 0;
    }

    .stats-grid,
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    .stat-card,
    .admin-stat-card {
        padding: 1.5rem 1rem;
        min-height: 130px;
        text-align: center;
        flex-direction: column;
        align-items: center;
    }

    .stat-number,
    .admin-stat-card .stat-value {
        font-size: 1.75rem;
    }

    .stat-label,
    .admin-stat-card .stat-label {
        font-size: 0.85rem;
    }

    .admin-stat-card .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
        margin: 0 auto;
    }


    .services-section {
        padding: 60px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 2rem;
    }


    .instructors-section {
        padding: 60px 0;
    }

    .instructors-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }


    .testimonials-section {
        padding: 60px 0;
    }

    .testimonials-slider,
    .testimonials-grid {
        grid-template-columns: 1fr !important;
    }

    .testimonial-card {
        padding: 1.5rem;
    }


    .stars {
        display: inline-flex !important;
        flex-direction: row !important;
        gap: 0.25rem !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    .stars img,
    .stars svg {
        width: 16px !important;
        height: 16px !important;
        flex-shrink: 0 !important;
        display: inline-block !important;
    }

    .rating {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }

    .rating-text {
        white-space: nowrap;
    }


    .contact-section {
        padding: 60px 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }


    footer {
        padding: 40px 0 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }


    .form-group label {
        font-size: 0.95rem;
    }

    .form-control,
    .admin-form-control,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    input[type="url"],
    textarea,
    select {
        padding: 1rem !important;
        font-size: 16px !important;
        border-radius: 10px !important;
        border: 2px solid #e2e8f0 !important;
        transition: all 0.3s ease;
    }

    .form-control:focus,
    .admin-form-control:focus,
    input:focus,
    textarea:focus,
    select:focus {
        border-color: #F4B400 !important;
        box-shadow: 0 0 0 3px rgba(244, 180, 0, 0.1) !important;
        outline: none !important;
    }


    .admin-header {
        padding: 1rem 0;
    }

    .admin-title {
        font-size: 1.2rem;
    }


    .admin-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .admin-table {
        min-width: 100%;
        font-size: 0.85rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }


    .admin-table td:last-child,
    .admin-table th:last-child {
        position: sticky;
        right: 0;
        background: white;
        box-shadow: -2px 0 4px rgba(0, 0, 0, 0.05);
        z-index: 10;
    }


    .admin-table a[href*="edit"].btn-sm,
    .admin-table a[href*="delete"].btn-sm,
    .admin-table a[onclick*="delete"].btn-sm,
    .admin-table form[action*="delete"] button.btn-sm,
    .admin-table .btn-danger.btn-sm {
        font-size: 0 !important;
        width: 38px !important;
        height: 38px !important;
        padding: 0 !important;
        border-radius: 8px;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
    }


    .admin-table a[href*="edit"].btn-sm img,
    .admin-table a[href*="delete"].btn-sm img,
    .admin-table .btn-danger.btn-sm img,
    .admin-table a[href*="edit"].btn-sm svg,
    .admin-table a[href*="delete"].btn-sm svg,
    .admin-table .btn-danger.btn-sm svg {
        width: 18px !important;
        height: 18px !important;
        display: block !important;
        margin: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        filter: none !important;
    }


    .admin-table .btn-sm:not([href*="edit"]):not([href*="delete"]):not([onclick*="delete"]):not(.btn-danger) {
        width: auto !important;
        height: auto !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
    }


    .admin-table td:last-child > div,
    .admin-table td:last-child > form {
        display: inline-flex !important;
        gap: 0.4rem !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }


    .filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }


    .blog-grid {
        grid-template-columns: 1fr !important;
    }

    .blog-filters {
        flex-direction: column;
        gap: 1rem;
    }

    .blog-filters select {
        width: 100%;
    }


    .modal {
        width: 95%;
        padding: 1.5rem;
    }


    .visitor-banner {
        padding: 1.25rem;
    }

    .visitor-banner > div {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    .visitor-stat-box {
        padding: 1rem;
    }

    .visitor-stat-box .stat-value {
        font-size: 1.75rem;
    }


    .weekly-chart {
        padding: 1.25rem;
        overflow-x: auto;
    }

    .weekly-chart table {
        font-size: 0.85rem;
        min-width: 600px;
    }

    .weekly-chart th,
    .weekly-chart td {
        padding: 0.75rem 0.5rem;
    }


    .admin-card {
        padding: 1rem;
    }


    .badge {
        padding: 0.25rem 0.6rem;
        font-size: 0.75rem;
    }
}


@media (max-width: 480px) {
    .container,
    .admin-container {
        padding: 0 1rem !important;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }


    .stats-grid,
    .admin-stats-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-card,
    .admin-stat-card {
        padding: 1.5rem;
    }

    .stat-number,
    .admin-stat-card .stat-value {
        font-size: 1.75rem;
    }

    .service-card,
    .testimonial-card {
        padding: 1.5rem;
    }

    .nav-menu {
        width: 90%;
    }

    .logo {
        font-size: 1.3rem;
    }


    .visitor-banner {
        padding: 1rem;
    }

    .visitor-banner > div {
        grid-template-columns: 1fr !important;
    }

    .visitor-stat-box .stat-value {
        font-size: 1.5rem;
    }


    .admin-table {
        font-size: 0.8rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.6rem 0.4rem;
    }


    .admin-table a[href*="edit"].btn-sm,
    .admin-table a[href*="delete"].btn-sm,
    .admin-table .btn-danger.btn-sm {
        width: 36px !important;
        height: 36px !important;
    }

    .admin-table a[href*="edit"].btn-sm img,
    .admin-table a[href*="delete"].btn-sm img,
    .admin-table .btn-danger.btn-sm img,
    .admin-table a[href*="edit"].btn-sm svg,
    .admin-table a[href*="delete"].btn-sm svg,
    .admin-table .btn-danger.btn-sm svg {
        width: 16px !important;
        height: 16px !important;
    }
}


@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
        min-height: 300px;
    }

    .nav-menu {
        padding: 4rem 0 1rem;
    }

    .nav-menu a {
        padding: 0.7rem 1.5rem;
    }

    .admin-header-right {
        max-height: 100vh;
        overflow-y: auto;
    }
}


@media print {
    header,
    footer,
    .chat-widget,
    .btn,
    .mobile-menu-toggle,
    .mobile-menu-overlay,
    .admin-mobile-toggle,
    .admin-nav,
    .filters {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container,
    .admin-container {
        max-width: 100%;
    }

    .admin-table {
        font-size: 10pt;
    }

    .card,
    .service-card,
    .instructor-card,
    .testimonial-card,
    .admin-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}


html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

.container,
.admin-container {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 850px) {
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
    
    h1, h2, h3, h4, h5, h6, p, span, div {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}


@media (hover: none) and (pointer: coarse) {
    .btn,
    .filter-btn,
    .admin-nav a {
        min-height: 44px;
    }

    .admin-table .btn-sm {
        min-width: 44px;
        min-height: 44px;
    }
}


@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .admin-nav img,
    .stars img,
    .stars svg {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}
@media (max-width: 500px) {
      .pricing-grid {
        grid-template-columns: 1fr;
    }
}