/* =====================================================================
   Fish & Friends Dahab – global stylesheet
   Rebuilt from the original Divi site: same fonts, colours, spacing and
   breakpoints (desktop ≥981px, tablet 768–980px, phone ≤767px).
   Page-specific rules live in assets/css/pages/<page>.css.
   ===================================================================== */

:root {
  --primary: #005e9e;        /* brand blue: headings, hero backgrounds, outline buttons */
  --secondary: #ed1c24;      /* brand red: call-to-action buttons */
  --heading: #005e9e;
  --body: #666666;
  --gray: #e9e9e9;           /* light grey section background */
  --accent: #2ea3f2;         /* active menu item, mobile menu border */
  --footer: #0c71c3;
  --white: #ffffff;
  --container-max: 1300px;
  --header-h: 84px;
  --header-h-scrolled: 54px;
  --header-h-mobile: 80px;
  --font: Poppins, Helvetica, Arial, sans-serif;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7em;               /* computed once at 16px (27.2px) and inherited, like Divi */
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  color: var(--heading);
  font-weight: 600;
  line-height: 1em;
  letter-spacing: -1px;
  overflow-wrap: break-word;
}
h1 { font-size: 34px; }
h2 { font-size: 29px; }
h3 { font-size: 22px; }
h4 { font-size: 20px; }
p { margin: 0; padding: 0; }
ul, ol { margin: 0; }
strong, b { font-weight: 700; }
button { font-family: inherit; }
main { padding-top: 83px; }                 /* room for the fixed header */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Rich text blocks (Divi "text" modules) */
.text { line-height: 1.7em; }          /* Divi: line-height fixed at the module, custom font sizes go on the children */
.text p { padding-bottom: 1em; }
.text p:last-of-type { padding-bottom: 0; }
.text ul, .text ol { list-style-type: disc; list-style-position: outside; padding: 0 0 1em 1em; line-height: 26px; }
.text ol { list-style-type: decimal; }
.text li { padding: 0; }
.text li p { padding-bottom: 0; }
.text a { color: var(--accent); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-justify { text-align: justify; }
.text-white, .text-white h1, .text-white h2, .text-white h3, .text-white h4 { color: var(--white); }

/* ---------- layout: section > row > col ---------- */
.section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  padding: 4% 0;
  background-color: var(--white);
}
.section--block { display: block; }
.section--block > .row { padding: 2% 0; }
.section--primary { background-color: var(--primary); }
.section--gray { background-color: var(--gray); }
.section--bg { background-size: cover; background-position: 50% 50%; background-repeat: no-repeat; }
.row {
  --gap: 5.5%;
  position: relative;
  width: 80%;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  gap: 40px var(--gap);
}
.row--gap-10 { --gap: 10px; }
.row--gap-20 { --gap: 20px; }
.row--middle { align-items: center; }
.row--reverse { flex-direction: row-reverse; }
.row--card { padding: 20px; background-color: var(--white); }
.col {
  --f: 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-width: 0;
  width: calc(var(--f) * 100% - var(--gap) * (1 - var(--f)));
}
.col-1-5 { --f: .2; }
.col-2-5 { --f: .4; }
.col-3-5 { --f: .6; }
.col-1-4 { --f: .25; }
.col-1-2 { --f: .5; }
.col-3-4 { --f: .75; }
.col--gap-10 { gap: 10px; }
.col--gap-0 { gap: 0; }
.col--center { justify-content: center; }
.col--end { justify-content: flex-end; }
.col--items-center { align-items: center; }
.col--bg { background-size: cover; background-position: 50% 50%; background-repeat: no-repeat; }
.module { min-width: 0; }
.module--full { width: 100%; }

