/* ========================================
   CodeSim Website - Responsive Styles
   Mobile First Approach
   ======================================== */

/* ========================================
   Tablet (768px and up)
   ======================================== */
@media (max-width: 768px) {
  /* Typography Adjustments */
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.75rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  /* Navigation */
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    overflow-y: auto;
  }

  .nav-menu.active {
    right: 0;
  }

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

  .nav-link {
    display: block;
    padding: 1rem 0;
    font-size: 1.2rem;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 0.5rem;
    background: rgba(33, 38, 45, 0.8);
  }

  .nav-badge {
    display: none;
  }

  .hamburger {
    display: flex;
    width: 44px;
    height: 44px;
  }

  .hamburger span {
    width: 30px;
    height: 3px;
  }

  .hamburger span:nth-child(1) {
    top: 13px;
  }

  .hamburger span:nth-child(2) {
    top: 20.5px;
  }

  .hamburger span:nth-child(3) {
    top: 28px;
  }

  .hamburger.active span:nth-child(1) {
    top: 20.5px;
    transform: rotate(45deg);
  }

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

  .hamburger.active span:nth-child(3) {
    top: 20.5px;
    transform: rotate(-45deg);
  }

  .green-tech-logo {
    display: none;
  }

  .hero-green-tech {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
  }

  .hero-green-tech-logo {
    height: 110px;
    width: auto;
  }

  /* Language Selector Mobile */
  .language-selector {
    position: absolute;
    right: 85px;
    top: 50%;
    transform: translateY(-50%);
  }

  .lang-toggle {
    padding: 0.5rem 0.9rem;
    font-size: 1rem;
  }

  .lang-dropdown {
    right: 0;
    min-width: 130px;
  }

  /* Hero Section */
  .hero {
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-logo {
    display: none;
  }

  .hero-slogan {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  }

  .hero-slogan br {
    display: inline;
  }

  .hero-logo-img {
    width: 80px;
    height: 80px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
    gap: 1rem;
  }

  .hero-buttons .btn {
    width: 100%;
    padding: 0.7rem 1.2rem;
    font-size: 1rem;
  }

  .floating-icons {
    display: none;
  }

  /* Products Grid */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Product Detail */
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-detail-grid.reverse {
    direction: ltr;
  }

  .product-name {
    font-size: 2rem;
  }

  .product-headline {
    font-size: 1.2rem;
  }

  .visual-placeholder {
    min-height: 300px;
  }

  /* Capabilities Grid */
  .capabilities-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Use Cases */
  .use-case-badge {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
  }

  /* Features Tags */
  .feature-tag {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
  }

  /* Benefits Grid */
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Questions List */
  .questions-list {
    grid-template-columns: 1fr;
  }

  /* Support Grid */
  .support-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .support-grid .support-card:last-child {
    grid-column: auto;
  }

  /* Hide logo badge on mobile */
  .logo-badge {
    display: none;
  }

  /* CTA Banner */
  .cta-title {
    font-size: 1.8rem;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .cta-buttons .btn {
    width: 100%;
  }

  /* Contact Section */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .footer-social {
    flex-wrap: wrap;
  }

  /* Scroll to Top */
  .scroll-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
  }

  /* Section Padding */
  section {
    padding: 60px 0;
  }

  .container {
    padding: 0 1.5rem;
  }
}

/* ========================================
   Mobile (576px and down)
   ======================================== */
@media (max-width: 576px) {
  /* Typography */
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .product-name {
    font-size: 1.75rem;
  }

  .product-headline {
    font-size: 1.1rem;
  }

  /* Buttons */
  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }

  .btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  /* Navigation */
  .nav-logo {
    font-size: 1.3rem;
  }

  .logo-icon {
    width: 128px;
    height: 128px;
  }

  /* Hero */
  .hero-logo-img {
    width: 70px;
    height: 70px;
  }

  .hero-badge {
    font-size: 0.9rem;
  }

  /* Product Cards */
  .product-card {
    padding: 2rem 1.5rem;
  }

  .product-icon {
    width: 60px;
    height: 60px;
  }

  .product-title {
    font-size: 1.5rem;
  }

  /* Detail Sections */
  .visual-placeholder {
    min-height: 250px;
    padding: 1.5rem;
  }

  .product-description {
    font-size: 1rem;
  }

  /* Chat Interface */
  .chat-interface {
    padding: 1rem;
  }

  .chat-message {
    max-width: 90%;
  }

  /* CTA Banner */
  .cta-title {
    font-size: 1.5rem;
  }

  /* Contact Form */
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.75rem;
  }

  /* Footer */
  .footer {
    padding: 3rem 0 1.5rem;
  }

  .footer-content {
    gap: 1.5rem;
  }

  /* Container */
  .container {
    padding: 0 1rem;
  }

  section {
    padding: 50px 0;
  }
}

