/*** RESPONSIVE TYPOGRAPHY AND BASE STYLES ***/

/* Base responsive typography */
html {
    font-size: 16px;
}

body {
    line-height: 1.6;
    letter-spacing: 0.5px;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    word-spacing: 0.1em;
}

/* Responsive typography on tablets and below */
@media (max-width: 992px) {
    html {
        font-size: 15px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    h4 {
        font-size: 1.2rem;
    }
    
    p {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.35rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 13px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h4 {
        font-size: 1rem;
    }
    
    p {
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

/*** Spinner Start ***/

#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .8s ease-out, visibility 0s linear .5s;
    z-index: 99999;
 }

 #spinner.show {
     transition: opacity .8s ease-out, visibility 0s linear .0s;
     visibility: visible;
     opacity: 1;
 }

/*** Spinner End ***/


/*** Button Start ***/
.btn {
    font-weight: 600;
    transition: .5s;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-md-square {
    width: 46px;
    height: 46px;
}

.btn-lg-square {
    width: 58px;
    height: 58px;
}

.btn-square,
.btn-sm-square,
.btn-md-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

.back-to-top {
    position: fixed;
    width: 50px;
    height: 50px;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

/*** Button End ***/


/*** Topbar Start ***/

.topbar .top-info {
    letter-spacing: 1px;
}

.topbar .top-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar .top-link a {
    margin-right: 10px;
}

#note {
    width: 500px;
    overflow: hidden;
}

#note small {
    position: relative;
    display: inline-block;
    animation: mymove 5s infinite;
    animation-timing-function: all;
}

@keyframes mymove {
    from {left: -100%;}
    to {left: 100%;}
}

/*** Topbar End ***/


/*** Navbar Start ***/
.navbar .navbar-nav {
    padding: 15px 0;
}

.navbar .navbar-nav .nav-link {
    padding: 10px;
    color: var(--bs-white);
    font-size: 18px;
    outline: none;
    
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--bs-secondary) !important;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "font awesome 5 free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
    }
}

.navbar .nav-item:hover .dropdown-menu {
    transform: rotateX(0deg);
    visibility: visible;
    transition: .5s;
    opacity: 1;
}

/*** Navbar End ***/


/*** Improved responsive carousel CSS ***/
/* Replace your previous carousel styles with this block */

/* Base layout & overlay */
.carousel-item {
  position: relative;
  overflow: hidden;
}

/* Background overlay: slightly darker on large screens, lighter on small screens */
.carousel-item::after {
  content: "";
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background: rgba(0,0,0,0.55); /* desktop default */
  z-index: 1;
  pointer-events: none;
  transition: background .25s ease;
}

/* Image sizing: use viewport-based height with reasonable cap */
.carousel-item img {
  display: block;
  width: 100%;
  height: min(85vh, 720px); /* keeps hero tall on desktop but not enormous */
  object-fit: cover;
  object-position: center center;
}

/* Caption container sits above overlay */
.carousel-caption {
  position: absolute;
  inset: 0; /* allow flexible positioning */
  z-index: 2;
  display: flex;
  align-items: center;
  /* desktop: left-align content with some safe padding */
  justify-content: flex-start;
  padding: 5rem 6rem;
  pointer-events: none; /* prevent accidental clicks on caption background - buttons override */
}

/* Inner caption content — makes a readable card with blur + translucency */
.carousel-caption .carousel-content {
  pointer-events: auto; /* allow clicking buttons/links */
  max-width: 920px;
  width: 100%;
  background: rgba(0,0,0,0.48);
  padding: 28px;
  border-radius: 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
}

/* Fluid font sizes with clamp() for accessibility */
.carousel-content h6 {
  margin: 0 0 .5rem 0;
  font-weight: 600;
  color: var(--bs-secondary);
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
}

.carousel-content h1 {
  margin: 0 0 .75rem 0;
  color: #fff;
  line-height: 1.04;
  font-weight: 700;
  /* scales between 1.4rem (mobile) and 3.25rem (desktop) */
  font-size: clamp(1.4rem, 4.4vw, 3.25rem);
}

.carousel-content p {
  margin: 0 0 1.25rem 0;
  color: #fff;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  max-width: 44rem; /* keeps long paragraphs readable */
}

