@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@400..800&display=swap");

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Baloo 2", sans-serif;
  /* background-color: #fff; */

  /* overflow-x: hidden; */
}

:root {
  --main-color: #fff;
  --text-color: #333;
  --accent: #ffb800;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  --card-bg: #ffffff;
  --body-bg: #f8f9fa;
  --primary-text: #1a1a1a;
  --secondary-text: #6c757d;
  --accent-color: #007bff; /* A nice, clean blue for accents */
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.05);
  --shadow-hover-color: rgba(0, 0, 0, 0.1);
  --text-primary: #212529;
  --text-secondary: #495057;
  --bg-light: #f1f3f5;
  --bg-white: #ffffff;
  --highlight-color: #f7b731;
  --divider-color: #ced4da;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: #fff;
}

.navbar a {
  text-decoration: none;
}

/* Base navbar styles with animations */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 70px;
  background: var(--main-color);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 100;
  border-bottom: 1px solid #eee;
  transition: all 0.3s ease;
  animation: slideDown 0.4s ease-out;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
  transition: all 0.3s ease;
}

.navbar.navbar-hidden {
  transform: translateY(-100%);
  box-shadow: none;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.navbar.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background: #fff;
  height: 65px;
  border-bottom: none;
}

/* Logo with hover animation */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.navbar-logo:hover {
  transform: scale(1.05);
}

.navbar-logo img {
  height: 48px;
  /* width: 48px; */
  object-fit: contain;
  animation: logoRotate 0.6s ease-out;
}

@keyframes logoRotate {
  from {
    transform: rotate(-180deg);
    opacity: 0;
  }
  to {
    transform: rotate(0);
    opacity: 1;
  }
}

.navbar-logo span {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: 1px;
  animation: fadeInRight 0.8s ease-out;
}

