/* ===================================
   RESPONSIVE DESIGN FIXES
   Comprehensive fixes for all screen sizes
   =================================== */

/* CSS Custom Properties for Responsive Design */
:root {
  --container-padding: clamp(15px, 4vw, 30px);
  --section-padding: clamp(40px, 8vw, 80px);
  --heading-size-large: clamp(2rem, 5vw, 3.5rem);
  --heading-size-medium: clamp(1.5rem, 4vw, 2.5rem);
  --heading-size-small: clamp(1.2rem, 3vw, 1.8rem);
  --body-text-size: clamp(14px, 2.5vw, 18px);
  --button-padding: clamp(10px, 2.5vw, 15px) clamp(20px, 4vw, 30px);
  --border-radius: clamp(8px, 2vw, 15px);
}

/* ===================================
   GLOBAL RESPONSIVE FIXES
   =================================== */

/* Fix container max-widths */
.container,
.container-lg,
.container-md,
.container-sm,
.container-xl,
.container-xxl {
  max-width: 100%;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

@media (min-width: 576px) {
  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {
  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: 1320px;
  }
}

/* Responsive Typography */
h1, .h1 {
  font-size: var(--heading-size-large);
  line-height: 1.2;
}

h2, .h2 {
  font-size: var(--heading-size-medium);
  line-height: 1.3;
}

h3, .h3 {
  font-size: var(--heading-size-small);
  line-height: 1.4;
}

h4, .h4 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  line-height: 1.4;
}

h5, .h5 {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.5;
}

h6, .h6 {
  font-size: clamp(0.9rem, 2vw, 1rem);
  line-height: 1.5;
}

p {
  font-size: var(--body-text-size);
  line-height: 1.6;
}

/* ===================================
   HEADER RESPONSIVE FIXES
   =================================== */

.header-area {
  padding: clamp(10px, 2vw, 20px) 0;
}

.header-area .navbar-nav li > a {
  /* font-size: clamp(14px, 2.5vw, 16px); */
  padding: clamp(8px, 1.5vw, 12px) clamp(12px, 2vw, 20px);
}

/* Mobile Navigation Improvements */
@media (max-width: 991.98px) {
  .header-area .navbar-collapse {
    background:#fff;
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    margin-top: 15px;
    padding: 20px;
  }
  
  .header-area .navbar-nav {
    gap: 10px;
  }
  
  .header-area .navbar-nav li > a {
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
  }
  
  .header-area .navbar-nav li > a:hover {
    background: rgba(241, 200, 133, 0.1);
    transform: translateX(5px);
  }
}

/* ===================================
   HERO SECTION FIXES
   =================================== */

.hero-wrapper {
  padding: var(--section-padding) 0;
}

.hero-content h2 {
  font-size: var(--heading-size-large);
  margin-bottom: clamp(20px, 4vw, 40px);
}

.hero-content p {
  font-size: var(--body-text-size);
  margin-bottom: clamp(25px, 5vw, 40px);
}

/* Hero Image Group Responsive */
.hero-content.home2 .imgs-group {
  gap: clamp(10px, 2vw, 20px);
}

.hero-content.home2 .imgs-group img {
  width: clamp(40px, 8vw, 60px);
  height: clamp(40px, 8vw, 60px);
}

/* ===================================
   BUTTON RESPONSIVE FIXES
   =================================== */

