/* =========================================================
   AER OFFICIAL THEME - MOBILE CSS v1.1.1 CLEAN
   Responsive rules only
========================================================= */

@media (max-width: 991px) {
    html {
        scroll-padding-top: 78px;
    }

    html,
    body {
        width: 100%;
        overflow-x: hidden;
    }

    body {
        padding-top: 72px;
        padding-bottom: 88px;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    section {
        padding: 60px 0;
    }

    /* Header / Mobile Menu */
    .site-header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 99999;
        background: #ffffff;
    }

    .site-header.sticky-active {
        background: rgba(255,255,255,0.96);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    }

    .header-wrapper {
        min-height: 72px;
        padding: 10px 20px !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: nowrap;
    }

    .site-branding {
        flex: 1 1 auto;
        min-width: 0;
    }

    .custom-logo-link img,
    .custom-logo,
    .site-branding img {
        max-width: 180px !important;
        max-height: 46px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain;
    }

    .header-action {
        display: none !important;
    }

    .search-toggle,
    .menu-toggle {
        width: 44px;
        height: 44px;
        min-width: 44px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 0;
        padding: 0;
        cursor: pointer;
    }

    .menu-toggle {
        flex-direction: column;
        gap: 5px;
    }

    .menu-toggle span {
        width: 26px;
        height: 3px;
        border-radius: 5px;
        background: #111827;
        transition: 0.3s ease;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .main-navigation {
        display: none !important;
        position: fixed !important;
        top: 82px;
        left: 16px;
        right: 16px;
        width: auto !important;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        background: #ffffff;
        padding: 16px;
        border-radius: 18px;
        box-shadow: 0 15px 40px rgba(0,0,0,0.16);
        z-index: 99998;
    }

    .main-navigation.active {
        display: block !important;
    }

    .nav-menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 10px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-menu li,
    .nav-menu > li {
        width: 100%;
    }

    .nav-menu li a,
    .nav-menu > li > a {
        display: block !important;
        width: 100%;
        height: auto;
        min-height: 44px;
        padding: 14px 16px !important;
        border-radius: 12px;
        background: #f8fafc;
        color: #111827;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
    }

    .nav-menu .sub-menu,
    .nav-menu li:hover > .sub-menu {
        display: none !important;
        position: static !important;
        min-width: 0;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        margin-top: 8px !important;
        padding: 10px 0 0 14px !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .nav-menu li.submenu-open > .sub-menu {
        display: block !important;
    }

    .nav-menu .sub-menu a {
        background: #ffffff;
        padding: 11px 14px !important;
    }

    body.menu-open,
    body.search-open {
        overflow: hidden;
    }

    /* Hero / Common */
    .hero-section {
        padding: 70px 0 80px;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 34px;
        line-height: 1.25;
        margin-bottom: 20px;
    }

    .hero-section p {
        font-size: 17px;
        line-height: 1.7;
        margin-bottom: 28px;
    }

    .hero-buttons {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 0;
        margin: 0 auto 28px;
    }

    .hero-buttons .btn,
    .error-actions .btn,
    .contact-actions .btn {
        width: 100%;
        min-height: 58px;
        border-radius: 14px;
        font-size: 16px;
    }

    .hero-badge {
        font-size: 16px;
        margin-top: 12px;
    }

    .section-header h2 {
        font-size: 34px;
        line-height: 1.25;
    }

    .section-header p {
        font-size: 16px;
        line-height: 1.6;
    }

    .services-grid,
    .projects-grid,
    .news-grid,
    .footer-grid,
    .latest-news-layout,
    .why-grid,
    .packages-grid,
    .package-grid,
    .testimonials-grid,
    .related-grid,
    .service-benefits,
    .project-gallery {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .service-card,
    .project-card,
    .news-card {
        padding: 20px;
        border-radius: 14px;
    }

    .news-title {
        font-size: 20px;
    }

    .news-thumbnail img {
        height: 200px;
    }

    .featured-news-card,
    .featured-post-card {
        grid-row: auto;
        grid-template-columns: 1fr;
    }

    .featured-news-card .news-thumbnail img {
        height: 230px;
    }

    .featured-post-image img {
        min-height: 260px;
    }

    .featured-post-content {
        padding: 24px;
    }

    .featured-title {
        font-size: 28px;
    }

    /* Single / Page / Archive */
    .single-post-layout {
        padding: 45px 0;
    }

    .single-article,
    .page-article {
        padding: 24px;
        border-radius: 16px;
    }

    .entry-title,
    .archive-title,
    .page-title,
    .error-title {
        font-size: 30px;
        line-height: 1.3;
    }

    .entry-content,
    .page-content {
        font-size: 16px;
        line-height: 1.9;
    }

    .entry-content p,
    .page-content p {
        text-align: left;
        margin-bottom: 24px;
    }

    .entry-content h2,
    .page-content h2 {
        font-size: 28px;
        margin-top: 46px;
    }

    .entry-content h3,
    .page-content h3 {
        font-size: 24px;
    }

    .entry-content h4,
    .page-content h4 {
        font-size: 20px;
    }

    .alignleft,
    .alignright {
        float: none;
        display: block;
        margin: 28px auto;
    }

    .wp-caption-text,
    figcaption {
        font-size: 13px;
    }

    .archive-description {
        font-size: 15px;
    }

    .archive-pagination .page-numbers {
        width: 40px;
        height: 40px;
    }

    .page-content-wrapper,
    .page-content-wrapper.sidebar,
    .page-content-wrapper.fullwidth {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .error-hero {
        padding: 70px 0;
    }

    .error-code {
        font-size: 82px;
    }

    .error-description {
        font-size: 16px;
    }

    .error-actions {
        flex-direction: column;
    }

    .breadcrumb {
        font-size: 13px;
        gap: 8px;
    }

    .content-none {
        padding: 50px 0;
    }

    .content-none-inner {
        padding: 34px 20px;
        border-radius: 18px;
    }

    .content-none-inner h2 {
        font-size: 26px;
    }

    /* Search */
    .search-field {
        height: 54px;
        min-height: 54px;
        padding: 0 56px 0 16px;
        font-size: 15px;
        border-radius: 14px;
    }

    .search-submit {
        width: 42px;
        height: 42px;
        right: 6px;
    }

    .overlay-search-form {
        flex-direction: column;
    }

    .overlay-search-input,
    .overlay-search-submit {
        width: 100%;
        height: 58px;
        border-radius: 14px;
    }

    .search-close {
        top: -52px;
    }

    /* Comments / Share */
    .comments-area {
        width: calc(100% - 32px);
        max-width: calc(100% - 32px);
        margin: 45px auto 0;
        padding: 22px;
        border-radius: 16px;
    }

    .comments-title {
        font-size: 24px;
        line-height: 1.3;
    }

    .comment {
        padding: 18px;
        border-radius: 14px;
    }

    .comment-author {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .comment-author img {
        width: 46px;
        height: 46px;
    }

    .comment-meta,
    .comment-content {
        font-size: 15px;
        line-height: 1.7;
        word-break: break-word;
    }

    .comment-form textarea,
    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form input[type="url"] {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 15px;
    }

    .comment-form-cookies-consent {
        font-size: 14px;
        line-height: 1.5;
    }

    .post-share a,
    .post-share button,
    .post-share .copy-btn {
        width: 100%;
        margin: 6px 0;
        box-sizing: border-box;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .related-title {
        font-size: 28px;
    }

    .article-cta {
        padding: 26px 20px;
        border-radius: 18px;
    }

    .article-cta h3 {
        font-size: 24px;
    }

    /* Homepage sections */
    .about-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-content h2 {
        font-size: 30px;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .contact-wrapper h2 {
        font-size: 30px;
    }

    .contact-wrapper p {
        font-size: 16px;
    }

    .contact-actions {
        flex-direction: column;
    }

    .site-footer {
        padding: 64px 0 100px;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .footer-brand p {
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-col a:hover {
        padding-left: 0;
    }

    /* Service / Project Landing */
    .service-hero,
    .project-hero {
        padding-top: 10px;
        margin-bottom: 55px;
    }

    .service-hero h1,
    .project-hero h1 {
        min-height: auto;
        font-size: 34px;
    }

    .service-hero p,
    .project-hero p {
        font-size: 17px;
    }

    .service-benefit,
    .service-packages .package-card {
        padding: 26px 20px;
    }

    .service-packages h2 {
        font-size: 30px;
    }

    .service-cta {
        padding: 50px 24px;
        border-radius: 22px;
    }

    .package-card {
        min-height: auto;
    }

    .project-gallery img {
        height: 220px;
    }

    /* Mobile bottom + floating */
    .mobile-bottom-nav {
        display: flex !important;
        height: 72px;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .bottom-nav-item {
        min-height: 44px;
        font-size: 12px;
    }

    .bottom-nav-item span {
        font-size: 22px;
    }

    .floating-whatsapp {
        width: 54px;
        height: 54px;
        right: 18px;
        bottom: 88px;
        z-index: 99999;
    }

    .floating-whatsapp svg {
        width: 24px;
        height: 24px;
    }

    /* Disable heavy hover on touch devices */
    .btn:hover,
    button:hover,
    input[type="submit"]:hover,
    .service-card:hover,
    .project-card:hover,
    .package-card:hover,
    .why-card:hover,
    .testimonial-card:hover,
    .news-card:hover,
    .related-card:hover,
    .featured-post-card:hover,
    .service-benefit:hover {
        transform: none;
    }

    .news-card:hover .news-thumbnail img,
    .project-card:hover .project-thumbnail img,
    .related-card:hover .related-thumbnail img,
    .featured-post-card:hover .featured-post-image img {
        transform: none;
    }
}

@media (max-width: 480px) {
    .about-stats {
        grid-template-columns: 1fr;
    }

    .hero-section h1 {
        font-size: 30px;
    }

    .section-header h2 {
        font-size: 30px;
    }
}

@media (max-width:991px){

    .error-content{
        padding:40px 24px;
        border-radius:22px;
    }

}