@keyframes fadeInRight {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Navigation links with stagger animation */
.navbar-links {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-links li {
  animation: fadeInUp 0.4s ease-out backwards;
}

.navbar-links li:nth-child(1) {
  animation-delay: 0.1s;
}
.navbar-links li:nth-child(2) {
  animation-delay: 0.2s;
}
.navbar-links li:nth-child(3) {
  animation-delay: 0.3s;
}
.navbar-links li:nth-child(4) {
  animation-delay: 0.4s;
}
.navbar-links li:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.navbar-links li a {
  text-decoration: none;
  color: var(--text-color);
  font-size: clamp(0.9rem, 1.5vw, 1.25rem);
  font-weight: 400;
  position: relative;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

.navbar-links li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.navbar-links li a:hover {
  color: var(--accent);
}

.navbar-links li a:hover::after {
  width: 100%;
}

/* Actions section */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  animation: fadeInLeft 0.8s ease-out;
}

@keyframes fadeInLeft {
  from {
    transform: translateX(20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.abtn, .demo-btn {
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  border-radius: 8px;
  padding: 0.4em 1.2em;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.abtn::before, .demo-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
}

.abtn:hover, .demo-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.abtn:hover::before, .demo-btn:hover::before {
  width: 300px;
  height: 300px;
}

.navbar-links .demo-mobile {
  display: none;
}

/* ======================= Demo Request Modal Styles ================================= */

/* --- The Overlay --- */
.demo-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.demo-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Prevent background scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* --- The Modal Content Box --- */
.demo-modal-content {
  display: flex;
  background: #f1f1f1;
  max-width: 900px;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.demo-modal-overlay.active .demo-modal-content {
  opacity: 1;
  transform: scale(0.9);
}

/* --- Close Button --- */
.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: #888;
  cursor: pointer;
  z-index: 10;
  padding: 5px;
  line-height: 1;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  color: #333;
  transform: rotate(90deg);
}

/* --- Left Side (Yellow) --- */
.modal-left {
  flex: 1;
  background: #edac00;
  color: white;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-left h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.modal-left p {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 30px;
}

.modal-left ul {
  list-style-type: none;
  padding: 0;
}

.modal-left li {
  font-size: 1rem;
  line-height: 1.5;
  padding-left: 25px;
  position: relative;
  margin-bottom: 20px;
}

.modal-left li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  opacity: 0.8;
}

/* --- Right Side (Form) --- */
.modal-right {
  flex: 1.2;
  padding: 40px;
  background: #f7f8fa;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  flex: 1;
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #333;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #edac00;
  box-shadow: 0 0 0 3px rgba(237, 172, 0, 0.2);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.submit-btn {
  width: 100%;
  padding: 15px;
  background: #edac00;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: #d49c00;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(237, 172, 0, 0.3);
}

.language-toggle {
  width: 90px;
  height: 42px;
  background: #f1f1f1;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 5px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
}

.lang-text {
  font-weight: 500;
  font-size: 20px;
  transition: color 0.3s ease;
}

.no-text {
  color: black;
}

.en-text {
  color: black;
}

.language-toggle.active .no-text {
  color: black;
}

.language-toggle.active .en-text {
  color: #aaa;
}

.toggle-slider {
  position: absolute;
  width: 40px;
  height: 40px;
  top: 1px;
  left: 1px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: left 0.4s ease;
}

.language-toggle.active .toggle-slider {
  left: 47px;
}

.toggle-slider img {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  object-fit: cover;
}

.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Style when dropdown is open */
.custom-select-wrapper.open .custom-select-trigger {
  border-color: #edac00;
  box-shadow: 0 0 0 3px rgba(237, 172, 0, 0.2);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.custom-select-arrow {
  color: #888;
  transition: transform 0.3s ease;
}

/* Rotate arrow when open */
.custom-select-wrapper.open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 8px 8px;
  z-index: 20;
  max-height: 200px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

/* Show options when open */
.custom-select-wrapper.open .custom-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  border-color: #edac00;
}

.custom-option {
  padding: 12px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: 1rem;
}

.custom-option:hover {
  background-color: #f1f1f1;
}

/* Style for the currently selected option in the list */
.custom-option.selected {
  background-color: #555;
  color: #fff;
}

/* ==================================================Hamburger menu======================================== */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  margin-left: 1rem;
  z-index: 101;
}

.navbar-toggle span {
  width: 28px;
  height: 3px;
  background: var(--text-color);
  border-radius: 2px;
  display: block;
  transition: all 0.3s ease;
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ================================================================================================== */

.devices-container {
  width: 100%;
  margin: 0 auto;
  padding: 6rem 0;
}

.content {
  position: relative;
  text-align: center;
  margin-bottom: 5rem;
  padding: 0 1rem;
}

.content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: #111;
}

.content p {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.7;
  color: #4b5563;
}

.pUlBlock {
  max-width: 650px;
  margin: 0 auto;
  text-align: left;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.7;
  color: #4b5563;
}
.pUlBlock ul {
  padding-left: 30px;
}

.content button {
  margin-top: 15px;
}

/* ===============Random Shapes */
.random-img-1 {
  width: 20%;
  position: absolute;
  top: -25px;
  right: -70px;
  z-index: 999;
}

.random-img-2 {
  width: 20%;
  position: absolute;
  bottom: -30px;
  left: -60px;
}

.single-line {
  position: relative;
  top: -51px;
  padding: 0;
  margin: 0;
  width: 100%;
  border-bottom: 2px solid #f1f1f1;
}

/* --- Frame & Card Styles --- */
.frames {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 0 1rem;
}

.frame {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 6rem;
  background: #fff;
  border-radius: 24px;
  padding: 2rem;
  padding-bottom: 0;
}

.frame.reverse > .text-content {
  order: -1;
}

.frame.reverse {
  gap: 7.5rem;
}

.image-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-wrapper img {
  max-inline-size: 90%;
  /* height: auto; */
  display: block;
}

.text-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 500;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.text-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #4b5563;
}

.text-content ul {
  padding-inline-start: 15px;
  font-size: 1.1rem;

  line-height: 1.8;
  color: #4b5563;
}

/*============================ Spec-btn ============*/
.spec-btn {
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  margin-top: 13px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.spec-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
}

.spec-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.spec-btn:hover::before {
  width: 300px;
  height: 300px;
}

#demo-btn {
  background-color: var(--accent);
  padding: 10px 12px;
  color: #fff;
  border: none;
  margin-inline-end: 10px;
}

#demo-btn::before {
  content: none;
}

#demo-btn:hover,
#demo-btn:focus-visible {
  background-color: #edac00;
}

/* Animation styles */
.animated-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animated-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animated-section:nth-of-type(2) {
  transition-delay: 0.2s;
}

.animated-section:nth-of-type(3) {
  transition-delay: 0.4s;
}

.animated-section:nth-of-type(4) {
  transition-delay: 0.4s;
}

.animated-section:nth-of-type(5) {
  transition-delay: 0.4s;
}

.animated-section:nth-of-type(6) {
  transition-delay: 0.4s;
}

.animated-section:nth-of-type(7) {
  transition-delay: 0.4s;
}

.animated-section:nth-of-type(8) {
  transition-delay: 0.4s;
}

.animated-section:nth-of-type(9) {
  transition-delay: 0.4s;
}

.animated-section:nth-of-type(10) {
  transition-delay: 0.4s;
}

.animated-section:nth-of-type(11) {
  transition-delay: 0.4s;
}

/* ==================================POS DETAILS======================================================= */
.container {
  max-width: 1200px;
  padding: 2rem 3rem;
  margin: 0 auto;
  padding-block-start: 5rem;
}

.container h1 {
  text-align: center;
  font-size: 4rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 20px;
}

.container h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #222;
}