/* ========================================
   Desktop (1024px and up)
   ======================================== */
@media (min-width: 1024px) {
  /* Enhanced spacing for desktop */
  :root {
    --section-padding: 120px;
  }

  /* Typography enhancements */
  .hero-title {
    font-size: 4.5rem;
  }

  .section-title {
    font-size: 3rem;
  }

  /* Navigation enhancements */
  .nav-container {
    padding: 0 3rem;
  }

  /* Product grid enhancement */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  /* Product detail enhancement */
  .product-detail-grid {
    gap: 5rem;
  }

  /* Better visual balance */
  .visual-placeholder {
    min-height: 450px;
  }

  /* Contact grid stays side by side */
  .contact-grid {
    gap: 5rem;
  }
}

/* ========================================
   Large Desktop (1440px and up)
   ======================================== */
@media (min-width: 1440px) {
  :root {
    --container-max-width: 1400px;
    --section-padding: 140px;
  }

  /* Typography for large screens */
  .hero-title {
    font-size: 5rem;
  }

  .hero-subtitle {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 3.5rem;
  }

  /* Enhanced spacing */
  .container {
    padding: 0 3rem;
  }

  /* Grid enhancements */
  .products-grid {
    gap: 3rem;
  }

  .capabilities-grid,
  .benefits-grid,
  .support-grid {
    gap: 2.5rem;
  }

  /* Larger visuals */
  .visual-placeholder {
    min-height: 500px;
    padding: 3rem;
  }

  .product-icon {
    width: 100px;
    height: 100px;
  }

  .support-icon {
    width: 80px;
    height: 80px;
  }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .navbar,
  .hamburger,
  .floating-icons,
  .cta-banner,
  .contact-form-container,
  .footer {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  section {
    page-break-inside: avoid;
  }
}

/* ========================================
   Landscape Orientation (Mobile/Tablet)
   ======================================== */
@media (max-width: 1024px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 100px 0 50px;
  }

  .hero-logo-img {
    width: 60px;
    height: 60px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: row;
    max-width: none;
  }
}

/* ========================================
   Reduced Motion Preferences
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .float-icon {
    animation: none;
  }

  .wave {
    animation: none;
  }

  .chat-typing span {
    animation: none;
  }
}

/* ========================================
   High Contrast Mode
   ======================================== */
@media (prefers-contrast: high) {
  :root {
    --accent-primary: #00ffff;
    --text-muted: #cccccc;
  }

  .product-card,
  .capability-card,
  .support-card,
  .benefit-card {
    border-width: 2px;
  }

  .btn {
    border-width: 3px;
  }
}

/* ========================================
   Dark Mode Override (if needed)
   ======================================== */
@media (prefers-color-scheme: light) {
  /* Site is intentionally dark themed */
  /* No overrides needed - maintaining brand identity */
}

/* ========================================
   Touch Device Optimizations
   ======================================== */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .nav-link {
    padding: 1rem;
  }

  .btn {
    padding: 1.125rem 2.5rem;
    font-size: 1.05rem;
  }

  .product-card {
    padding: 2.5rem;
  }

  /* Remove hover effects on touch devices */
  .product-card:hover,
  .capability-card:hover,
  .support-card:hover,
  .benefit-card:hover {
    transform: none;
  }

  /* Keep focus states for accessibility */
  .product-card:active,
  .btn:active {
    transform: scale(0.98);
  }
}
