/* =========================================================
   Regency College Kandy - website fixes (2026 update)
   This file is loaded AFTER regency-school.css.
   ========================================================= */

/* Anchor links (#section4 etc.) stop below the fixed header */
section[id] { scroll-margin-top: 80px; }

/* Header: logo image next to the school name (replaces the long row of spaces) */
.main-header .logo a { display: inline-flex; align-items: center; gap: 12px; }
.main-header .logo img { height: 56px; width: auto; }
@media screen and (max-width: 767px) {
  .main-header .logo { padding-left: 15px !important; }
  .main-header .logo a { font-size: 20px; gap: 8px; }
  .main-header .logo img { height: 38px; }
}

/* "Our Law" list */
.our-law { color: #fff; margin-top: 40px; }
.our-law h4 { margin-top: 0 !important; }
.our-law ul { list-style: disc; padding-left: 20px; text-align: left; display: inline-block; column-count: 1 !important; }
.our-law ul li { display: list-item !important; font-size: 15px !important; line-height: 30px; text-align: left !important; }

/* Call-us phone links */
.phone-links a { color: #f5a425; font-weight: 700; white-space: nowrap; }
.phone-links a:hover { color: #fff; }

/* Careers headings were dark text on a dark background */
.career-vacancy { padding-top: 60px; }
.career-vacancy h3 { color: #fff; font-size: 24px; font-weight: 700; margin: 40px 0 15px; }
.career-vacancy .section-heading p { color: #fff; }

/* Countdown finished / no date set */
.admissions-open { color: #fff; }
.admissions-open h5 { font-size: 26px; font-weight: 700; color: #f5a425; margin: 20px 0 10px; }
.admissions-open p { color: #fff; font-size: 15px; }
.admissions-open a { color: #f5a425; font-weight: 700; }

/* Message shown after a form is sent */
.form-notice { padding: 12px 16px; margin-bottom: 20px; border-radius: 4px; font-size: 14px; }
.form-notice.ok { background: #1e7e34; color: #fff; }
.form-notice.error { background: #b52a2a; color: #fff; }

/* Hidden anti-spam field */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Contact details under the map */
.contact-details { margin-top: 20px; color: #fff; font-size: 15px; line-height: 30px; }
.contact-details a { color: #f5a425; }
.contact-details i { width: 22px; color: #f5a425; }

/* Stop wide images from overflowing on phones */
img { max-width: 100%; height: auto; }
.round-image { max-width: 100%; }

/* Careers + Our Law text (these used to inherit styles from the tabs by accident) */
.our-law h4 { font-size: 32px; font-weight: 700; letter-spacing: 1px; color: #fff; margin-bottom: 20px; }
.career-item h4 { color: #fff; font-size: 26px; font-weight: 700; letter-spacing: 1px; margin: 30px 0 20px; }
.career-item p { color: #fff; font-size: 15px; line-height: 28px; }
.career-item .text-button a { color: #f5a425; font-weight: 700; }

/* ---------- Friendlier image sizes ---------- */

/* Student group photo: neat rounded card instead of a huge oval */
.photo-card {
  max-width: 820px;
  margin: 50px auto 10px;
  border-radius: 16px;
  overflow: hidden;
  background: #1f2d4a;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 35%;
}
.photo-card figcaption {
  padding: 14px 20px;
  color: #fff;
  font-size: 15px;
  text-align: center;
}

/* Call-us photo: not too big */
.call-us-img { display: block; width: 100%; max-width: 440px; margin: 0 auto; }

/* "Best Education" photo: limit size */
.tabs-content img { max-width: 520px; }

/* Phones: a bit less space around photos */
@media screen and (max-width: 767px) {
  .photo-card { margin: 30px auto 0; border-radius: 12px; }
  .photo-card figcaption { font-size: 14px; padding: 12px 14px; }
  .call-us-img { max-width: 320px; margin-bottom: 20px; }
}

/* ---------- Sharp background pattern ----------
   The old background (choosing-bg.jpg) was a small picture stretched over a very
   tall section, so the icons looked big and blurry. This SVG pattern repeats
   instead of stretching, so it stays sharp on every screen. */
section.why-us,
section.courses {
  background-image: url(../images/school-pattern.svg);
  background-repeat: repeat;
  background-size: 320px 320px;
  background-color: #172238;
}

/* =========================================================
   RESPONSIVE: works on every screen size
   Small phones (320px) -> phones -> tablets -> laptops -> large monitors
   ========================================================= */

/* Never allow sideways scrolling */
html, body { overflow-x: hidden; max-width: 100%; }

/* Text and headings shrink smoothly with the screen size */
.main-banner .caption h2 { font-size: clamp(26px, 5.5vw, 56px); line-height: 1.2; }
.main-banner .caption h6 { font-size: clamp(13px, 2vw, 18px); }
.section-heading h2 { font-size: clamp(16px, 2.6vw, 22px); }
section.coming-soon .continer h4 { font-size: clamp(22px, 3.4vw, 36px); line-height: 1.3; }

/* Header: logo, name and menu button always stay on one line */
@media screen and (max-width: 950px) {
  .main-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; height: auto; min-height: 70px; }
  .main-header .logo { float: none; line-height: normal; display: flex; align-items: center; min-height: 70px; }
  a.menu-link { float: none; padding: 0 20px !important; line-height: 70px; font-size: 30px; }
  nav[role="navigation"] { width: 100%; flex-basis: 100%; }
  /* Open menu: show every item (Careers was hidden before) with a solid background */
  nav[role="navigation"].active {
    height: auto !important;
    max-height: calc(100vh - 70px) !important;
    overflow-y: auto !important;
    background: rgba(16, 11, 60, 0.98);
  }
  nav[role="navigation"] li a { display: block; padding: 14px 15px; } /* bigger tap area */
}
@media screen and (max-width: 360px) {
  .main-header .logo { padding-left: 10px !important; }
  .main-header .logo a { font-size: 16px; gap: 6px; }
  .main-header .logo img { height: 32px; }
  a.menu-link { padding: 0 12px !important; font-size: 26px; }
}

/* Tabs (Best Education / Vision / Mission) on small phones */
@media screen and (max-width: 400px) {
  #tabs ul li a { font-size: 11px; letter-spacing: 0.5px; }
}

/* Forms: bigger fields, easy to tap; 16px text stops iPhones from zooming in */
form input.form-control,
form textarea.form-control { font-size: 16px !important; min-height: 46px; }
form button.button { min-height: 46px; padding-left: 24px; padding-right: 24px; }

/* Registration box on tablets/phones: full width under the heading */
@media screen and (max-width: 991px) {
  section.coming-soon .right-content { margin-top: 30px; max-width: 560px; margin-left: auto; margin-right: auto; }
  section.coming-soon .continer { text-align: center; }
}

/* Video card: title no longer hides behind the play button */
.video-item .video-caption h4 { padding-right: 70px; line-height: 1.3; }
@media screen and (max-width: 991px) {
  section.video .left-content { margin-bottom: 40px; text-align: center; }
}
@media screen and (max-width: 575px) {
  .video-item .video-caption h4 { font-size: 15px; }
}

/* Contact: form first, then map and details, on phones/tablets */
@media screen and (max-width: 991px) {
  #map { margin-top: 30px; }
  .map-frame { height: 280px; }
  .contact-details { text-align: center; }
}

/* Careers: 1 column on phones, 2 on tablets, 3 on laptops */
.career-item { margin-bottom: 20px; }

/* Call-us and Our Law on phones */
@media screen and (max-width: 767px) {
  .our-law { text-align: left; }
  .phone-links a { display: inline-block; margin: 6px 8px; font-size: 16px; }
  .contact-details { font-size: 16px; line-height: 34px; }
}

/* Very large screens: keep text lines comfortable to read */
@media screen and (min-width: 1600px) {
  .container { max-width: 1320px; }
}

/* Phones turned sideways (landscape): hero is not taller than the screen */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .main-banner, .main-banner .video-overlay { min-height: 100vh; height: auto; }
}


/* ---------- Auto-playing "First day" video ---------- */
.video-item { border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
.video-item figure.auto-video { position: relative; margin: 0; font-size: 16px; background: #000; }
.video-item figure.auto-video video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; cursor: pointer; }
.video-item figure.auto-video a:before,
.video-item figure.auto-video a:after { display: none; }
.video-btn {
  position: absolute; z-index: 5; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-weight: 700; font-size: 13px;
  border-radius: 30px; min-height: 40px; display: flex; align-items: center; gap: 8px;
}
.video-btn:hover { background: rgba(0, 0, 0, 0.8); }
.sound-btn { top: 12px; right: 12px; padding: 8px 14px; }
.play-btn { bottom: 12px; left: 12px; width: 44px; height: 44px; justify-content: center; background: #f5a425; }
.play-btn:hover { background: #e0901a; }
/* Caption now sits under the video instead of covering it */
.video-item .video-caption {
  position: static; height: auto; padding: 16px 20px;
  background: rgba(255, 255, 255, 0.95);
}
.video-item .video-caption h4 { padding-right: 0; margin: 0; font-size: clamp(14px, 1.6vw, 18px); line-height: 1.4; }

/* ---------- Header: menu always fits (fonts differ between computers) ---------- */
@media screen and (min-width: 951px) {
  .main-header { display: flex; align-items: center; justify-content: space-between; }
  .main-header .logo { float: none; flex-shrink: 0; padding-left: clamp(15px, 2.5vw, 60px) !important; line-height: normal; height: 80px; display: flex; align-items: center; }
  .main-header .logo a { font-size: clamp(20px, 2.1vw, 36px); }
  .main-header .logo img { height: clamp(40px, 3.6vw, 56px); }
  .main-nav { flex-shrink: 1; min-width: 0; }
  .main-menu { float: none; white-space: nowrap; padding-right: clamp(10px, 2vw, 60px) !important; }
  .main-menu li { margin-left: 0 !important; }
  .main-menu li a { padding: 10px clamp(6px, 0.9vw, 15px) !important; font-size: clamp(11px, 0.85vw, 13px) !important; }
  .main-menu li .sub-menu { white-space: normal; }
}

/* ---------- Dropdown menus (computer screens) ----------
   Wider box, every item on one line and lined up neatly */
@media screen and (min-width: 951px) {
  .main-menu li .sub-menu {
    width: auto !important;
    min-width: 220px;
    left: 0;
    padding: 6px 0 !important;
    border-top: 3px solid #f5a425;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    text-align: left;
    white-space: nowrap !important;
  }
  .main-menu li .sub-menu li {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .main-menu li .sub-menu li:last-child { border-bottom: 0; }
  .main-menu li .sub-menu li a {
    display: block;
    padding: 12px 20px !important;
    font-size: 12px !important;
    text-align: left;
    border: 0 !important;
  }
  .main-menu li .sub-menu li a:hover { background: rgba(245, 164, 37, 0.1); }
}