@media (max-width: 980px) {
  main { padding-top: 78px; }
  .section { padding: 50px 0; }
  .section--block > .row { padding: 30px 0; }
}
@media (min-width: 768px) and (max-width: 980px) {
  .t-col-1-4 { --f: .25; }
  .t-col-1-2 { --f: .5; }
  .t-col-3-4 { --f: .75; }
  .t-col-full { --f: 1; }
}
@media (max-width: 767px) {
  .row, .row--reverse { flex-direction: column; }
  .col { --f: 1; width: 100%; }
}
/* show/hide per device (same breakpoints Divi uses) */
@media (min-width: 981px) { .hide-desktop { display: none !important; } }
@media (min-width: 768px) and (max-width: 980px) { .hide-tablet { display: none !important; } }
@media (max-width: 767px) { .hide-phone { display: none !important; } }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99999;
  background: var(--white);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
  line-height: 23px;
  transition: background-color .4s, box-shadow .4s;
}
.site-header__inner {
  width: 80%;
  max-width: var(--container-max);
  margin: 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: height .4s ease-in-out;
}
.site-header__logo { display: inline-flex; align-items: center; flex: 0 0 auto; margin-left: 4px; }  /* 4px: matches the inline-block gap of the original */
.site-header__logo img { width: auto; height: 66px; transition: height .4s ease-in-out; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 26px; }
.nav__list a {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, .6);
  line-height: 14px;
  padding-top: 1px;
  transition: opacity .4s ease-in-out;
}
.nav__list a:hover { opacity: .7; }
.site-header.is-scrolled { box-shadow: 0 0 7px rgba(0, 0, 0, .1); }
.site-header.is-scrolled .site-header__inner { height: var(--header-h-scrolled); }
.site-header.is-scrolled .site-header__logo img { height: 43px; }
/* active page highlight (body class comes from each page's front-matter) */
.page-home .nav a[data-page="home"],
.page-about-us .nav a[data-page="about-us"],
.page-diving-offerings .nav a[data-page="diving-offerings"],
.page-padi-dive-courses .nav a[data-page="diving-offerings"],
.page-price-list .nav a[data-page="price-list"],
.page-contact-us .nav a[data-page="contact-us"] { color: var(--accent); }

.mobile-nav { display: none; position: relative; }
.mobile-nav__toggle {
  display: block;
  margin: 0; padding: 0 0 24px;
  border: 0; background: none; cursor: pointer;
  color: rgba(0, 0, 0, .6);
  line-height: 0;
}
.mobile-menu {
  position: absolute;
  top: 100%; left: 0;
  width: 100%;
  margin: 0;
  padding: 5%;
  list-style: none;
  background: var(--white);
  border-top: 3px solid var(--accent);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
  z-index: 9999;
}
.mobile-menu li a {
  display: block;
  padding: 10px 5%;
  font-size: 14px;
  font-weight: 600;
  color: rgba(0, 0, 0, .6);
  border-bottom: 1px solid rgba(0, 0, 0, .03);
  transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
}
.mobile-menu li a:hover { background-color: rgba(0, 0, 0, .03); opacity: .7; }
@media (max-width: 980px) {
  .site-header { position: absolute; }
  .site-header__inner { height: var(--header-h-mobile); align-items: center; }
  .site-header__logo img, .site-header.is-scrolled .site-header__logo img { height: 43px; }
  .site-header.is-scrolled .site-header__inner { height: var(--header-h-mobile); }
  .site-header.is-scrolled { box-shadow: 0 1px 0 rgba(0, 0, 0, .1); }
  .nav { display: none; }
  .mobile-nav { display: block; align-self: flex-start; padding-top: 24px; }
  .mobile-menu { position: absolute; top: var(--header-h-mobile); }
}
@media (max-width: 980px) {
  /* the dropdown must span the header's content width, so anchor it to the header inner box */
  .site-header__inner { position: relative; }
  .mobile-nav { position: static; }
  .mobile-menu { left: 0; top: 100%; width: 100%; }
}

