/* ============================================================
   Contact Page
   Srinand Thiyagarajan Portfolio
   ============================================================ */

:root {
  --navy: #2F3B54;
  --cream: #FFF8F0;
  --orange: #F6A04A;
  --orange-dark: #d87927;
  --white: #ffffff;
  --line: #526078;
  --success: #238b45;
  --danger: #c83a22;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: "DM Sans", Arial, sans-serif;
  overflow-x: hidden;
}

/* ============================================================
   SECTION 1 - HEADER
   ============================================================ */

.site-header {
    min-height: 195px;
    background-color: var(--navy);
    background-image: url("../images/Banner2.png");
    background-repeat: no-repeat;
    background-position: left top;
    background-size: auto 90%;
    color: var(--white);
    overflow: visible;
    z-index: 10;
}

.header-inner {
  min-height: 200px;
  position: relative;
  padding: 0 13.5%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-area {
  position: relative;
  min-height: 80px;
}

.site-title {
  position: absolute;
  top: 27px;
  left: 25%;
  right: 15%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--orange);
  font-family: "Comfortaa", cursive;
  transition: transform 0.3s ease;
}

.site-title:hover {
  color: #ffb768;
  transform: translateY(-2px);
}

.site-title span {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 3.2vw, 3.45rem);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.site-title small {
  margin-top: 6px;
  margin-left: 43%;
  font-size: clamp(0.9rem, 1.3vw, 1.25rem);
  font-style: italic;
  font-weight: 700;
}

