/* ==========================================================================
   Dentsu Jobs – Complete Production Stylesheet
   Version: Production-ready for apply.html, index.html, contact.html, jobs.html
   Last updated: January 2026 (enhanced for global org)
   ========================================================================== */

:root {
  --color-primary: #176B87;
  --color-accent: #64CCC5;
  --color-light: #e8f4fb;
  --color-bg: #ffffff;
  --color-error: #d9534f;
  --radius: 12px;
  --shadow-sm: 0 2px 12px rgba(23, 107, 135, 0.07);
  --shadow-md: 0 6px 24px rgba(23, 107, 135, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: var(--color-bg);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
.header {
  background: white;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
}

.logo {
  height: 48px;
  width: auto;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2.2rem;
}

.nav-list a {
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 500;
  transition: all 0.25s ease;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--color-accent);
  font-weight: 600;
}

/* Hero Section */
.hero {
  background-size: cover;
  background-position: center;
  min-height: 70vh;
  display: flex;
  align-items: center;
  color: #111;
}

.hero-content {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  padding: 3.5rem 2.5rem;
  border-radius: 18px;
  max-width: 720px;
  text-align: center;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  margin-bottom: 0.6rem;
}

.subtitle {
  font-size: 1.35rem;
  margin-bottom: 2rem;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  padding: 1rem 2.2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary:hover {
  background: #124f66;
  transform: translateY(-2px);
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  background: white;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 1rem 2.2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
}

.btn-large {
  padding: 1.25rem 2.8rem;
  font-size: 1.25rem;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.about-section {
  background: var(--color-light);
}

.team-images {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin: 1.5rem 0 2.5rem;
}

.team-img {
  width: 250px;
  max-width: 45%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
  aspect-ratio: 4/3;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem 1.8rem;
  text-align: left;
}

.card h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.2rem;
}

.gallery-grid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}

/* Purpose / CTA */
.purpose-section {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: white;
  text-align: center;
}

.purpose-list {
  list-style: none;
  max-width: 780px;
  margin: 1.5rem auto 0;
  font-size: 1.15rem;
}

.purpose-list li {
  margin-bottom: 1rem;
}

.cta-section {
  text-align: center;
}

.cta-text {
  font-size: 1.2rem;
  max-width: 720px;
  margin: 0 auto 2rem;
}

/* Footer */
.footer {
  background: #f8f9fa;
  padding: 2.5rem 0;
  color: #555;
  font-size: 0.95rem;
  text-align: center;
}

.footer a {
  color: #555;
  text-decoration: underline;
}

/* Form-Specific Styles (for apply.html) */
.application-form {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 960px;
  margin: 3rem auto;
}

.form-section {
  margin-bottom: 2.5rem;
}

.form-section h3 {
  color: var(--color-primary);
  border-bottom: 3px solid var(--color-accent);
  padding-bottom: 0.6rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.25s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(100, 204, 197, 0.2);
}

.form-group.invalid input,
.form-group.invalid select,
.form-group.invalid textarea {
  border-color: var(--color-error);
}

.form-group .error-message {
  color: var(--color-error);
  font-size: 0.85rem;
  margin-top: 0.3rem;
  display: none;
}

.form-group.invalid .error-message {
  display: block;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.form-actions {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

#form-feedback {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  display: none;
}

#form-feedback.success {
  background: #dff0d8;
  color: #3c763d;
  display: block;
}

#form-feedback.error {
  background: #f2dede;
  color: #a94442;
  display: block;
}

/* Job List Specific (for jobs.html) */
.job-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.job-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.2rem;
  text-align: left;
}

.requirements {
  list-style: disc;
  margin-left: 1.5rem;
  font-size: 0.95rem;
}

/* ======================================
   Print Styles – For Downloadable Form
   ====================================== */
@media print {
  header,
  footer,
  .form-actions,
  .nav-bar,
  .jobs-listings > .container > *:not(.application-form),
  #form-feedback,
  script,
  .error-message {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
    font-family: Arial, Helvetica, sans-serif;
  }

  .application-form {
    box-shadow: none !important;
    margin: 0 !important;
    padding: 1cm !important;
    max-width: none !important;
    background: white !important;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    border: none !important;
    border-bottom: 2px dotted black !important;
    background: transparent !important;
    color: black !important;
    padding: 0 !important;
    margin: 0.2em 0 !important;
    width: 100% !important;
    font-size: 1em !important;
    -webkit-appearance: none !important;
  }

  input[type="date"]::-webkit-calendar-picker-indicator,
  input[type="file"] {
    display: none !important;
  }

  select {
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  .form-group label {
    font-weight: bold !important;
  }

  .form-group label::after {
    content: "  ______________________________________________";
    color: black;
    font-weight: normal;
  }

  .application-form::before {
    content: "Dentsu Jobs Application Form — Please complete clearly using black or blue ink. Digital filling is also supported in PDF readers.";
    display: block !important;
    font-style: italic;
    font-size: 0.9em;
    color: #333;
    margin-bottom: 1.5em;
    text-align: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.8em;
  }

  .form-section {
    page-break-inside: avoid;
  }

  h2, h3 {
    color: black !important;
    break-after: avoid;
  }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .form-row {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-bar {
    flex-direction: column;
    gap: 1.2rem;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .hero-content {
    padding: 2.5rem 1.5rem;
  }

  .team-img {
    max-width: 100%;
  }

  .application-form {
    padding: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .btn-primary, .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .form-actions {
    flex-direction: column;
  }
}