/* ---------- footer ---------- */
.site-footer { background-color: var(--footer); }
.site-footer__bottom { background-color: rgba(0, 0, 0, .32); padding: 15px 0 5px; }
.site-footer__inner {
  width: 80%;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer__info { font-size: 11px; line-height: 27.2px; color: var(--white); padding-bottom: 10px; }
.site-footer__social { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.site-footer__social li { display: flex; }
.site-footer__social a { display: flex; align-items: center; height: 27px; color: var(--white); line-height: 27.2px; }
.site-footer__social svg { display: block; width: 17px; height: 17px; }
@media (max-width: 980px) {
  .site-footer__inner { flex-direction: column; align-items: center; text-align: center; }
  .site-footer__social { margin-bottom: 5px; }
}

/* ---------- back-to-top ---------- */
.scroll-top {
  position: fixed;
  right: 0;
  bottom: 125px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .4);
  color: var(--white);
  border-radius: 5px 0 0 5px;
  opacity: 0;
  transition: opacity .3s;
  z-index: 99999;
}
.scroll-top.is-visible { opacity: 1; }

/* ---------- buttons (Divi .et_pb_button look-alike) ---------- */
.btn {
  position: relative;
  display: inline-block;
  padding: 6px 20px;
  border: 2px solid currentColor;
  border-radius: 3px;
  font-size: 20px;
  font-weight: 500;
  line-height: 34px;
  color: var(--primary);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
}
.btn::after {
  content: "";
  position: absolute;
  right: 6.4px;
  top: 50%;
  width: 26px; height: 26px;
  margin-top: -13px;
  opacity: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 12h14M12 6l6 6-6 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 12h14M12 6l6 6-6 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
  transition: opacity .2s;
}
.btn:hover { padding: 6px 40px 6px 14px; border-color: transparent; }
.btn:hover::after { opacity: 1; }
.btn--no-icon:hover { padding: 6px 20px; }
.btn--no-icon::after { display: none; }
.btn--outline-primary { color: var(--primary); border-color: var(--primary); }
.btn--white-red { color: var(--secondary); background: var(--white); border-color: var(--secondary); }
.btn--red { color: var(--white); background: var(--secondary); border-width: 0; }
.btn--red:hover { border-width: 0; }
.btn--primary { color: var(--white); background: var(--primary); border-color: var(--primary); }
.btn--primary:hover { border-color: var(--primary); }
.btn-wrap { display: flex; }
.btn-wrap--center { justify-content: center; }
.btn-wrap--right { justify-content: flex-end; }

/* ---------- social follow boxes (coloured squares) ---------- */
.social-follow { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.social-follow--center { justify-content: center; }
.social-follow a {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 3px;
  color: var(--white);
  transition: opacity .2s;
}
.social-follow a:hover { opacity: .8; }
.social-follow svg { width: 16px; height: 16px; display: block; }
.social-follow--facebook a { background-color: #3b5998; }
.social-follow--instagram a { background-color: #ea2c59; }

/* ---------- contact form ---------- */
.contact-form { display: flex; flex-direction: column; width: 100%; }
.contact-form__row { display: flex; flex-wrap: wrap; gap: 15px; }
.contact-form__field { width: 100%; }
.contact-form__field--half { width: calc(50% - 7.5px); }
.contact-form__input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background-color: #eee;
  color: #999;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  -webkit-appearance: none; appearance: none;
}
.contact-form__input:focus { outline: 2px solid var(--accent); outline-offset: -2px; color: #333; }
.contact-form__input::placeholder { color: #999; opacity: 1; }
.contact-form__textarea { min-height: 150px; resize: vertical; }
.contact-form__website { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form__bottom { display: flex; justify-content: flex-end; align-items: stretch; gap: 18px; margin-top: calc(15px + 3%); }  /* Divi: form gap 15px + 3% */
.contact-form__captcha { display: flex; align-items: center; gap: 0; }
.contact-form__captcha label { padding-right: 5px; white-space: nowrap; }
.contact-form__captcha-input { width: 50px; display: inline-block; }
.contact-form__message { margin-top: 15px; }
.contact-form__message.is-error { color: var(--secondary); }
.contact-form__message.is-success { color: var(--primary); font-weight: 600; }

/* ---------- scroll animations (elements marked data-animate) ---------- */
.js [data-animate] { opacity: 0; transition: opacity .8s ease-in-out; }
.js [data-animate].is-animated { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .js [data-animate] { opacity: 1; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- extra button variants ---------- */
.btn--white-primary { color: var(--primary); background: var(--white); border-color: var(--secondary); }
.btn--white-primary:hover { border-color: transparent; }

/* ---------- full-screen contact overlay (home page "Starts Here" / "Contact us") ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 60px;
  padding: 4% 0;
  background-color: var(--primary);
  background-image: url('/assets/img/IMG_0527-768x576-1.jpg'), linear-gradient(180deg, #000 0%, var(--primary) 100%);
  background-size: cover, cover;
  background-position: 50% 50%, 50% 50%;
  background-repeat: no-repeat;
  background-blend-mode: multiply, multiply;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  overflow-y: auto;
}
.modal[hidden] { display: none; }
.modal.is-open { opacity: 1; }
.modal__col { position: relative; z-index: 2; }
.modal__form-wrap { width: 100%; max-width: 800px; margin: 0 auto; }
.modal__title {
  font-family: 'Alex Brush', cursive;
  font-size: 90px;
  font-weight: 300;
  line-height: 1em;
  letter-spacing: -1px;
  color: var(--white);
  padding-bottom: 16px;
  text-align: left;
}
.modal__close {
  position: absolute;
  top: 0; right: 0;
  width: 30px; height: 30px;
  padding: 0; border: 0; background: none;
  color: var(--gray);
  line-height: 0;
  cursor: pointer;
}
.modal__close svg { width: 30px; height: 30px; display: block; }
@media (max-width: 980px) { .modal { padding: 50px 0; } }

/* ---------- icon list (Divi "icon list" module) ---------- */
.icon-list { list-style: none; margin: 0; padding: 0 0 23px 16px; display: flex; flex-direction: column; gap: 10px; line-height: 26px; }
.icon-list--flush { padding: 0; }
.icon-list li { display: flex; align-items: center; gap: 10px; }
.icon-list__icon { flex: 0 0 16px; width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; color: var(--primary); }
.icon-list__icon svg { width: 16px; height: 16px; display: block; }
.icon-list__text { min-width: 0; }
.icon-list a { color: inherit; }