.biodata-btn {
  position: absolute;
  top: 72px;
  right: -25px; /* Aligned slightly more to the right */
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 22px;
  border: 2px solid #b8c1ce;
  border-radius: 999px;
  background: linear-gradient(#43546c, #1e2a42);
  color: var(--white);
  text-decoration: none;
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,.55),
    0 2px 4px rgba(0,0,0,.35);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.biodata-btn:hover {
  color: #fff;
  transform: translateY(-3px);
  background: linear-gradient(#526783, #253551);
  box-shadow: 0 6px 12px rgba(0,0,0,.3);
}

.main-nav {
  min-height: 90px;
  display: flex;
  align-items: flex-end;
}

.navbar-toggler {
  border: 1px solid rgba(255,255,255,.65);
  padding: 7px 10px;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 .2rem rgba(246,160,74,.25);
}

.navbar-toggler-icon {
  filter: invert(1);
}

.nav-list {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-link {
    position: relative;
    color: #f6f7fa !important;
    font-size: 20px;
    font-weight: 100;
    padding: 12px 12px !important;
    transition: color .25s ease, transform .25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 3px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--orange) !important;
  transform: translateY(-2px);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Dropdown Menu Styles */
.nav-item.dropdown .dropdown-toggle::after {
  display: none;
}

.nav-item.dropdown .bi-chevron-down {
  font-size: 0.7rem;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.nav-item.dropdown.show .bi-chevron-down {
  transform: rotate(180deg);
}

.dropdown-menu {
  background-color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.dropdown-item {
  color: #f6f7fa;
  font-size: 17px;
  padding: 8px 20px;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(246, 160, 74, 0.15);
  color: var(--orange);
}

/* ============================================================
   SECTION 2 - CONTACT FORM (Reduced Spacing & Resized Background)
   ============================================================ */

.contact-section {
    position: relative;
    min-height: 550px;
    background-color: var(--cream);
    background-image: url("../images/emailback.png");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: auto 85%;
    overflow: hidden;
}

.contact-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.contact-container {
  position: relative;
  z-index: 1;
  min-height: 550px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.contact-form-wrap {
  max-width: 1190px;
  margin: 0 auto;
}

.form-field {
  position: relative;
  margin-bottom: 12px; /* Reduced vertical line space between fields */
}

.form-field label {
  display: block;
  margin-bottom: 4px; /* Reduced space between label and input */
  color: var(--navy);
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  font-weight: 500;
}

.required {
  color: #d83d1f;
  font-size: 1.25em;
  font-weight: 700;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 1.02rem;
  padding: 4px 2px 6px;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.form-field textarea {
  min-height: 58px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom: 2px solid var(--orange-dark);
  box-shadow: 0 3px 0 -2px rgba(246,160,74,.28);
}

.form-field input.is-invalid {
  border-bottom: 2px solid var(--danger);
}

.form-field input.is-valid {
  border-bottom: 2px solid var(--success);
}

.invalid-feedback {
  margin-top: 2px;
  font-size: .85rem;
  color: var(--danger);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.submit-btn {
  min-width: 145px;
  border: 3px solid #315cc7;
  border-radius: 28px;
  padding: 6px 20px;
  background: linear-gradient(180deg, #4e8cff 0%, #2453c4 55%, #1f4aae 100%);
  color: white;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,.45),
    inset 0 -3px 4px rgba(0,0,0,.18),
    0 4px 7px rgba(0,0,0,.18);
  transition: transform .2s ease, box-shadow .2s ease;
}

.submit-btn i {
  margin-left: 6px;
  font-size: .9em;
}

.submit-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,.5),
    0 8px 15px rgba(36,83,196,.35);
}

.submit-btn:active {
  transform: translateY(1px) scale(.99);
}

.form-status {
  min-height: 24px;
  margin-top: 8px;
  text-align: right;
  font-size: .95rem;
  font-weight: 600;
}

.form-status.success {
  color: var(--success);
}

.form-status.error {
  color: var(--danger);
}

/* ============================================================
   SECTION 3 - FOOTER
   ============================================================ */

.site-footer {
  background: var(--navy);
  color: white;
}

.footer-main {
  min-height: 170px;
  padding: 24px 5.5% 20px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-contact h2,
.footer-social h2 {
  margin: 0 0 5px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.5rem, 2.1vw, 2rem);
  font-weight: 700;
}

.footer-contact p {
  margin: 0;
  font-size: clamp(.9rem, 1.1vw, 1.12rem);
  line-height: 1.42;
}

.footer-contact p i {
  width: 20px;
  display: inline-block;
  color: white;
}

.footer-social {
  min-width: 310px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.social-links a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 2px solid #dfe5ee;
  background: white;
  color: #1e2a42;
  text-decoration: none;
  font-size: 1.35rem;
  transition: transform .2s ease, color .2s ease, background .2s ease;
}

.social-links a:hover {
  color: var(--orange);
  background: #f4f6f9;
  transform: translateY(-4px) rotate(-2deg);
}

.footer-bottom {
  border-top: 1px solid var(--orange);
  padding: 7px 5.5%;
  font-size: 1rem;
}

.footer-bottom a {
  color: white;
  text-decoration: none;
  transition: color .2s ease;
}

.footer-bottom a:hover {
  color: var(--orange);
}

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

@media (max-width: 991.98px) {
  .site-header {
    min-height: 320px;
    background-size: auto 100%;
  }

  .header-inner {
    min-height: 320px;
    padding: 0 24px;
  }

  .brand-area {
    min-height: 205px;
  }

  .site-title {
    left: 27%;
    right: 8%;
  }

  .site-title span {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
  }

  .biodata-btn {
    top: 65px;
    right: 0;
  }

  .main-nav {
    min-height: 105px;
    align-items: flex-end;
    padding-bottom: 8px;
  }

  .navbar-collapse {
    background: rgba(40,52,79,.97);
    border-radius: 10px;
    margin-bottom: 6px;
    padding: 8px 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,.22);
  }

  .nav-list {
    align-items: stretch;
  }

  .nav-link {
    text-align: center;
    padding: 9px 12px !important;
  }

  .contact-section,
  .contact-container {
    min-height: 520px;
  }

  .footer-main {
    padding-left: 4%;
    padding-right: 4%;
  }
}

@media (max-width: 767.98px) {
  .site-header {
    min-height: 390px;
    background-size: auto 100%;
    background-position: left center;
  }

  .header-inner {
    min-height: 390px;
    padding: 0 16px;
  }

  .brand-area {
    min-height: 235px;
  }

  .site-title {
    top: 28px;
    left: 32%;
    right: 2%;
  }

  .site-title span {
    font-size: clamp(1.35rem, 6vw, 2.1rem);
    text-align: center;
  }

  .site-title small {
    margin-left: 20%;
    font-size: .9rem;
  }

  .biodata-btn {
    top: 105px;
    right: 3px;
    padding: 6px 14px;
    font-size: .9rem;
  }

  .main-nav {
    min-height: 145px;
  }

  .contact-section {
    min-height: 550px;
    background-size: auto 100%;
    background-position: right top;
  }

  .contact-overlay {
    background: rgba(255, 248, 240, 0.87);
  }

  .contact-container {
    min-height: 550px;
    padding: 20px 20px 25px;
  }

  .form-field {
    margin-bottom: 12px;
  }

  .form-field label {
    margin-bottom: 4px;
  }

  .form-actions {
    justify-content: center;
    padding-top: 5px;
  }

  .form-status {
    text-align: center;
  }

  .footer-main {
    flex-direction: column;
    padding: 25px 24px;
    gap: 25px;
  }

  .footer-social {
    min-width: 0;
  }

  .footer-bottom {
    padding: 10px 18px;
  }
}

@media (max-width: 420px) {
  .site-header {
    min-height: 410px;
  }

  .header-inner {
    min-height: 410px;
  }

  .site-title {
    left: 37%;
    top: 25px;
  }

  .site-title span {
    font-size: 1.25rem;
  }

  .biodata-btn {
    top: 102px;
  }

  .contact-section,
  .contact-container {
    min-height: 580px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}