/* Responsive Design */
@media (max-width: 1200px) {
  .container {
    padding: 0 40px;
  }

  .nav-container {
    padding: 20px 40px;
  }

  .hero-content {
    padding: 0 40px;
    gap: 50px;
  }

  .hero-text h1 {
    font-family: "SomarSans", sans-serif;
    font-size: 48px;
    font-weight: 600;
    line-height: 1.36em;
  }

  .services {
    padding: 80px 40px 40px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .nav-container {
    flex-direction: row;
    gap: 16px;
    padding: 20px; /* Increased padding for larger header */
    justify-content: space-between;
    align-items: center;
    min-height: 80px; /* Ensure minimum header height */
  }

  .nav-menu {
    display: none; /* Hide on mobile - will be handled by mobile menu */
  }

  .mobile-menu-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Ensure nav-actions are hidden from mobile header */
  .nav-actions {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  /* Show nav-actions inside mobile menu */
  .nav-menu.active .nav-actions {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-top: 40px;
  }

  .language-dropdown {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .btn-primary {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .nav-menu a {
    font-size: 14px;
    padding: 8px 12px;
  }

  .hero {
    min-height: auto !important;
    height: fit-content !important;
    max-height: none !important;
    padding: 60px 0 40px !important; /* Reduced top padding */
  }
  
  /* Override any inline styles that might be set by JavaScript */
  .hero[style] {
    height: fit-content !important;
    min-height: auto !important;
    max-height: none !important;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    padding: 0 16px;
    gap: 30px;
  }

  .hero-text h1 {
    font-family: "SomarSans", sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2em;
    margin-bottom: 16px;
  }

  .hero-text p {
    font-size: 14px;
    line-height: 1.5em;
    margin-bottom: 20px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }
  
  .hero-actions .btn-primary {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 280px !important;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
  }

  .hero-visual {
    width: 100%;
    height: auto;
    position: relative;
    /* Ensure animations work on mobile */
    animation: fadeInUp 0.6s ease-out !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  .house-image-card,
  .experience-badge,
  .hero-card {
    position: relative;
    margin-bottom: 20px;
    /* Ensure cards are visible and animated */
    opacity: 1 !important;
    transform: translateY(0) !important;
    animation: fadeInUp 0.6s ease-out !important;
  }
  
  .visual-group {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: center !important;
    align-items: center !important;
  }
  
  .house-image-card, .experience-badge {
    width: 48% !important;
    max-width: 48% !important;
    height: 120px !important;
    max-height: 120px !important;
    box-sizing: border-box !important;
    flex: 1 !important;
    min-width: 0 !important;
    padding: 0 !important; /* for house-image-card */
    padding: 12px !important; /* for experience-badge */
    margin: 0 !important;
  }
  
  /* Override absolute positioning for experience-badge on mobile */
  .hero .experience-badge {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 48% !important;
    height: 120px !important;
    max-width: 48% !important;
    max-height: 120px !important;
    background: #f0f0f0 !important;
    border-radius: 12px !important;
    backdrop-filter: none !important;
    z-index: auto !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transform: none !important;
    margin: 0 !important;
    padding: 12px !important;
  }
  
  .hero-card {
    width: 100% !important;
    height: 120px !important;
    margin-top: 16px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
    padding: 0 20px;
  }

  .vision-grid {
    flex-direction: column;
    gap: 40px;
  }

  .steps {
    flex-direction: column;
    gap: 40px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .steps-wrapper {
    flex-direction: column;
    gap: 40px;
  }

  .faq-content {
    flex-direction: column;
    gap: 40px;
    padding: 40px 20px;
  }

  .contact-content {
    flex-direction: column;
    gap: 48px;
    align-items: center;
  }

  .contact-info {
    width: 100%;
    max-width: 520px;
    align-items: center;
    text-align: center;
  }

  .contact-details {
    width: 100%;
    max-width: 734px;
    padding: 0;
  }

  .contact-subtitle {
    font-size: 24px;
  }

  .contact-description {
    font-size: 18px;
  }

  .contact-item-header h4 {
    font-size: 20px;
  }

  .contact-item-content span {
    font-size: 18px;
  }

  .social-links {
    gap: 16px;
  }

  .social-icon {
    width: 36px;
    height: 36px;
  }

  .social-icon img {
    width: 18px;
    height: 18px;
  }

  .footer {
    padding: 40px 20px;
  }

  .footer-main {
    flex-direction: column;
    gap: 40px;
  }

  .footer-links {
    flex-direction: column;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .nav-container {
    padding: 12px;
  }

  .nav-menu {
    gap: 12px;
  }

  .nav-menu a {
    font-size: 13px;
    padding: 6px 10px;
  }

  .hero {
    min-height: auto !important;
    height: fit-content !important;
    max-height: none !important;
    padding: 100px 0 30px !important; /* Increased top padding to account for fixed header */
  }

  .hero-content {
    padding: 0 12px;
    gap: 20px;
  }

  .hero-text h1 {
    font-family: "SomarSans", sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.1em;
    margin-bottom: 12px;
  }

  .hero-text p {
    font-family: "SomarSans", sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4em;
    margin-bottom: 16px;
  }

  .hero-actions {
    gap: 12px;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    padding: 12px 16px;
    font-size: 14px;
  }

  .services {
    padding: 40px 12px 20px;
  }

  .about-content {
    padding: 0 12px;
  }

  .vision-grid {
    gap: 30px;
  }

  .steps {
    gap: 30px;
  }

  .section-title {
    font-family: "SomarSans", sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2em;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    min-width: auto;
  }
}