.container p {
  line-height: 1.6;
  font-size: 1rem;
}

.container ul {
  margin-inline-start: 20px;
}

/* ==================================================== POS DEVICE ======================================== */
.control-section {
  position: relative;
  padding: 2rem 2rem;
  padding-bottom: 4rem;
  background-image: url("img/POS-Hardware-Background.png");
  background-size: cover;
  background-position: center center;
  color: #fff;
  text-align: center;
}

/* --- Content Wrapper --- */
.content-wrapper {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Header Content (Title & Paragraph) --- */
.section-header {
  margin-bottom: 4rem;
}

.section-header h1 {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.section-header h1 .highlight {
  position: relative;
  display: inline-block;
}

/* Purple highlight effect using a pseudo-element */
.section-header h1 .highlight::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -15px;
  right: -15px;
  bottom: -5px;
  /* border: 4px solid #7c62d7; */
  z-index: -1;
  border-radius: 5px;
}

.section-header p {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
  color: #e0e0e0;
}

/* --- Cards --- */
.cards-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap; /* Default to wrap for responsiveness */
}

.card {
  background-color: #fff;
  color: #333;
  padding: 2.5rem 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  flex: 1 1 300px; /* Flexible base width: grow/shrink with min 300px */
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Styles for JS animation */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  position: relative;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.452);
  /* background: rgba(255, 255, 255, 0.95); */
}

.card:hover::before {
  opacity: 1;
}

/* Animation class added by JavaScript */
.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-icon {
  width: 70px;
  height: 70px;
  background-color: #f9b934; /* Gold-yellow color */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 10px rgba(249, 185, 52, 0.3);
}

.card-icon i {
  color: #fff;
  font-size: 1.8rem;
}

.card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  position: relative;
}

.card h3::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffb800, #ff9500);
  transition: all 0.4s ease;
  transform: translateX(-50%);
}

.card:hover h3 {
  color: #ffb800;
}

.card:hover h3::after {
  width: 100%;
}

.card p {
  font-size: 1rem;
  color: #666;
}

/* --- Slider Buttons --- */
.slider-btn {
  display: none; /* Hide by default */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  color: #333;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 10;
  opacity: 0.85;
  transition: background 0.2s;
}
.slider-btn.prev {
  left: 0;
}
.slider-btn.next {
  right: 0;
}
.slider-btn:active {
  background: #f9b934;
  color: #fff;
}

/* --- Media Queries for Responsiveness --- */

@media (min-width: 769px) {
  .cards-container {
    flex-wrap: nowrap;
  }
}

/* Max-width 1200px: Slight adjustments for large tablets/laptops */
@media (max-width: 1200px) {
  .content-wrapper {
    max-width: 100%;
    padding: 0 1rem;
  }
  .section-header h1 {
    font-size: 2.8rem;
  }
  .section-header p {
    max-width: 700px;
    font-size: 1rem;
  }
  .cards-container {
    gap: 1.5rem;
  }
  .card {
    max-width: 350px;
  }

  .devices-container {
    padding: 5rem 0;
  }

  .frame {
    gap: 4rem;
    padding: 1.5rem;
  }

  .frame.reverse {
    gap: 5rem;
  }

  .content {
    margin-bottom: 4rem;
  }
}

/* Max-width 1024px: Adjust for medium laptops */
@media (max-width: 1024px) {
  .section-header h1 {
    font-size: 2.5rem;
  }
  .section-header p {
    max-width: 600px;
  }
  .cards-container {
    gap: 1rem;
  }
  .card {
    padding: 2rem 1.5rem;
  }

  .devices-container {
    padding: 4rem 0;
  }

  .frames {
    gap: 2.5rem;
  }

  .frame {
    gap: 3rem;
  }

  .frame.reverse {
    gap: 3.5rem;
  }

  .text-content h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  }

  .text-content p {
    font-size: 1rem;
  }
}

