/* Reset the default style */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Root Variables */
:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --accent-color: #8b5cf6;
  --text-color: #f8fafc;
  --border-color: #83838340;
  --focus-shadow: #4facfe;
  --bg-light: #ffffff;
  --bg-dark: #0a0f24;
  --transition: 0.3s;
}

::selection{
    color: var(--primary-color);
    background-color: var(--bg-dark);
}

/* Global Styles */
body {
  font-family: "Roboto Serif", serif;
  font-size: 1rem;
  background-color: var(--bg-dark);
  color: var(--text-color);
  padding: 40px 20px;
}

/* Contact Container */
.contact {
  max-width: 1000px;
  margin: auto;
  padding: 30px;
  background-color: #1a1a2e;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Heading */
.contact h1 {
  text-align: center;
  text-transform: uppercase;
  font-size: 32px;
  letter-spacing: 2px;
  padding-bottom: 16px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-hover), var(--accent-color));
  background-clip: text; /*Specify how far the background should extend within an element:*/
  color: transparent;
  position: relative;
  animation: glowPulse 1.5s infinite alternate ease-in-out; /*same animation*/
}

.contact h1::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
}

.contact h1::after {
  content: "";
  position: absolute;
  background: var(--text-color);
  width: 12px;
  height: 12px;
  bottom: -6px;
  left: 50%;
  border-radius: 50%;
  border: 3px solid var(--primary-color);
  transform: translateX(-50%);
}

/* Animation */
@keyframes glowPulse {
  from {
    filter: brightness(0.9);
    text-shadow: 0 0 8px var(--focus-shadow);
  }
  to {
    filter: brightness(2.0);
    text-shadow: 0 0 18px var(--accent-color);
  }
}

/* Back Link */
.back-link {
  display: inline-block;
  text-decoration: none;
  font-weight: bold;
  margin-bottom: 18px;
  min-width: 90px;
  width: 120px;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  padding: 10px 20px;
  color: var(--text-color);
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);

}

.back-link:hover,
.back-link:focus {
  color: #0f172a;
  background: linear-gradient(135deg, var(--accent-color), var(--primary-hover));
  border-color: var(--accent-color);
  box-shadow: 0 4px 16px var(--focus-shadow);
  transform: translateY(-4px) scale(1.04);
  outline: none;
}
/* Form Layout */
.contact form {
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: stretch;
  flex-wrap: wrap;
  min-height: 100%;
}

/* Image Section */
.form-image {
  flex-grow: 2; /*Flex-grow:2 , flex:shrink:2 , flex-basis:0*/
  height: 550px;
  margin-top: 20px;
  max-width: 350px;
  display: flex;
  align-items: stretch;
}

.form-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(45, 157, 255, 0.2);
}

/* Form Fields Section */
.form-fields {
  flex: 2; /*Flex-grow:2 , flex:shrink:2 , flex-basis:0*/
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 250px;
}

/* Input Containers */
.contact .inp {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact .inp label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
}

.contact .inp input,
.contact .inp select,
.contact .inp textarea {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 16px;
  background: var(--bg-dark);
  color: var(--text-color);
  outline: none;

}

.contact .inp input::placeholder,
.contact .inp textarea::placeholder{
    color: white;
}

.contact .inp input:focus,
.contact .inp select:focus,
.contact .inp textarea:focus {
  border-color: var(--primary-color);
}

/* Submit Button */
.submit-btn {
    background: transparent;
    color: white;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    z-index: 1;
}

.submit-btn::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    z-index: -1;
    transition: height 0.4s ease;
    border-radius: 8px;
}

.submit-btn:hover {
    color: var(--bg-dark);
    border-color: transparent;
    box-shadow: 0 0 8px var(--primary-color), 0 0 16px var(--accent-color);
}

.submit-btn:hover::after {
    height: 100%;
}


.submit-btn i {
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.submit-btn:hover i {
  transform: translateX(4px);
}




/* ========== RESPONSIVE STYLES ========== */

@media (max-width: 1024px) {
  .contact {
    padding: 24px;
    gap: 24px;
  }

  .contact h1 {
    font-size: 28px;
  }

  .form-image {
    height: 450px;
    max-width: 300px;
  }

  .form-fields {
    gap: 16px;
  }

  .submit-btn {
    font-size: 15px;
    padding: 12px 20px;
  }
}


@media (max-width: 768px) {
  .contact {
    flex-direction: column;
    padding: 20px;
  }

  .contact form {
    flex-direction: column;
  }

  .form-image {
    max-width: 100%;
    height: 300px;
  }

  .form-fields {
    width: 100%;
  }

  .submit-btn {
    width: 100%;
    text-align: center;
  }

  .back-link {
    width: 100%;
    text-align: center;
  }

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


@media (max-width: 480px) {
  body {
    padding: 20px 12px;
  }

  .contact {
    padding: 16px;
    gap: 20px;
  }

  .contact h1 {
    font-size: 20px;
    letter-spacing: 1px;
  }

  .form-image {
    height: 200px;
  }

  .contact .inp label {
    font-size: 13px;
  }

  .contact .inp input,
  .contact .inp textarea,
  .contact .inp select {
    font-size: 15px;
    padding: 10px;
  }

  .submit-btn {
    font-size: 14px;
    padding: 10px 16px;
  }

  .back-link {
    font-size: 14px;
    padding: 8px 14px;
  }
}

/* Contact Info Section */
.contact-info {
  margin: 40px auto 0;
  max-width: 600px;
  padding: 30px 24px;
  text-align: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  box-shadow: 0 0 20px rgba(0, 153, 255, 0.15);
  animation: fadeInUp 1s ease-in-out;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.contact-info:hover {
  transform: scale(1.02);
  box-shadow: 0 0 30px var(--accent-color);
}

.contact-info h2 {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: glowText 2s infinite alternate;
}

.contact-info ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-info li {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  transition: transform 0.3s ease;
}

.contact-info li:hover {
  transform: translateX(6px);
}

.contact-info i {
  font-size: 20px;
  color: var(--accent-color);
  transition: color 0.3s ease, transform 0.3s ease;
}

.contact-info a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: var(--primary-color);
  text-shadow: 0 0 6px var(--primary-color);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowText {
  from {
    text-shadow: 0 0 4px var(--accent-color);
  }
  to {
    text-shadow: 0 0 12px var(--primary-color);
  }
}
