/* contact.css - enhanced, responsive & accessible styles */

/* Base tokens */


/* Section wrapper */
.contact-section {
  padding: 48px 18px;
  background: var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Container */
.contact-container {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 6px;
}

/* LEFT INFO CARDS */
.contact-info {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* info card */
.info-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 26px 20px;
  box-shadow: var(--soft-shadow);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.03);
}
.info-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

/* small icon circle */
.info-card .icon {
  display:inline-grid;
  place-items:center;
  width:56px;
  height:56px;
  margin:0 auto 12px;
  border-radius:50%;
  background:linear-gradient(180deg, rgba(0,168,45,0.12), rgba(0,168,45,0.06));
  color:var(--accent);
  font-size:26px;
  transition:transform var(--transition);
}
.info-card:hover .icon{ transform: translateY(-4px); }

.info-card h3 {
  font-weight:700;
  margin:4px 0 8px;
  font-size:18px;
  color: #0f1720;
}
.info-card p {
  color: var(--muted);
  font-size:14px;
  line-height:1.6;
  margin:0;
}

/* RIGHT FORM AREA */
.contact-form {
  flex: 2;
  min-width: 360px;
  background-size: cover;
  background-position: center;
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

/* Background overlay to ensure readable form */
.contact-form::before{
  content:"";
  position:absolute;inset:0;
  background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.85));
  z-index:0;
}

/* form container */
.contact-form form {
  position:relative;
  z-index:2;
  width:100%;
  background: var(--glass);
  padding: 22px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

/* Form groups */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: #0f1720;
  font-size:14px;
}
.form-group label span {
  color: #e11d48; /* red for required */
  margin-left:4px;
}

/* name fields: side-by-side */
.name-fields {
  display: flex;
  gap: 10px;
}
.name-fields input {
  flex: 1;
}

/* Inputs & textarea */
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(15,23,36,0.12);
  font-size: 15px;
  color: #0f1720;
  background: #fff;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
input::placeholder, textarea::placeholder { color: #9aa3ad; }

/* focus styles - accessible */
input:focus, textarea:focus {
  border-color: rgba(0,168,45,0.9);
  box-shadow: 0 6px 18px rgba(0,168,45,0.08);
  transform: translateY(-1px);
}

/* subtle invalid style (you can add JS to toggle .invalid) */
input.invalid, textarea.invalid {
  border-color: #ff6b6b;
  box-shadow: 0 4px 14px rgba(255,107,107,0.08);
}

/* textarea */
textarea {
  min-height: 140px;
  resize: vertical;
}

/* Submit button */
/* ------------------------------
   Yellow gradient button (scoped)
   Does NOT change global variables
   ------------------------------ */

/* Keep your global :root untouched — do NOT include --accent or --accent-dark here. */

.btn-submit {
  /* local button-only variables (scoped) */
  --btn-accent: #ffd600;       /* bright yellow */
  --btn-accent-dark: #ffb800;  /* darker yellow */
  --btn-transition: 0.3s ease;

  display: inline-block;
  background: linear-gradient(90deg, var(--btn-accent), var(--btn-accent-dark));
  color: #000;                 /* black text for contrast */
  border: none;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform var(--btn-transition),
              box-shadow var(--btn-transition),
              opacity var(--btn-transition);
  width: 100%;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.28);
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hover / focus (keyboard accessible) */
.btn-submit:hover,
.btn-submit:focus {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(255, 200, 0, 0.36);
  opacity: 0.98;
  outline: none;
}

/* Active / pressed */
.btn-submit:active {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(255, 200, 0, 0.33);
}

/* Disabled state */
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Safety: if a .btn-submit exists inside your nav and you DON'T want it to be full-width,
   this rule prevents it from stretching the navbar */
nav .btn-submit {
  width: auto;
  padding: 8px 14px;
  font-size: 0.95rem;
  border-radius: 6px;
}


/* small helper text */
.small-muted { color: var(--muted); font-size:13px; }

/* Responsive behavior */
@media (max-width:1100px){
  .contact-container { gap:20px; }
  .contact-form { min-width: 320px; }
  .contact-info { min-width: 260px; }
}

@media (max-width:900px){
  .contact-section { padding: 28px 12px; }
  .contact-container {
    flex-direction: column-reverse; /* show form first on mobile */
    align-items: stretch;
  }
  .contact-form {
    order: 1;
    min-width: auto;
    padding: 20px 12px;
  }
  .contact-info {
    order: 2;
    gap:12px;
  }
  .info-card { padding:18px; }
  .name-fields { flex-direction: column; }
}

@media (max-width:520px){
  .contact-section { padding:20px 10px; }
  .info-card .icon { width:48px; height:48px; font-size:22px; }
  .info-card h3 { font-size:16px; }
  input, textarea { font-size:14px; padding:10px; }
  .btn-submit { padding:11px; font-size:15px; }
}

/* accessibility: focus-visible outline */
:focus { outline: none; }
:focus-visible { box-shadow: 0 0 0 4px rgba(0,168,45,0.14); border-radius:8px; }

/* small utility */
.text-center { text-align:center; }