.btn {
  padding: var(--button-padding);
  font-size: clamp(14px, 2.5vw, 16px);
  border-radius: var(--border-radius);
  min-height: clamp(44px, 8vw, 50px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.btn-lg {
  padding: clamp(12px, 3vw, 18px) clamp(25px, 5vw, 35px);
  font-size: clamp(16px, 3vw, 18px);
  min-height: clamp(50px, 10vw, 60px);
}

.btn-sm {
  padding: clamp(8px, 2vw, 12px) clamp(15px, 3vw, 20px);
  font-size: clamp(12px, 2vw, 14px);
  min-height: clamp(36px, 6vw, 40px);
}

/* ===================================
   SERVICE CARDS RESPONSIVE
   =================================== */

.service-slide-card {
  padding: clamp(20px, 4vw, 30px);
  border-radius: var(--border-radius);
  min-height: clamp(200px, 40vw, 300px);
}

.service-slide-card h2 {
  font-size: var(--heading-size-small);
  margin-bottom: clamp(15px, 3vw, 25px);
}

.service-slide-card p {
  font-size: var(--body-text-size);
}

.service-slide-card i,
.service-slide-card svg {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: clamp(15px, 3vw, 25px);
}

/* ===================================
   ABOUT SECTION FIXES
   =================================== */

.about-us-wrapper {
  padding: var(--section-padding) 0;
}

.about-us-thumbnail img {
  border-radius: var(--border-radius);
  width: 100%;
  height: auto;
  object-fit: cover;
}

.about-us-text-content h2 {
  font-size: var(--heading-size-medium);
  margin-bottom: clamp(20px, 4vw, 30px);
}

.about-us-text-content p {
  font-size: var(--body-text-size);
  margin-bottom: clamp(20px, 4vw, 30px);
}

/* ===================================
   PORTFOLIO RESPONSIVE FIXES
   =================================== */

.portfolio-card {
  border-radius: var(--border-radius);
  overflow: hidden;
}

.portfolio-card img {
  width: 100%;
  height: clamp(200px, 40vw, 300px);
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-card .portfolio-overlay-content {
  padding: clamp(20px, 4vw, 30px);
}

.portfolio-card .portfolio-overlay-content h3 {
  font-size: var(--heading-size-small);
  margin-bottom: clamp(10px, 2vw, 15px);
}

.portfolio-card .portfolio-overlay-content p {
  font-size: var(--body-text-size);
  margin-bottom: clamp(15px, 3vw, 20px);
}

/* ===================================
   TESTIMONIALS RESPONSIVE
   =================================== */

.testimonial-swiper .swiper-slide {
  padding: clamp(20px, 4vw, 30px);
}

.testimonial-swiper .swiper-slide p {
  font-size: var(--body-text-size);
  line-height: 1.6;
}

.testimonial-swiper .swiper-slide .testimonial-info > div h4 {
  font-size: var(--heading-size-small);
}

/* ===================================
   BLOG CARDS RESPONSIVE
   =================================== */

.blog-card {
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card img {
  width: 100%;
  height: clamp(200px, 40vw, 250px);
  object-fit: cover;
}

.blog-card .post-title {
  font-size: var(--heading-size-small);
  line-height: 1.4;
  margin: clamp(15px, 3vw, 20px) 0;
}

.blog-card .blog-meta {
  font-size: clamp(12px, 2vw, 14px);
}

/* ===================================
   CONTACT FORM RESPONSIVE
   =================================== */

.contact-form {
  padding: clamp(25px, 5vw, 40px);
  border-radius: var(--border-radius);
}

.contact-form h3 {
  font-size: var(--heading-size-medium);
  margin-bottom: clamp(20px, 4vw, 30px);
}

form .form-control {
  padding: clamp(12px, 2.5vw, 16px);
  font-size: var(--body-text-size);
  border-radius: var(--border-radius);
  min-height: clamp(44px, 8vw, 50px);
}

form textarea.form-control {
  min-height: clamp(100px, 20vw, 150px);
}

/* ===================================
   FOOTER RESPONSIVE FIXES
   =================================== */

.footer-wrapper {
  padding: var(--section-padding) 0 clamp(20px, 4vw, 30px);
}

.footer-card {
  padding: clamp(20px, 4vw, 30px);
  border-radius: var(--border-radius);
}

.footer-card h4 {
  font-size: var(--heading-size-small);
  margin-bottom: clamp(15px, 3vw, 25px);
}

.footer-card p {
  font-size: var(--body-text-size);
  margin-bottom: clamp(15px, 3vw, 20px);
}

.footer-card .social-nav a {
  width: clamp(40px, 8vw, 50px);
  height: clamp(40px, 8vw, 50px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, 3vw, 18px);
}

/* ===================================
   CTA SECTION RESPONSIVE
   =================================== */

.cta-wrapper {
  /* padding: var(--section-padding) 0; */
}

.cta-wrapper h2 {
  font-size: var(--heading-size-medium);
  margin-bottom: clamp(20px, 4vw, 30px);
}

.cta-wrapper p {
  font-size: var(--body-text-size);
  margin-bottom: clamp(25px, 5vw, 35px);
}

.cta-content {
  padding: clamp(25px, 5vw, 40px);
  border-radius: var(--border-radius);
  text-align: center;
}

.cta-content h2 {
  font-size: var(--heading-size-large);
  margin-bottom: clamp(15px, 3vw, 25px);
}

.cta-content h4 {
  font-size: var(--heading-size-small);
  margin-bottom: clamp(15px, 3vw, 20px);
}

.cta-content p {
  font-size: var(--body-text-size);
}

/* ===================================
   TABLES RESPONSIVE
   =================================== */

.table-responsive {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

table {
  width: 100%;
  min-width: 600px;
}

th, td {
  padding: clamp(8px, 2vw, 12px);
  font-size: clamp(12px, 2vw, 14px);
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  th, td {
    white-space: normal;
    word-wrap: break-word;
  }
}

/* ===================================
   IMAGES RESPONSIVE
   =================================== */

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

/* ===================================
   ACCORDION RESPONSIVE
   =================================== */

.accordion-item .accordion-button {
  padding: clamp(15px, 3vw, 20px);
  font-size: var(--heading-size-small);
}

.accordion-item .accordion-body {
  padding: clamp(15px, 3vw, 20px);
  font-size: var(--body-text-size);
}

/* ===================================
   SWIPER RESPONSIVE FIXES
   =================================== */

.swiper-slide {
  height: auto;
}

.swiper-pagination-bullet {
  width: clamp(8px, 2vw, 12px);
  height: clamp(8px, 2vw, 12px);
}

.swiper-button-next,
.swiper-button-prev {
  width: clamp(40px, 8vw, 50px);
  height: clamp(40px, 8vw, 50px);
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-responsive {
  font-size: var(--body-text-size);
}

.heading-responsive {
  font-size: var(--heading-size-medium);
}

.padding-responsive {
  padding: var(--section-padding) 0;
}

.margin-responsive {
  margin: clamp(20px, 4vw, 40px) 0;
}

/* ===================================
   ACCESSIBILITY IMPROVEMENTS
   =================================== */

/* Focus states */
.btn:focus,
.form-control:focus,
.navbar-toggler:focus {
  outline: 2px solid #f1c885;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --primary: #000;
    --accent: #fff;
  }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
  .header-area,
  .footer-wrapper,
  .cta-wrapper,
  .swiper-navigation-container,
  .navbar-toggler {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
}

/* ===================================
   LANDSCAPE ORIENTATION FIXES
   =================================== */

@media (orientation: landscape) and (max-height: 500px) {
  .hero-wrapper {
    padding: clamp(20px, 4vw, 40px) 0;
  }
  
  .section-padding {
    padding: clamp(20px, 4vw, 40px) 0;
  }
}

/* ===================================
   VERY SMALL SCREENS (320px and below)
   =================================== */

@media (max-width: 320px) {
  :root {
    --container-padding: 10px;
    --section-padding: 20px;
    --heading-size-large: 1.8rem;
    --heading-size-medium: 1.4rem;
    --heading-size-small: 1.1rem;
    --body-text-size: 14px;
  }
  
  .btn {
    padding: 8px 15px;
    font-size: 14px;
    min-height: 40px;
  }
  
  .header-area .navbar-brand img {
    max-height: 35px;
  }
}

/* ===================================
   LARGE SCREENS (1400px and above)
   =================================== */

@media (min-width: 1400px) {
  :root {
    --container-padding: 40px;
    --section-padding: 100px;
    --heading-size-large: 4rem;
    --heading-size-medium: 3rem;
    --heading-size-small: 2rem;
    --body-text-size: 20px;
  }
}

/* ===================================
   HOVER EFFECTS (Desktop only)
   =================================== */

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  }
  
  .portfolio-card:hover img {
    transform: scale(1.05);
  }
  
  .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  }
  
  .service-slide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  }
}

/* ===================================
   TOUCH DEVICE OPTIMIZATIONS
   =================================== */

@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px; /* Minimum touch target size */
  }
  
  .header-area .navbar-nav li > a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .social-nav a {
    min-width: 44px;
    min-height: 44px;
  }
}

