/* ===== PHILCENTER MOBILE + HEADER FIXES ===== */

/* PHILCENTER HEADER COLORS */
header {
  position: relative;
  background:
    linear-gradient(
      rgba(31, 81, 51, 0.82),
      rgba(18, 52, 33, 0.90)
    ),
    url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?ixlib=rb-4.0.3&auto=format&fit=crop&w=1470&q=80')
    center/cover no-repeat;
  color: #ffffff;
  text-align: center;
  padding: 120px 20px 140px;
}

/* DESKTOP TEXT BOX */
.text-box {
  background: rgba(15, 58, 36, 0.82) !important;
  border: 1px solid rgba(204, 238, 222, 0.35) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28) !important;
  padding: 26px 32px !important;
  border-radius: 16px !important;
  display: inline-block !important;
  max-width: 960px !important;
  margin: 0 auto !important;
  backdrop-filter: blur(3px) !important;
  box-sizing: border-box !important;
}

/* MOBILE FIXES */
@media (max-width: 768px) {

  html,
  body {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }

  body {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }

  /* STOP BAD MOBILE WORD BREAKING */
  h1,
  h2,
  h3,
  p,
  a,
  span,
  div {
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
  }

  /* HEADER */
  header {
    padding: 70px 4px 80px !important;
    text-align: center !important;
  }

  header img {
    width: 100px !important;
    margin-bottom: 16px !important;
  }

  /* MOBILE TEXT BOX: WIDER + PHILCENTER GREEN */
  .text-box {
    display: block !important;

    width: 98vw !important;
    max-width: 98vw !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding: 22px 16px !important;

    border-radius: 14px !important;
    box-sizing: border-box !important;

    background: rgba(15, 58, 36, 0.88) !important;
    border: 1px solid rgba(204, 238, 222, 0.42) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,0.30) !important;

    overflow: visible !important;
  }

  /* TITLE: SLIGHTLY SMALLER SO MANAGEMENT FITS */
  header h1,
  .text-box h1 {
    font-size: 1.26rem !important;
    line-height: 1.24 !important;
    letter-spacing: -0.35px !important;

    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 0 auto 14px auto !important;
    padding: 0 10px !important;

    text-align: center !important;
    box-sizing: border-box !important;
  }

  header p,
  .text-box p {
    font-size: 0.98rem !important;
    line-height: 1.55 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 6px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .cta-button {
    width: 100% !important;
    max-width: 300px !important;
    text-align: center !important;
    padding: 14px 20px !important;
    margin-top: 24px !important;
    display: inline-block !important;
  }

  nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  nav a {
    font-size: 0.92rem !important;
  }

  section {
    padding: 45px 16px !important;
  }

  section h2 {
    font-size: 1.6rem !important;
    line-height: 1.3 !important;
    margin-bottom: 24px !important;
    text-align: center !important;
  }

  .grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .card {
    padding: 20px !important;
    border-radius: 14px !important;
    width: 100% !important;
  }

  .card h3 {
    font-size: 1.15rem !important;
  }

  #apply ol {
    padding-left: 20px !important;
    margin-left: 0 !important;
  }

  #apply li {
    margin-bottom: 12px !important;
  }

  .tuition-box,
  .contact-box,
  .seo-box {
    padding: 20px !important;
    border-radius: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  a,
  a:visited,
  a:hover,
  a:active {
    color: inherit !important;
  }

  .contact-box a {
    color: #1f5133 !important;
    font-weight: 600 !important;
  }

  footer {
    padding: 30px 16px !important;
    text-align: center !important;
  }
}