/* Buttons look consistent */
.carousel-content .btn {
  min-width: 140px;
  padding: .6rem 1.25rem;
  border-radius: 28px;
}

/* Prev/next control styling (keeps your rounded pill controls) */
.carousel-control-prev,
.carousel-control-next {
  width: 88px;
  height: 60px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  opacity: 1;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Prev on left, Next on right — keep your color variables */
.carousel-control-prev { left: 0; border-radius: 0 50px 50px 0; background: var(--bs-primary); }
.carousel-control-next { right: 0; border-radius: 50px 0 0 50px; background: var(--bs-primary); }

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: var(--bs-secondary);
  transition: background .6s ease;
  /* Default desktop size (large screens) */
.carousel-item img {
    height: 450px;        /* Adjust this height to what you want */
    width: 100%;
    object-fit: cover;
}

/* Tablet screens */
@media (max-width: 992px) {
    .carousel-item img {
        height: 500px;
        object-fit: cover;
    }
}

/* Mobile screens */
@media (max-width: 768px) {
    .carousel-item img {
        height: 380px;
        object-fit: cover;
    }
}

}

/* Indicator bullets (if you ever show them) */
#carouselId .carousel-indicators li {
  width: 30px;
  height: 10px;
  background: var(--bs-primary);
  margin: 6px;
  border-radius: 30px;
  opacity: 1;
}

/* ---------- Responsive adjustments ---------- */

/* Tablet and below — reduce padding, center captions, lighten overlay */
@media (max-width: 992px) {
  .carousel-item img { height: min(70vh, 640px); }

  .carousel-item::after { background: rgba(0,0,0,0.50); }

  .carousel-caption {
    padding: 3.5rem 2.5rem;
    justify-content: center;
    text-align: center;
  }

  .carousel-caption .carousel-content {
    max-width: 720px;
    padding: 22px;
  }

  .carousel-content h1 { font-size: clamp(1.3rem, 5.2vw, 2.25rem); }
  .carousel-content p  { font-size: clamp(.95rem, 2.2vw, 1rem); }
}

/* Mobile — stacked, centered, compact; reduce overlay so image still shows */
@media (max-width: 576px) {
  .carousel-item img { height: min(55vh, 420px); }

  .carousel-item::after { background: rgba(0,0,0,0.40); }

  .carousel-caption {
    align-items: flex-end; /* push caption slightly lower */
    padding: 1.25rem .75rem;
    justify-content: center;
  }

  .carousel-caption .carousel-content {
    width: 94%;
    padding: 14px;
    border-radius: 10px;
  }

  .carousel-content h1 { font-size: clamp(1rem, 7.5vw, 1.6rem); }
  .carousel-content p  { font-size: .92rem; margin-bottom: .8rem; }

  .carousel-content .btn { min-width: 110px; padding: .5rem .9rem; font-size: .95rem; }
  
  /* make prev/next smaller and less intrusive on mobile */
  .carousel-control-prev,
  .carousel-control-next {
    width: 56px;
    height: 44px;
    opacity: .95;
  }
}

/* Optional: ensure captions never overflow image on very short screens */
@media (max-height: 420px) {
  .carousel-content { padding: 10px; }
  .carousel-content h1 { font-size: 1.1rem; }
  .carousel-content p { font-size: .9rem; }
}



/*** Services Start ***/

.services .services-item {
    box-shadow: 0 0 60px rgba(0, 0, 0, .2);
    width: 100%;
    height: 100%;
    border-radius: 10px;
    padding: 10px 0;
    position: relative;
}


.services-content::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    border-radius: 10px 10px 0 0;
    background: rgba(3, 43, 243, 0.8);
    transition: .5s;
}

.services-content::after {
    top: 0;
    bottom: auto;
    border-radius: 10px 10px 10px 10px;
}

.services-item:hover .services-content::after {
    height: 100%;
    opacity: 1;
    transition: .5s;
}

.services-item:hover .services-content-icon {
    position: relative;
    z-index: 2;
}

.services-item .services-content-icon i,
.services-item .services-content-icon p {
    transition: .5s;
}

.services-item:hover .services-content-icon i {
    color: var(--bs-secondary) !important;
}