/* --- FOOTER: Mobile fixes --- */
@media (max-width: 767.98px) {
  .footer-wrapper .row {
    flex-direction: column !important;
  }
  .footer-card {
    padding: 16px 8px !important;
    margin-bottom: 18px;
    border-radius: 10px;
  }
  .footer-card h5, .footer-card h6 {
    font-size: 1.1rem !important;
  }
  .footer-card p, .footer-card ul, .footer-card label {
    font-size: 0.98rem !important;
  }
  .footer-card .social-nav {
    gap: 10px !important;
  }
  .footer-card .social-nav a {
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
  }
  .footer-card img.dark-logo, .footer-card img.light-logo {
    max-width: 120px !important;
    height: auto !important;
    margin-bottom: 10px;
  }
  
  /* Subscribe Form Mobile Fixes */
  .footer-card form.subscribe-form {
    display: flex !important;
    flex-direction: row !important;
    gap: 0 !important;
    position: relative !important;
    align-items: center;
  }
  .footer-card form.subscribe-form input.form-control {
    flex: 1 !important;
    min-width: 0 !important;
    font-size: 1rem !important;
    height: 50px !important;
    padding: 12px 16px !important;
    border-radius: 25px 0 0 25px !important;
    border-right: none !important;
  }
  .footer-card form.subscribe-form button.btn {
    width: 50px !important;
    min-width: 50px !important;
    font-size: 1rem !important;
    padding: 0 !important;
    height: 50px !important;
    border-radius: 0 25px 25px 0 !important;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
  }
  .footer-card form.subscribe-form button.btn span {
    font-size: 1.2rem !important;
  }
  
  .footer-bottom-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center !important;
    gap: 10px;
    margin-top: 10px;
  }
  .footer-bottom-nav a {
    font-size: 0.98rem !important;
    padding: 4px 8px;
  }
  .copyright {
    text-align: center !important;
    font-size: 0.95rem !important;
    margin-bottom: 8px;
  }
}

