/* ===== MOBILE STYLES (up to 767px) ===== */
@media (max-width: 767px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    p{
        text-align: justify;
    }

    .gtk-400{
        grid-template-columns: 1fr !important;
    }

    .modern-cta, .col-12 p{
        text-align: unset;
    }
    
    /* Header */
    .header-inner {
        gap: 1rem;
    }
    
    .logo-link {
        font-size: 1.25rem;
    }
    
    .header-phone .phone-text {
        display: none;
    }
    
    .header-cta span {
        display: none;
    }
    
    .header-cta {
        padding: 0.75rem;
    }

    /* Featured Image */
    .page-featured-image {
        margin: 1.5rem 0 2rem;
        border-radius: var(--radius-md);
    }
    
    .page-featured-image img {
        max-height: 400px;
        object-fit: cover;
        border-radius: var(--radius-md);
    }
    
    .floating-image {
        float: none;
        max-width: 100%;
        margin: 1.5rem 0;
    }
    
    .image-container {
        margin: 1.5rem 0;
    }
    
    .image-caption {
        position: relative;
        padding: 0.75rem;
        background: var(--dark-surface);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        opacity: 1;
        font-size: 0.8rem;
    }
    
    .page-featured-image:hover img {
        transform: none;
    }

    .page-header .page-title{
        margin-top: 2rem;
    }
    
    /* Sidebar */
    .page-sidebar {
        margin-top: 3rem;
    }
    
    .main-sidebar {
        gap: 1rem;
    }
    
    .widget {
        margin-bottom: 1rem;
    }
    
    .widget_text {
        padding: 1rem;
    }
    
    #menu-uslugi a {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .banner-text{
        text-align: center;
    }

    /* Hero */
    .hero-section {
        min-height: 80vh;
        padding: 2rem 0;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Sections */
    .section-padding {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    /* Services */
    .service-card {
        padding: 1.5rem;
    }

    .service-item{
        justify-content: center;
    }
    
    .service-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    /* Benefits */
    .benefits-stats {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Gallery */
    .gallery-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* CTA */
    .cta-form {
        padding: 1.5rem;
    }
    
    /* Contact */
    .contact-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .contact-icon {
        margin: 0 auto;
    }
    
    /* Footer */
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .footer-description {
        max-width: none;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .contact-item {
        display: flow-root;
        justify-content: center;
        text-align: center;
    }
    
    .well-stage-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .well-stage-price-info {
        justify-content: center;
    }
    
    .well-benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .well-package-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .well-package-badge {
        align-self: flex-start;
    }
    
    .well-calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .well-cta-section {
        padding: 2rem 1.5rem;
    }
    
    .well-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .well-cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .well-package-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .equipment-packages {
        gap: 0;
    }

    /* Modals */
    .modal-container {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    /* Utilities */
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .btn-xl {
        padding: 1.25rem 2.5rem;
        font-size: 1.1rem;
    }

    .modern-banner {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .banner-title {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-content {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 2rem 1.5rem;
    }
    
    .cta-title {
        font-size: 1.75rem;
    }
    
    .cta-messengers {
        flex-direction: column;
        align-items: center;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .messenger-link {
        width: 200px;
        justify-content: center;
    }
    
    .wpcf7-checkbox {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wpcf7-form-control-wrap{
        display: flex;
        justify-content: center;
    }

    /* Recent Work */
    .recent-work {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .work-image {
        width: 100%;
        height: 100%;
        margin: 0 auto;
    }

    .work-date{
        justify-content: center;
        text-align: center;
    }
    
    .work-title a {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
    }
    
    .work-content {
        gap: 0.5rem;
    }

    .posts-grid {
        gap: 1.5rem;
    }
    
    .post-card {
        max-width: 100%;
    }
    
    .breadcrumbs-inner {
        font-size: 0.8125rem;
    }
    
    .post-card-content {
        padding: 1.25rem;
    }
    
    .post-card-title {
        font-size: 1.125rem;
    }
    
    .archive-header {
        text-align: center;
    }
    
    .archive-title {
        font-size: 1.75rem;
    }
    
    .modern-table {
        display: block;
    }
    
    .modern-table thead {
        display: none;
    }
    
    .modern-table tbody,
    .modern-table tr,
    .modern-table td {
        display: block;
        width: 100%;
    }
    
    .modern-table tbody tr {
        margin-bottom: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-md);
        padding: 1rem;
        background: var(--dark-surface);
    }
    
    .modern-table td {
        padding: 0.75rem 0;
        text-align: left;
        position: relative;
    }
    
    .modern-table td:before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.25rem;
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        opacity: 0.8;
    }

    .modern-table td img {
        max-height: 120px;
        max-width: 150px;
    }
    
    .modern-table td:not(:first-child):not(:last-child) img {
        max-height: 80px;
        max-width: 120px;
    }
    
    .price-cell {
        text-align: left;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .price-cell:before {
        content: 'Цена';
    }
    
    .modern-table td:first-child:before {
        content: 'Вид работы';
    }
    
    .modern-table td:nth-child(2):before {
        content: 'Ед. изм.';
    }

    .promotions-hero {
        padding: 6rem 0 3rem;
    }
    
    .promotions-hero-title {
        font-size: 2rem;
    }
    
    .promotions-grid {
        grid-template-columns: 1fr;
    }
    
    .promotions-main {
        padding: 3rem 0;
    }
    
    .promotions-cta {
        padding: 3rem 0;
    }

    .tml {
        margin: 3rem auto;
        padding: 2rem 1.5rem;
        max-width: 100%;
    }
    
    .tml-login {
        margin-top: 4rem;
    }
    
    .tml-field {
        padding: 0.875rem 1rem;
    }
    
    .tml-button {
        padding: 0.875rem 1.25rem;
    }
}

@media (max-width: 480px) {
    /* Extra small devices */
    .header-actions .header-cta, .header-actions .soc_seti, .header-actions .phone-list {
        display: none!important;
    }
    .container {
        padding: 0 0.5rem;
    }

    /* Featured Image for small devices */
    .page-featured-image img {
        max-height: 300px;
    }
    
    .image-caption {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .floating-image {
        margin: 1rem 0;
    }

    .well-pricing-hero {
        padding: 1.5rem;
    }
    
    .well-pricing-hero-title {
        font-size: 1.5rem;
    }
    
    .well-pricing-hero-subtitle {
        font-size: 1rem;
    }
    
    .well-stage-card {
        padding: 1.5rem;
    }
    
    .well-stage-title {
        font-size: 1.5rem;
    }
    
    .well-calculator-block {
        padding: 1.5rem;
    }
    
    .well-calculator-title {
        font-size: 1.25rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .gallery-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
    }
    
    .cta-content {
        padding: 1.5rem;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-phone {
        font-size: 1.25rem;
    }
    
    .wpcf7-form {
        padding: 1.5rem;
    }
    
    .benefit-card,
    .price-card {
        padding: 1.5rem;
    }
    
    /* Footer */
    .footer-top {
        gap: 1.5rem;
    }
    
    .logo-text {
        font-size: 1.75rem;
    }

    .logo-link svg{
        width: 120px!important;
    }

    .logo-link svg text{
        font-size: 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Sidebar */
    #menu-uslugi a {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .customize-partial-edit-shortcut {
        top: 0.25rem;
        right: 0.25rem;
    }
    
    .customize-partial-edit-shortcut-button {
        width: 25px;
        height: 25px;
    }
    
    .customize-partial-edit-shortcut-button svg {
        width: 14px;
        height: 14px;
    }

    /*Recent Work*/
    .recent-work {
        padding: 0.75rem;
    }
    
    .work-image {
        height: auto;
    }
    
    .widget .widget-title {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }

    .posts-grid {
        gap: 1rem;
    }
    
    .post-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .breadcrumbs-inner {
        gap: 0.375rem;
    }
    
    .breadcrumbs-inner a {
        padding-right: 0.5rem;
    }
    
    .no-posts {
        padding: 3rem 1rem;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 0.75rem;
        font-size: 0.875rem;
    }

    .modern-table td img {
        max-height: 80px;
        max-width: 100px;
    }
    
    .modern-table td:has(img) {
        padding: 0.5rem;
    }

    .promotions-hero-subtitle {
        font-size: 1.125rem;
    }
    
    .promotion-content {
        padding: 1.25rem;
    }
    
    .promotion-title {
        font-size: 1.125rem;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
    }

    .tml {
        margin: 2rem auto;
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius-lg);
    }
    
    .tml-login {
        margin-top: 3rem;
    }
    
    .tml-message {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .tml-field-wrap {
        margin-bottom: 1.25rem;
    }
    
    .tml-label {
        font-size: 0.875rem;
    }
    
    .tml-links a {
        font-size: 0.875rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .glass-card:hover {
        transform: none;
    }
    
    .btn:hover::before {
        left: -100%;
    }
    
    .gallery-card:hover .gallery-overlay {
        opacity: 0;
    }
    
    .gallery-card:active .gallery-overlay {
        opacity: 1;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-background {
        background-image: url('../images/hero-bg@2x.jpg');
    }
}

/* Print styles */
@media print {
    .main-header,
    .main-footer,
    .cta-section,
    .modal,
    .back-to-top {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .container {
        max-width: none !important;
    }
}