/* AlertO Socorro — responsive MDRRMO landing page */
:root {
  --navy: #062d5b;
  --blue: #0878c9;
  --deep-blue: #03447f;
  --green: #087b35;
  --red: #c91420;
  --ink: #092b52;
  --surface: rgba(255, 255, 255, .88);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Open Sans", sans-serif;
  background-color: #b9e4ff;
  background-image: url("assets/background-vertical.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.page-shell {
  width: min(100% - 28px, 760px);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 34px) 0 26px;
}
.brand {
  text-align: center;
  color: #fff;
}
.seal-wrap { width: clamp(92px, 20vw, 142px); height: clamp(92px, 20vw, 142px); margin: 0 auto 12px; }
.seal { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; box-shadow: 0 4px 25px rgba(255,255,255,0.65);}
.seal-fallback {
  display: none; width: 100%; height: 100%; place-items: center;
  border: 4px solid #176b22; border-radius: 50%; background: #fff;
  color: #176b22; font-weight: 900; letter-spacing: .08em;
}
.eyebrow img { width: 250px; height: auto; }
.brand h1 {
  margin: 2px 0 0; font-size: clamp(2rem, 7vw, 3.7rem);
  line-height: 1; font-weight: 750; letter-spacing: -.045em;
  text-shadow: 0 2px 3px rgba(0,0,0,0.7);
}
.office-name { margin: 1px 0 0; font-weight: 700; font-size: clamp(1.2rem, 2.4vw, 2rem); letter-spacing: 0.5px; text-shadow: 0 2px 2px rgba(0,0,0,0.5);}
.location { font-size: clamp(.9rem, 2.1vw, 1.2rem); }
.location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 80%;
	margin: 10px auto 0;
}

.location::before,
.location::after {
    content: "";
    flex: 1;
    height: 2px;
    background: #176b32;
}

.location span {
    white-space: nowrap;
    font-weight: 600;
}

.hazard-strip {
	display: none;
  width: min(100%, 510px); margin: 20px auto 14px; padding: 8px 14px;
  border-radius: 18px;
}
.hazard-strip img { display: block; width: 100%; height: auto; }

