/* Body */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: url("https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExdmZjNWY3NzdyZHYxMTg2MDQ5cHJrOTZ0aGw1ZG83cG5lYno4d2UxNCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/ITRemFlr5tS39AzQUL/giphy.gif")
    no-repeat center center / cover;
  font-family: Arial, sans-serif;
}

/* Container */
.container1 {
  text-align: center;
  background: url("images/index-bg.jpg") no-repeat center center / cover;
  padding: 3rem;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  max-width: 800px;
  width: 90%;
  z-index: 1;
}

/* Headings */
.h1-tag {
  font-size: clamp(2rem, 5vw, 3.5rem);
  white-space: nowrap;
  overflow: hidden;
  color: #8ac642;
  letter-spacing: -2px;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.h2-tag {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: #067905;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Paragraphs */
.p-tag {
  color: #1b776f;
  padding: 1rem 0;
  font-size: clamp(1.2rem, 4vw, 3.5rem);
  line-height: 1.5;
}

.p-tag1 {
  color: #000;
  padding: 1rem 0;
  font-size: clamp(1rem, 3vw, 1.5rem);
  line-height: 1.5;
}

/* Typewriter effect */
.typewriter {
  overflow: hidden;
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.15em;
  animation: typing 5.5s steps(40, end) infinite,
             blink-caret 0.9s step-end infinite;
  width: 0;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: currentColor; }
}

/* Animated Button */
.animated-button4 {
  position: relative;
  background: linear-gradient(-30deg, #243d0b 50%, #1a2b08 50%);
  padding: 1rem 2rem;
  margin: 0.5rem;
  display: inline-block;
  overflow: hidden;
  color: #e6f7d4;
  font-size: clamp(0.9rem, 2.5vw, 1.25rem);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
}

.animated-button4::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: #99ad85;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.animated-button4:hover::before {
  opacity: 0.2;
}

.animated-button4 span {
  position: absolute;
}

/* Top border animation */
.animated-button4 span:nth-child(1) {
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to left, transparent, #80d926);
  animation: animateTop 2s linear infinite;
}

@keyframes animateTop {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

/* Right border animation */
.animated-button4 span:nth-child(2) {
  top: 0;
  right: 0;
  height: 100%;
  width: 2px;
  background: linear-gradient(to top, transparent, #80d926);
  animation: animateRight 2s linear -1s infinite;
}

@keyframes animateRight {
  from { transform: translateY(100%); }
  to { transform: translateY(-100%); }
}

/* Bottom border animation */
.animated-button4 span:nth-child(3) {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, transparent, #80d926);
  animation: animateBottom 2s linear infinite;
}

@keyframes animateBottom {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* Left border animation */
.animated-button4 span:nth-child(4) {
  top: 0;
  left: 0;
  height: 100%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, #80d926);
  animation: animateLeft 2s linear -1s infinite;
}

@keyframes animateLeft {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #fff;
  z-index: 9999;
  padding: 1rem;
  text-align: center;
}

.overlay button {
  background: #ff6600;
  border: none;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
}

.step {
  display: none;
}
.step.active {
  display: block;
}

/* ✅ Responsive tweaks */
@media (max-width: 768px) {
  .container1 {
    padding: 2rem;
  }
  .h1-tag { font-size: 2rem; }
  .h2-tag { font-size: 1.5rem; }
  .p-tag { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .container1 {
    padding: 1.5rem;
    border-radius: 15px;
  }
  .h1-tag { font-size: 1.5rem; letter-spacing: -1px; }
  .h2-tag { font-size: 1.2rem; }
  .p-tag { font-size: 1rem; }
  .animated-button4 {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* Voice Button Overlay */
.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #fff;
  z-index: 9999;
}
.overlay button {
  background: #ff6600;
  border: none;
  padding: 15px 30px;
  font-size: 1.2em;
  font-weight: bold;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
}
.step {
  display: none;
}
.step.active {
  display: block;
}

/* div inside div */
.parent {
  display: flex;
  width: 100%;
  height: 300px; /* adjust as needed */
  border: 2px solid #ccc;
}

.left, .right {
  flex: 1;              /* take equal space */
  display: flex;
  align-items: center;  /* vertical center */
  justify-content: center; /* horizontal center */
  font-size: 1.5rem;
}

.left {
  background-color: #f4f4f4;
}

.right {
  background-color: #d9f7d9;
}

/* Responsive: stack vertically on small screens */
@media (max-width: 768px) {
  .parent {
    flex-direction: column;
    height: auto;
  }
}