/* Max-width 980px: Further adjustments for smaller laptops/tablets */
@media (max-width: 980px) {
  .control-section {
    padding: 1.5rem 1.5rem;
    padding-bottom: 3rem;
  }
  .section-header {
    margin-bottom: 3rem;
  }
  .section-header h1 {
    font-size: 2.2rem;
  }
  .section-header p {
    max-width: 550px;
    font-size: 0.95rem;
  }
  .card-icon {
    width: 60px;
    height: 60px;
  }
  .card-icon i {
    font-size: 1.6rem;
  }
  .card h3 {
    font-size: 1.4rem;
  }
  .card p {
    font-size: 0.95rem;
  }
}

@media (max-width: 850px) {
  .frame {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }

  .frame.reverse {
    gap: 2rem;
  }

  .frame.reverse > .text-content {
    order: 0;
  }

  .image-wrapper img {
    width: 70%;
    max-width: 400px;
  }

  .text-content {
    text-align: center !important;
  }

  .random-img-1,
  .random-img-2 {
    display: none;
  }
  .single-line {
    display: none;
  }
}

@media (max-width: 768px) {
  .cards-container {
    flex-wrap: wrap; /* Allow wrapping for <=768px */
    gap: 1.5rem;
  }
  .card {
    max-width: 100%; /* Full width for stacking */
    flex: 1 1 100%;
  }

  .devices-container {
    gap: 1rem;
  }
  .section-header h1 {
    font-size: 2rem;
  }
  .section-header p {
    max-width: 100%;
    font-size: 0.9rem;
  }
  .control-section {
    padding: 1rem 1rem;
    padding-bottom: 2.5rem;
  }

  .content {
    margin-bottom: 1rem;
  }

  .devices-container {
    padding: 3rem 0;
    padding-top: 100px;
  }

  .content {
    margin-bottom: 3rem;
  }

  .content h1 {
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  }

  .frames {
    gap: 2rem;
  }

  .frame {
    border-radius: 16px;
    padding: 1.25rem;
  }

  .image-wrapper img {
    width: 80%;
  }

  .text-content h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin-bottom: 0.75rem;
  }

  .text-content p {
    font-size: 0.95rem;
    line-height: 1.7;
  }
  /* Cards will wrap automatically due to flex-wrap */
}

@media (max-width: 480px) {
  .card {
    padding: 1.5rem 1rem;
  }
  .card-icon {
    width: 50px;
    height: 50px;
  }
  .card-icon i {
    font-size: 1.4rem;
  }
  .card h3 {
    font-size: 1.3rem;
  }
  .card p {
    font-size: 0.9rem;
  }
  .cards-container {
    gap: 1rem;
  }

  .devices-container {
    padding: 2.5rem 0;
    padding-top: 80px;
  }

  .content {
    margin-bottom: 2.5rem;
    padding: 0 0.75rem;
  }

  .content h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
  }

  .content p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.6;
  }

  .frames {
    gap: 1.5rem;
    padding: 0 0.75rem;
  }

  .frame {
    gap: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
  }

  .image-wrapper img {
    width: 90%;
  }

  .text-content h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  }

  .text-content p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .view-details h1 {
    font-size: 2.5rem;
  }

  .container h1 {
    font-size: 2.5rem;
  }

  .container h2 {
    font-size: 1.2rem;
  }
}

/* Max-width 360px: Very small mobiles (e.g., older phones) – Minimal layout */
@media (max-width: 360px) {
  .control-section {
    padding: 0.5rem 0.5rem;
    padding-bottom: 2rem;
  }
  .section-header h1 {
    font-size: 1.6rem;
  }
  .section-header p {
    font-size: 0.8rem;
  }
  .card {
    padding: 1rem 0.75rem;
  }
  .card-icon {
    width: 45px;
    height: 45px;
  }
  .card-icon i {
    font-size: 1.2rem;
  }
  .card h3 {
    font-size: 1.2rem;
  }
  .card p {
    font-size: 0.85rem;
  }

  .devices-container {
    padding: 2rem 0;
    padding-top: 80px;
  }

  .content {
    margin-bottom: 2rem;
    padding: 0 0.5rem;
  }

  .content h1 {
    font-size: 1.4rem;
  }

  .content p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .frames {
    gap: 1.25rem;
    padding: 0 0.5rem;
  }

  .frame {
    gap: 1.25rem;
    padding: 0.75rem;
    border-radius: 10px;
  }

  .image-wrapper img {
    width: 100%;
  }

  .text-content h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  .text-content p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .spec-btn {
    font-size: 0.85rem;
    padding: 0.35em 1em;
  }
}