.emergency-intro {
  margin: 28px 0 16px; padding: 12px 16px 13px;
  border: 2px solid #df2530; border-radius: 20px;
  background: var(--surface); box-shadow: 0 8px 22px rgba(0,48,99,.12);
  text-align: center;
}
.intro-heading { display: flex; align-items: center; justify-content: center; margin-bottom: -10px; }
.intro-heading img { width: 83px; height: 83px; object-fit: contain; margin-top: -40px;}
.intro-heading h2 { margin: 0; color: var(--navy); font-size: clamp(1.15rem, 4.3vw, 1.8rem); font-weight: 950; font-style: italic; }
.emergency-intro p { margin: 5px 0 0; font-size: 14px; font-weight: 650; }
.emergency-intro strong { color: #a71924; font-weight: 750; }

.emergency-options { display: grid; gap: 13px; }
.emergency-card {
  min-height: 112px; display: grid; grid-template-columns: 76px 1fr 36px;
  align-items: center; gap: 14px; padding: 16px 18px;
  color: #fff; text-decoration: none; border-radius: 22px;
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 7px 15px rgba(0,47,92,.22), inset 0 1px 0 rgba(255,255,255,.55);
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
  overflow: hidden;
}
.emergency-card:hover, .emergency-card:focus-visible {
  transform: translateY(-2px); filter: brightness(1.07);
  box-shadow: 0 10px 20px rgba(0,47,92,.28);
}
.fire { background: url('assets/fire_button_transparent.png') center / cover no-repeat; }
.medical { background: url('assets/medical_button_transparent.png') center / cover no-repeat; }
.maritime { background: url('assets/maritime_button_transparent.png') center / cover no-repeat; }
.card-symbol {
    width: 85px;
    height: 85px;
    object-fit: contain;
    display: block;
	border-right: 2px solid rgba(255,255,255,.75);
	padding-right: 20px;
}
.card-copy { display: grid; gap: 5px; min-width: 0; padding-left: 15px;}
.card-copy strong { font-size: clamp(1rem, 3.8vw, 1.48rem); line-height: 1.1; font-weight: 950; }
.card-copy small { font-size: clamp(.76rem, 2.6vw, .96rem); line-height: 1.35; font-weight: 550; }
.card-arrow {
  display: grid; place-items: center; width: 34px; height: 34px;
  color: var(--navy); background: #fff; border-radius: 50%;
  font-size: 3rem; line-height: 0; font-weight: 300; padding-bottom: 7px;
}

.hotlines {
  margin: 22px 0 0; padding: 16px 18px;
  border-radius: 18px; background: rgba(255,255,255,.88);
  box-shadow: 0 5px 18px rgba(0,48,99,.12);
}
.hotlines h2 { margin: 0 0 10px; text-align: center; font-size: 1.15rem; letter-spacing: .06em; }
.hotline-list { display: grid; gap: 8px; }
.hotline-list div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #d7e6f2; padding-bottom: 7px; }
.hotline-list div:last-child { border: 0; padding-bottom: 0; }
.hotline-list span { font-weight: 750; }
.hotline-list a { color: #075ba2; font-weight: 850; text-decoration: none; white-space: nowrap; }
.site-footer {
  display: grid; gap: 4px; margin: 18px auto 0; text-align: center;
  color: #fff; text-shadow: 0 1px 4px rgba(0,30,70,.8); font-size: .75rem;
}
.site-footer strong { letter-spacing: .12em; font-size: .9rem; }

/* Landscape phones: switch to the wide coastal artwork and a two-column layout. */
@media (orientation: landscape) and (max-height: 600px) {
  body {
    background-image: url("assets/background-horizontal.png");
    background-position: center;
    background-size: cover;
    background-attachment: scroll;
  }
  .page-shell { width: min(100% - 32px, 1100px); padding: 10px 0 14px; }
  .brand { display: grid; grid-template-columns: 72px 1fr; column-gap: 14px; align-items: center; text-align: left; }
  .seal-wrap { grid-row: span 4; width: 68px; height: 68px; margin: 0; }
  .eyebrow { font-size: .62rem; }
  .brand h1 { font-size: clamp(1.55rem, 4vw, 2.3rem); }
  .office-name, .location { margin-top: 2px; font-size: .72rem; }
  .hazard-strip { width: min(55%, 420px); margin: 8px auto; padding: 4px 10px; }
  .emergency-intro { margin: 8px 0 10px; padding: 7px 12px; }
  .intro-heading img { width: 30px; height: 30px; }
  .intro-heading h2 { font-size: 1.25rem; }
  .emergency-intro p { font-size: .76rem; margin-top: 2px; }
  .emergency-intro .urgent-note { display: none; }
  .emergency-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .emergency-card { min-height: 120px; grid-template-columns: 1fr 25px; gap: 6px; padding: 10px; border-radius: 15px; }
  .card-symbol { display: none; }
  .card-copy strong { font-size: clamp(.82rem, 2vw, 1.05rem); }
  .card-copy small { font-size: .72rem; }
  .card-arrow { width: 25px; height: 25px; font-size: 1.5rem; }
  .hotlines { margin-top: 10px; padding: 8px 12px; }
  .hotlines h2 { margin-bottom: 6px; font-size: .9rem; }
  .hotline-list { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .hotline-list div { display: grid; gap: 2px; padding: 0 5px; border-bottom: 0; border-right: 1px solid #d7e6f2; font-size: .72rem; }
  .hotline-list div:last-child { border-right: 0; }
  .site-footer { margin-top: 8px; font-size: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media screen and (max-width: 600px) {
	.office-name {
		font-weight: 800;
	}
	.emergency-card {
		padding: 1px 15px;
	}
	 .modal-backdrop {
    padding: 0;
    align-items: flex-start;
	}
	.emergency-modal {
    width: 100%;
    min-height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 26px 20px 30px;
    overflow: visible;
	}
}


/* Full-screen emergency reporting modal */
.emergency-card {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.modal-backdrop[hidden] { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  padding: 18px;
  overflow-y: auto;
  background: #fff;
}
.emergency-modal {
  position: relative;
  width: min(100%, 560px);

  max-height: calc(100dvh - 36px);
  overflow-y: auto;

  margin: auto 0;
  padding: clamp(24px, 5vw, 38px);

  border-radius: 22px;
  background: #fff;
  color: #172b43;

  box-shadow: 0 18px 60px rgba(10, 38, 72, .16);
  border: 1px solid #e8edf3;
}
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 1px solid #dce4ed; border-radius: 50%;
  background: #fff; color: #1b2d42;
  font-size: 2rem; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 9px rgba(10, 38, 72, .08);
}
.modal-close:hover { background: #f2f6fa; }
.modal-close:focus-visible, .submit-report:focus-visible {
  outline: 3px solid #f4c542; outline-offset: 3px;
}
.modal-topline { display: flex; align-items: center; gap: 11px; padding-right: 50px; }
.modal-emblem {
  display: grid; place-items: center; flex: 0 0 42px; height: 42px;
  border-radius: 13px; background: #edf5fc; color: #075b9e;
  font-size: 1.4rem; font-weight: 900;
}
.modal-kicker { color: #57718c; font-size: .72rem; font-weight: 850; letter-spacing: .09em; }
.emergency-modal h2 { margin: 20px 0 7px; color: #092e56; font-size: clamp(1.55rem, 5vw, 2rem); line-height: 1.12; }
.modal-description { margin: 0; color: #586b7e; line-height: 1.55; font-size: .96rem; }
.modal-notice {
  margin: 20px 0 22px; padding: 13px 15px;
  border-left: 4px solid #e0a51a; border-radius: 9px;
  background: #fff9e9; color: #654d17;
  font-size: .82rem; line-height: 1.5;
}
#emergencyForm { display: grid; gap: 9px; }
#emergencyForm label { margin-top: 5px; color: #263e57; font-size: .87rem; font-weight: 800; }
#emergencyForm input:not([type="hidden"]),
#emergencyForm textarea {
  width: 100%; min-height: 49px; padding: 13px 14px;
  border: 1px solid #d4dee8; border-radius: 10px;
  background: #fff; color: #172b43; font: inherit; font-size: .94rem;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
#emergencyForm textarea { min-height: 118px; resize: vertical; }
#emergencyForm input:focus, #emergencyForm textarea:focus {
  border-color: #1680c5; box-shadow: 0 0 0 3px rgba(22,128,197,.12);
}
#emergencyForm input::placeholder, #emergencyForm textarea::placeholder { color: #91a0af; }
.submit-report {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 54px; margin-top: 12px; padding: 13px 18px;
  border: 0; border-radius: 11px; background: #075da5; color: #fff;
  font: inherit; font-weight: 850; font-size: 1rem; cursor: pointer;
  box-shadow: 0 6px 14px rgba(7,93,165,.2);
}
.submit-report:hover { background: #064c87; }
.form-feedback { min-height: 1.2em; margin: 3px 0 0; color: #087b35; font-size: .85rem; font-weight: 700; }
.privacy-note { margin: 0; color: #788898; font-size: .73rem; line-height: 1.45; text-align: center; }
body.modal-open { overflow: hidden; }
@media (max-width: 420px) {
  .modal-backdrop { padding: 0; }
  .emergency-modal {
    width: 100%; min-height: 100%; max-height: none;
    border: 0; border-radius: 0; padding: 26px 20px 30px;
  }
  .modal-close { top: 12px; right: 12px; }
}
@media (orientation: landscape) and (max-height: 600px) {
  .modal-backdrop { padding: 10px; }
  .emergency-modal { max-height: calc(100vh - 20px); padding: 22px 28px; }
  .emergency-modal h2 { margin-top: 12px; }
  .modal-notice { margin: 12px 0; padding: 9px 12px; }
  #emergencyForm textarea { min-height: 82px; }
}