.services-item:hover .services-content-icon p {
    color: var(--bs-white);
}

/*** Services End ***/


/*** Project Start ***/

.project-img {
    position: relative;
    padding: 15px;
}

.project-img::before {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    top: 0;
    left: 0;
    background: var(--bs-secondary);
    border-radius: 10px;
    opacity: 1;
    z-index: -1;
    transition: .5s;
}

.project-img::after {
    content: "";
    width: 150px;
    height: 150px;
    position: absolute;
    right: 0;
    bottom: 0;
    background: var(--bs-primary);
    border-radius: 10px;
    opacity: 1;
    z-index: -1;
    transition: .5s;
}

.project-content {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.project-content a {
    display: inline-block;
    padding: 20px 25px;
    background: var(--bs-primary);
    border-radius: 10px;
}

.project-item:hover .project-content {
    opacity: 1;
    transition: .5s;
}

.project-item:hover .project-img::before,
.project-item:hover .project-img::after {
    opacity: 0;
}

/*** Project End ***/


/*** Blog Start ***/
.blog-item .blog-btn {
    z-index: 2;
}

.blog-btn .blog-btn-icon {
    height: 50px;
    position: relative;
    overflow: hidden;
}

.blog-btn-icon .blog-icon-2 {
    display: flex;
    position: absolute;
    top: 6px;
    left: -140px;
    
}

.blog-btn-icon:hover .blog-icon-2 {
    transition: 1s;
    left: 5px;
    top: 6px;
    padding-bottom: 5px;
}
.blog-icon-1 {
    position: relative;
    top: -4px;
}
.blog-btn-icon:hover .blog-icon-1 {
    top: 0;
    right: -140px;
    transition: 1s;
}

/*** Blog End ***/


/*** Team Start ***/

.team-item {
    border-top: 30px solid var(--bs-secondary) !important;
    background: rgba(239, 239, 241, 0.8);
}

.team-content::before {
    height: 200px;
    display: block;
    content: "";
    position: relative;
    top: -101px;
    background: var(--bs-secondary);
    clip-path: polygon(50% 50%, 100% 50%, 50% 100%, 0% 50%);
    padding: 60px;
    opacity: 1;
}

.team-img-icon {
    position: relative;
    margin-top: -200px;
    padding: 30px;
    padding-bottom: 0;
}

.team-img {
    border: 15px solid var(--bs-white);
}

.team-img img {
    border: 10px solid var(--bs-secondary);
    transition: .5s;
}

.team-item:hover h4 {
    color: var(--bs-primary);
    transition: .5s;
}

.team-item:hover .team-img img {
    transform: scale(1.05);
    border: 10px solid var(--bs-secondary);
}

.team-carousel .owl-stage {
    position: relative;
    width: 100%;
    height: 100%;
}

.team-carousel .owl-nav {
    position: absolute;
    top: -100px;
    right: 50px;
    display: flex;
}

.team-carousel .owl-nav .owl-prev,
.team-carousel .owl-nav .owl-next {
    width: 56px;
    height: 56px;
    border-radius: 56px;
    margin-left: 15px;
    background: var(--bs-secondary);
    color: var(--bs-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .5s;
}

.team-carousel .owl-nav .owl-prev:hover,
.team-carousel .owl-nav .owl-next:hover {
    background: var(--bs-primary);
    color: var(--bs-white);
}

@media (max-width: 992px) {
    .team-carousel {
        margin-top: 3rem;
    }

    .team-carousel .owl-nav {
        top: -85px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        margin-left: -15px;
    }
}

/*** Team End ***/


/*** Testimonial Start ***/

.testimonial-item {
    background: #e3f0eb;

}

.testimonial-carousel .owl-dots {
    margin-top: 15px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    background: #c1dad0;
    border-radius: 15px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    width: 30px;
    background: var(--bs-primary);
}

.testimonial-carousel .owl-item.center {
    position: relative;
    z-index: 1;
}

.testimonial-carousel .owl-item .testimonial-item {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
    background: #FFFFFF !important;
    box-shadow: 0 0 30px #DDDDDD;
}

/*** Testimonial End ***/


/*** Contact Start ***/
.contact-detail::before {
    position: absolute;
    content: "";
    height: 50%;
    width: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(rgb(210, 243, 235, 1), rgba(230, 250, 245, .3)), url(../img/background.jpg) center center no-repeat;
    background-size: cover;
    border-radius: 10px;
    z-index: -1;
}

.contact-map {
    background: #26d48c;
}

.contact-form {
    background: #26d48c;
}

/*** Contact End ***/


/*** Footer Start ***/

.footer .short-link a,
.footer .help-link a,
.footer .contact-link a {
    transition: .5s;
}

.footer .short-link a:hover,
.footer .help-link a:hover,
.footer .contact-link a:hover {
    letter-spacing: 1px;
}

.footer .hightech-link a:hover {
    background: var(--bs-secondary);
    border: 0;
}

/*** Footer End ***/

/* --- Hero Carousel: hide left/right controls and indicator dots --- */
/* Hide Bootstrap carousel prev/next buttons only for the hero (#carouselId) */
#carouselId .carousel-control-prev,
#carouselId .carousel-control-next {
    display: none !important;
}

/* Hide the small round indicator dots under the hero carousel - on ALL screen sizes */
#carouselId .carousel-indicators {
    display: none !important;
}

