/* =============================================================
   The Rise Consultancy — Mobile-first enhancements
   ============================================================= */

html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: clip;
}

/* ----- Touch-friendly controls ----- */
.btn,
.btn-get-started,
.btn-primary,
.btn-buy,
.mobile-nav-toggle,
.navmenu a,
.faq .accordion-item .btn-link {
  min-height: 44px;
}

/* ----- Header ----- */
@media (max-width: 1199.98px) {
  .header {
    padding: 6px 0 !important;
  }
  .header .container-fluid {
    padding-left: 14px;
    padding-right: 14px;
  }
  .header .logo .site-logo {
    height: 46px;
    max-height: 46px;
  }
  .scrolled .header .logo .site-logo {
    height: 42px;
    max-height: 42px;
  }
  .mobile-nav-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: rgba(20, 54, 92, 0.08);
    color: var(--heading-color, #14365c) !important;
    font-size: 26px !important;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .mobile-nav-toggle:hover,
  .mobile-nav-toggle:focus {
    background: rgba(244, 121, 32, 0.15);
    color: var(--accent-color, #f47920) !important;
    outline: none;
  }

  /* Full-height slide-in drawer */
  .mobile-nav-active .navmenu {
    background: rgba(8, 22, 38, 0.55);
    backdrop-filter: blur(4px);
  }
  .mobile-nav-active .mobile-nav-toggle {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10000;
    background: #fff;
    color: var(--heading-color, #14365c) !important;
    box-shadow: 0 8px 24px rgba(8, 22, 38, 0.2);
  }
  .navmenu > ul {
    display: flex !important;
    flex-direction: column;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: 0 !important;
    width: min(320px, 88vw);
    max-width: 100%;
    margin: 0 !important;
    padding: 72px 0 24px;
    border-radius: 0;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    box-shadow: -12px 0 40px rgba(8, 22, 38, 0.18);
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-nav-active .navmenu > ul {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  .navmenu > ul::before {
    content: "Menu";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 22px 22px 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-color, #f47920);
    border-bottom: 1px solid rgba(20, 54, 92, 0.08);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  }
  .navmenu ul li {
    width: 100%;
  }
  .navmenu a,
  .navmenu a:focus {
    padding: 14px 22px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid rgba(20, 54, 92, 0.06);
    white-space: normal;
  }
  .navmenu .nav-cta {
    margin: 16px 18px 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(20, 54, 92, 0.12);
  }
  .navmenu .nav-cta a.btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px !important;
    font-size: 15px !important;
    white-space: normal;
    text-align: center;
  }
}

/* ----- Sections & containers ----- */
@media (max-width: 991.98px) {
  .section {
    padding: 56px 0;
  }
  .container,
  .container-fluid.container-xl {
    padding-left: 16px;
    padding-right: 16px;
  }
  .section-title {
    margin-bottom: 28px;
    text-align: center;
  }
  .section-title h2 {
    font-size: clamp(24px, 6vw, 32px);
    line-height: 1.2;
  }
  .section-title h2::after {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 575.98px) {
  .section {
    padding: 44px 0;
  }
}

/* ----- Hero banner & trust bar ----- */
@media (max-width: 767.98px) {
  .hero-banner .hero-swiper .swiper-pagination {
    bottom: 10px;
  }
  .hero-trustbar ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 10px;
    padding: 16px 0;
  }
  .hero-trustbar li {
    flex: none;
    justify-content: flex-start;
    gap: 8px;
  }
  .hero-trustbar li i {
    font-size: 20px;
  }
  .hero-trustbar li span {
    font-size: 13px;
    line-height: 1.35;
  }
  .hero-trustbar li .hero-stat-value {
    display: block;
    font-size: 17px;
    margin: 0 0 2px;
  }
}

@media (max-width: 380px) {
  .hero-trustbar ul {
    grid-template-columns: 1fr;
  }
}

/* ----- Home about block ----- */
@media (max-width: 991.98px) {
  .about.section {
    padding: 48px 0 56px;
  }
  .about .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .about h1 {
    font-size: clamp(26px, 7vw, 36px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em;
    max-width: 100%;
  }
  .about p {
    font-size: 1rem;
    line-height: 1.65;
    max-width: 100%;
  }
  .about .section-subtitle {
    font-size: 11px !important;
    padding: 8px 14px;
    margin-bottom: 12px;
  }
  .about .swiper {
    min-height: 0;
    border-radius: 16px;
    margin-bottom: 0;
  }
  .about .swiper-slide img {
    height: auto;
    min-height: 220px;
    max-height: 320px;
    object-fit: cover;
  }
  .about .btn-get-started {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    max-width: 100%;
  }
}

/* ----- About-2, stats, cybersecurity ----- */
@media (max-width: 767.98px) {
  .about-2 .content-title,
  .content-title {
    font-size: clamp(22px, 5.5vw, 28px) !important;
    line-height: 1.25;
  }
  .about-2 .lead,
  #cybersecurity-guide .lead,
  .stats .lead {
    font-size: 1rem;
  }
  .about-2 .img-wrap {
    margin-bottom: 24px;
  }
  .about-2 .offset-lg-1,
  .about-2 .offset-xl-1 {
    margin-left: 0 !important;
  }
  .stats .count-numbers .col-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    text-align: center;
    padding-left: 6px;
    padding-right: 6px;
  }
  .stats .count-numbers .number {
    font-size: 1.75rem !important;
  }
  .stats .count-numbers .d-block {
    font-size: 12px;
    line-height: 1.3;
  }
  #cybersecurity-guide .row.align-items-center {
    text-align: center;
  }
  #cybersecurity-guide img {
    margin-bottom: 20px;
  }
}

/* ----- Services grid ----- */
@media (max-width: 767.98px) {
  .services .row > [class*="col-"],
  .services-2 .row > [class*="col-"] {
    width: 100%;
  }
  .services .services-item,
  .services-2 .services-item {
    padding: 24px 20px;
  }
  .services-2 .row .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ----- Tabs (home) ----- */
@media (max-width: 991.98px) {
  .tabs .js-custom-dots {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    max-height: none;
    overflow: visible;
  }
  .tabs .service-item.link {
    padding: 14px 16px;
    border: 1px solid rgba(20, 54, 92, 0.08);
    background: #fff;
  }
  .tabs .service-item.link.horizontal {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }
  .tabs .service-item .service-icon {
    margin-bottom: 0 !important;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    min-width: 48px;
  }
  .tabs .service-item .service-contents h3 {
    font-size: 15px !important;
    margin-bottom: 4px;
  }
  .tabs .service-item .service-contents p {
    font-size: 13px;
    margin: 0;
    line-height: 1.45;
  }
  .tabs .swiper-slide img {
    max-height: 220px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
  }
  .tabs .swiper-slide .p-4 {
    padding: 16px !important;
  }
  .tab-slide-title {
    font-size: 1rem !important;
  }
}

/* ----- Pricing ----- */
@media (max-width: 767.98px) {
  .pricing .pricing-item {
    padding: 28px 20px;
    margin-bottom: 8px;
  }
  .pricing .recommended {
    transform: none !important;
    margin-top: 8px;
    margin-bottom: 8px;
  }
  .pricing .recommended:hover {
    transform: translateY(-4px) !important;
  }
  .pricing .pricing-item h4 {
    font-size: 2rem;
  }
  .pricing .btn-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
  }
}

/* ----- FAQ ----- */
@media (max-width: 575.98px) {
  .faq .accordion-item .btn-link {
    padding: 16px 18px;
    font-size: 15px;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
  }
  .faq .accordion-body {
    padding: 0 18px 16px;
    font-size: 15px;
    line-height: 1.6;
  }
}

/* ----- Testimonials & CTA ----- */
@media (max-width: 767.98px) {
  .testimonials .testimonial {
    padding: 22px 18px;
  }
  #cta.section {
    text-align: center;
    padding: 48px 0 !important;
  }
  #cta.section h2 {
    font-size: clamp(22px, 5vw, 28px);
  }
  #cta .btn-get-started {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

/* ----- Page title (inner pages) ----- */
@media (max-width: 767.98px) {
  .page-title {
    padding: 40px 0 32px;
    text-align: center;
  }
  .page-title h1 {
    font-size: clamp(24px, 6.5vw, 32px);
  }
  .page-title .breadcrumbs ol {
    justify-content: center;
    font-size: 13px;
  }
}

/* ----- Contact ----- */
@media (max-width: 767.98px) {
  .contact .info,
  .contact .php-email-form {
    padding: 24px 18px;
  }
  .contact .info-item {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
  }
  .contact .info-item i {
    margin-top: 2px;
  }
  .contact .form-control,
  .contact textarea.form-control {
    font-size: 16px;
    min-height: 48px;
  }
  .contact .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* ----- Footer ----- */
@media (max-width: 767.98px) {
  .footer {
    padding: 40px 0 28px;
    text-align: center;
  }
  .footer .widget {
    margin-bottom: 28px;
  }
  .footer .widget-heading {
    font-size: 1.1rem;
    margin-bottom: 14px;
  }
  .footer .float-start {
    float: none !important;
    display: block;
    width: 100%;
    margin: 0 !important;
    text-align: center;
  }
  .footer .float-start + .float-start {
    margin-top: 0 !important;
  }
  .footer ul li {
    margin-bottom: 8px;
  }
  .footer .social-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  .footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(20, 54, 92, 0.06);
  }
  .footer .footer-contact {
    text-align: left;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ----- Blog & portfolio ----- */
@media (max-width: 767.98px) {
  .blog-page .post-img .swiper,
  .blog-details-page .post-img .swiper {
    height: 200px;
  }
  .blog-details-page .post-img .swiper {
    height: 220px;
  }
  .post-entry {
    margin-bottom: 20px;
  }
  .portfolio .portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .portfolio .portfolio-filters li {
    margin: 0 !important;
    padding: 8px 14px;
    font-size: 13px;
  }
  .portfolio-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
  .portfolio-actions .btn-visit {
    flex: 1 1 100%;
    text-align: center;
  }
}

/* ----- Team ----- */
@media (max-width: 575.98px) {
  .team .team {
    text-align: center;
  }
}

/* ----- Policy pages ----- */
@media (max-width: 575.98px) {
  .policy-content {
    padding: 1.25rem;
    border-radius: 12px;
  }
}

/* ----- CMS custom pages ----- */
@media (max-width: 767.98px) {
  .cms-managed-page .page-title h1 {
    font-size: clamp(22px, 6vw, 28px);
  }
  .cms-page-hero {
    min-height: 200px !important;
    padding: 32px 16px !important;
  }
  .cms-page-hero h1 {
    font-size: clamp(22px, 6vw, 28px) !important;
  }
  .cms-gallery-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .cms-sidebar-box {
    margin-top: 24px;
  }
}

/* ----- Scroll top ----- */
@media (max-width: 575.98px) {
  .scroll-top {
    width: 44px !important;
    height: 44px !important;
    right: 14px !important;
    bottom: 14px !important;
  }
}

/* ----- Safe area (notched phones) ----- */
@supports (padding: max(0px)) {
  @media (max-width: 1199.98px) {
    .mobile-nav-active .navmenu > ul {
      padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
    .header .container-fluid {
      padding-left: max(14px, env(safe-area-inset-left));
      padding-right: max(14px, env(safe-area-inset-right));
    }
  }
}