/* Extra small screens */
@media (max-width: 400px) {
  .footer-card img.dark-logo, .footer-card img.light-logo {
    max-width: 90px !important;
  }
  .footer-card {
    padding: 10px 2px !important;
  }
  .footer-card form.subscribe-form {
    flex-direction: row !important;
    gap: 0 !important;
  }
  .footer-card form.subscribe-form input.form-control {
    height: 45px !important;
    font-size: 0.95rem !important;
    padding: 10px 12px !important;
    border-radius: 22px 0 0 22px !important;
  }
  .footer-card form.subscribe-form button.btn {
    height: 45px !important;
    width: 45px !important;
    min-width: 45px !important;
    font-size: 0.95rem !important;
    border-radius: 0 22px 22px 0 !important;
  }
  .footer-card form.subscribe-form button.btn span {
    font-size: 1rem !important;
  }
}

/* Very small screens */
@media (max-width: 320px) {
  .footer-card form.subscribe-form input.form-control {
    height: 40px !important;
    font-size: 0.9rem !important;
    padding: 8px 10px !important;
    border-radius: 20px 0 0 20px !important;
  }
  .footer-card form.subscribe-form button.btn {
    height: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    font-size: 0.9rem !important;
    border-radius: 0 20px 20px 0 !important;
  }
  .footer-card form.subscribe-form button.btn span {
    font-size: 0.9rem !important;
  }
} 