/* If any other small decorative dots are present in the hero, ensure they're hidden */
.carousel-item .carousel-indicators,
.carousel-item .indicator,
.hero-dots {
    display: none !important;
}

/* --- Hero buttons: improve sizing & placement for tablets and phones --- */
.carousel-caption .carousel-content a {
    display: inline-block;
    margin: 0.4rem 0.6rem;
}

.carousel-caption .carousel-content a button,
.carousel-caption .carousel-content a .btn {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 30px;
    min-width: 140px;
}

/* Larger, touch-friendly buttons on small screens; stack vertically */
@media (max-width: 992px) {
    .carousel-caption .carousel-content {
        padding: 0 1rem;
    }
    .carousel-caption .carousel-content a {
        display: block;
        width: 100%;
        max-width: 420px;
        margin: 0.45rem auto;
    }
    .carousel-caption .carousel-content a button,
    .carousel-caption .carousel-content a .btn {
        width: 100%;
        padding: 14px 0;
        font-size: 18px;
        min-width: 0;
    }
}

@media (max-width: 576px) {
    .carousel-caption .carousel-content a button,
    .carousel-caption .carousel-content a .btn {
        padding: 12px 0;
        font-size: 16px;
        border-radius: 24px;
    }
    .carousel-caption .carousel-content {
        transform: translateY(-10%); /* nudge caption slightly for very small screens */
    }
}

/* ===== COMPREHENSIVE RESPONSIVE IMPROVEMENTS ===== */

/* ---- TOPBAR: Hide on small screens for more space ---- */
@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .topbar .top-info {
        display: flex;
        flex-direction: column;
        gap: 8px;
        font-size: 12px;
    }
    
    #note {
        display: none !important;
    }
    
    .topbar .top-link {
        justify-content: center;
    }
}

/* ---- NAVBAR: Improve spacing and touch targets on mobile ---- */
@media (max-width: 992px) {
    .navbar {
        padding: 0;
    }
    
    .navbar .navbar-nav {
        padding: 10px 0;
    }
    
    .navbar .navbar-nav .nav-link {
        padding: 12px 15px;
        font-size: 16px;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .navbar-brand {
        padding: 10px 0;
    }
    
    .navbar-brand h1 {
        font-size: 24px;
        margin: 0;
    }
    
    .navbar .d-none.d-xl-flex {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .navbar-brand h1 {
        font-size: 20px;
    }
    
    .navbar .navbar-nav .nav-link {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ---- CAROUSEL: Responsive text and image sizing ---- */
@media (max-width: 992px) {
    .carousel-item {
        min-height: 500px !important;
    }
    
    .carousel-item img {
        min-height: 500px !important;
    }
    
    .carousel-caption .carousel-content h6 {
        font-size: 18px;
    }
    
    .carousel-caption .carousel-content h1 {
        font-size: 32px;
    }
    
    .carousel-caption .carousel-content p {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        min-height: 400px !important;
    }
    
    .carousel-item img {
        min-height: 400px !important;
    }
    
    .carousel-caption .carousel-content h1 {
        font-size: 24px;
    }
    
    .carousel-caption .carousel-content p {
        font-size: 13px;
        margin-bottom: 20px !important;
    }
}

@media (max-width: 576px) {
    .carousel-item {
        min-height: 300px !important;
    }
    
    .carousel-item img {
        min-height: 300px !important;
    }
    
    .carousel-caption .carousel-content h6 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .carousel-caption .carousel-content h1 {
        font-size: 20px;
        margin-bottom: 12px !important;
    }
    
    .carousel-caption .carousel-content p {
        font-size: 12px;
        margin-bottom: 15px !important;
    }
}

/* ---- SERVICES: Responsive grid and spacing ---- */
@media (max-width: 992px) {
    .services .services-item {
        margin-bottom: 20px;
    }
    
    .services-item .services-content-icon i {
        font-size: 50px;
    }
}

@media (max-width: 768px) {
    .services .services-item {
        padding: 20px;
        min-height: 280px;
    }
    
    .services-item .services-content-icon i {
        font-size: 40px;
    }
    
    .services-item h4 {
        font-size: 18px;
    }
    
    .services-item p {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .services-item .services-content-icon i {
        font-size: 35px;
    }
    
    .services-item h4 {
        font-size: 16px;
    }
}

/* ---- PROJECTS: Responsive image sizing and overlays ---- */
@media (max-width: 992px) {
    .project-img {
        padding: 10px;
    }
    
    .project-img::before,
    .project-img::after {
        width: 120px;
        height: 120px;
    }
    
    .project-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .project-img::before,
    .project-img::after {
        width: 100px;
        height: 100px;
    }
    
    .project-content a {
        padding: 15px 20px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .project-img {
        padding: 8px;
    }
    
    .project-img::before,
    .project-img::after {
        width: 80px;
        height: 80px;
    }
}

/* ---- BLOG: Responsive text and spacing ---- */
@media (max-width: 992px) {
    .blog-item {
        margin-bottom: 25px;
    }
}

@media (max-width: 768px) {
    .blog-item h4 {
        font-size: 18px;
    }
    
    .blog-item p {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .blog-item h4 {
        font-size: 16px;
    }
    
    .blog-item p {
        font-size: 13px;
    }
}

/* ---- TEAM: Responsive carousel and card sizing ---- */
@media (max-width: 992px) {
    .team-content::before {
        height: 150px;
        top: -76px;
    }
    
    .team-carousel .owl-nav {
        top: -80px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    .team-item {
        border-top: 20px solid var(--bs-secondary);
        margin-bottom: 20px;
    }
    
    .team-img-icon {
        margin-top: -150px;
        padding: 20px;
    }
    
    .team-img {
        border: 10px solid var(--bs-white);
    }
    
    .team-img img {
        border: 5px solid var(--bs-secondary);
    }
    
    .team-carousel .owl-nav {
        top: -70px;
        right: 15px;
    }
    
    .team-carousel .owl-nav .owl-prev,
    .team-carousel .owl-nav .owl-next {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .team-content::before {
        height: 120px;
        top: -61px;
    }
    
    .team-img {
        border: 8px solid var(--bs-white);
    }
    
    .team-carousel .owl-nav {
        top: -65px;
        right: 10px;
    }
    
    .team-carousel .owl-nav .owl-prev,
    .team-carousel .owl-nav .owl-next {
        width: 40px;
        height: 40px;
        margin-left: 10px;
    }
}

/* ---- TESTIMONIALS: Responsive carousel items ---- */
@media (max-width: 992px) {
    .testimonial-item {
        padding: 20px;
        min-height: auto;
    }
    
    .testimonial-item p {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .testimonial-item {
        padding: 15px;
    }
    
    .testimonial-item p {
        font-size: 13px;
    }
    
    .testimonial-carousel .owl-dots {
        margin-top: 20px;
    }
}

/* ---- CONTACT: Responsive form and map layout ---- */
@media (max-width: 992px) {
    .contact-detail {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .contact-detail h3 {
        font-size: 20px;
    }
    
    .contact-detail p {
        font-size: 14px;
    }
    
    .contact-form form {
        padding: 20px;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 12px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .contact-form button {
        padding: 12px 20px;
        font-size: 16px;
        min-height: 48px;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .contact-detail {
        padding: 15px;
    }
    
    .contact-form {
        padding: 15px;
    }
    
    .contact-form input,
    .contact-form textarea {
        font-size: 13px;
    }
}

/* ---- FOOTER: Responsive layout and text ---- */
@media (max-width: 992px) {
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer .footer-item {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .footer h5 {
        font-size: 18px;
    }
    
    .footer p,
    .footer a,
    .footer li {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer .footer-item {
        margin-bottom: 20px;
    }
    
    .footer h5 {
        font-size: 16px;
        margin-bottom: 12px;
    }
}

/* ---- PAGE HEADERS: Responsive text sizing ---- */
@media (max-width: 992px) {
    .page-header {
        min-height: 300px;
        background-size: cover;
    }
    
    .page-header h1 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .page-header {
        min-height: 250px;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .page-header .breadcrumb-item,
    .page-header .breadcrumb-item a {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .page-header {
        min-height: 200px;
    }
    
    .page-header h1 {
        font-size: 22px;
    }
    
    .page-header .breadcrumb {
        padding: 0;
    }
}

/* ---- GENERAL: Ensure images are responsive ---- */
@media (max-width: 992px) {
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    section {
        padding: 30px 0 !important;
    }
    
    .py-5 {
        padding: 40px 0 !important;
    }
}

/* ---- OVERRIDES FOR INLINE STYLES THAT BREAK LAYOUT ON SMALL SCREENS ---- */
@media (max-width: 768px) {
    .text-center.mx-auto.pb-5 {
        max-width: 92% !important;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Reset large negative offsets used for desktop decorations */
    .blog-btn.position-relative,
    .blog-content.position-relative,
    .project-item .project-img {
        margin-top: 0 !important;
    }

    /* Hide decorative absolute badges that overlap content on small screens */
    .position-absolute.px-4.py-3.bg-primary.text-white.rounded {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .text-center.mx-auto.pb-5 {
        max-width: 96% !important;
    }
}

/* ---- BUTTONS: Ensure proper touch targets on mobile ---- */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        padding: 10px 20px;
    }
    
    .btn-sm {
        min-height: 38px;
        padding: 8px 15px;
    }
    
    .btn-lg {
        min-height: 52px;
        padding: 14px 28px;
    }
}

/* ---- BACK TO TOP BUTTON: Responsive positioning ---- */
@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        right: 20px;
        bottom: 20px;
    }
}

@media (max-width: 576px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        right: 15px;
        bottom: 15px;
    }
}

/* ---- NAVBAR & COLLAPSE: Mobile readability and touch targets ---- */
@media (max-width: 992px) {
    .navbar-toggler {
        color: var(--bs-white);
        border-color: rgba(255,255,255,0.15);
    }

    .navbar-collapse {
        background: var(--bs-primary);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 0.5rem;
    }

    .navbar-collapse .navbar-nav {
        display: block;
    }

    .navbar-collapse .nav-link {
        display: block;
        width: 100%;
        padding: 12px 16px;
        color: var(--bs-white) !important;
        font-size: 16px;
    }

    .navbar-collapse .nav-link:hover,
    .navbar-collapse .nav-link:focus {
        color: var(--bs-secondary) !important;
        background: rgba(255,255,255,0.03);
        border-radius: 6px;
    }

    /* Make dropdown menus flow in mobile rather than absolute positioned */
    .navbar .dropdown-menu {
        position: static !important;
        float: none;
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        box-shadow: none;
        background: transparent;
        margin: 0;
        padding: 0;
    }
}

@media (max-width: 992px) {
    .navbar .dropdown-item {
        color: var(--bs-white) !important;
        padding: 10px 16px;
    }

    .navbar .dropdown-item:hover,
    .navbar .dropdown-item:focus {
        background: rgba(255,255,255,0.03);
        color: var(--bs-secondary) !important;
    }
}

/* ---- CAROUSEL: ensure hero images always cover and scale cleanly ---- */
.carousel-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Small fix for dropdown caret color on dark nav */
.navbar-dark .navbar-nav .dropdown-toggle::after {
    color: var(--bs-white);
}

