@import url("https://use.typekit.net/ccp2drz.css");
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300..700;1,300..700&display=swap');

:root {
    /* Colours */
    --background-dark-green: #023330;
    --primary-dark-green: #024642;
    --primary-park-green: #02504C;
    --primary-mid-green: #137c6c;
    --primary-light-green: #ACDCC8;
    --accent-light-green: #ACDCC8;
    --primary-white: #FFF9F2;
    --accent-grey: #31504e;
    --accent-orange: #F35331;
    --accent-yellow: #F3C444;
    --accent-dark-green: #023330;
    --sector-border-width: 3px;
    --full-border-radius: 1rem;
    --half-border-radius: 0.75rem;
    --third-border-radius: 0.3rem;
}

* {
    box-sizing: border-box;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    font-size: 16px;
    list-style: none;
    overflow: hidden;
    text-decoration: none;
    caret-color: transparent;
    font-family: "europa", sans-serif;
}

body {
    width: 100dvw;
    height: 100dvh;
    margin: 0;
    padding: 0;
}

.logo-yellow {
    fill: var(--accent-yellow);
}

.logo-grey {
    fill: var(--accent-grey);
}

.logo-white {
    fill: var(--primary-white);
}

.logo-orange {
    fill: var(--accent-orange);
}

.logo-text {
  fill: var(--primary-mid-green);
  stroke: var(--primary-mid-green);
  stroke-miterlimit: 10;
  stroke-width: .4px;
}

.crest-fill {
        fill: var(--primary-dark-green);
}

.crest-cross {
  fill: var(--accent-orange);
}

.crest-mitre {
  fill: var(--primary-white);
}

.crest-white {
  fill: var(--primary-white);
}

.crest-text {
  fill: var(--accent-light-green);
}

.crest-yellow {
  fill: var(--accent-yellow);
}

.logo-text-line1 {
   fill: var(--primary-white);
}

.logo-text-line2 {
    fill: var(--primary-light-green);
}

.container {
  display: grid;
  grid-template-columns: 1fr 3.5fr; 
  grid-template-rows: 4fr 1fr; 
  gap: 0px 0px; 
  grid-template-areas: 
    "nav overlay"
    "as enrol"; 
  height: 100dvh;
  width:100dvw;
}

.container > .sector {
  display: flex;
  flex-flow: column nowrap;
  box-sizing: border-box;
  color: var(--primary-white);
  border: var(--sector-border-width) solid var(--accent-orange);
  min-height: 100%;
  min-width: 100%;
}

.sector.image {
  background-color: transparent;
  color: var(--primary-dark-green);
  background-image: url('../img/ai-class.png'), url('../img/ai-class-2.png'), url('../img/ai-smas.png'); 
  background-position: center;
  background-size:cover;
  background-blend-mode: cross-fade(0%);
}

.sector.green {
  background-color: var(--background-dark-green);
}

.sector.light-green {
  background-color: var(--primary-light-green);
}

.sector.mid-green {
  background-color: var(--primary-mid-green);
}

.sector.white {
  background-color: var(--primary-white);
  color: var(--accent-grey);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

#nav { 
    grid-area: nav;
    border-left: none; 
    border-top: none; 
    justify-content: space-between;
    padding: 1.3rem;
    min-width: 295px;
    min-height: 500px;
}
#overlay { 
    grid-area: overlay;
    border-left:  none; 
    border-right: none;
    border-top: none; 
    min-height: 180px;
}
#as { 
    grid-area: as;
    border-left: none;
    border-bottom: none;
    border-top: none;
    display: flex;
    padding: 1.3rem;
    justify-content: flex-end;
    flex-flow: column nowrap;
    min-height: 125px;
}
#enrol { 
    grid-area: enrol;
    border:  none;
    display: flex;
    flex-flow: row nowrap;
    justify-content: left;
    align-content: baseline;
    padding-left: 3rem;
}

.logo {
  display: flex;
  flex-flow: row nowrap;
  gap: 1.2rem;
  align-content: center;
}

.logo > div {
	display: flex;
	width: 100%;
	gap: 1rem;
	justify-content: center;
}

.logo > div svg:first-child {
  flex: 0 0 45px;
}

.logo > div svg:last-child {
  flex: 0 0 190px;
  fill: var(--primary-white);
  stroke: var(--primary-white);
}

.menu {
  display: flex;
  flex-flow: row nowrap;
  justify-content: right;
  text-align: left;
  text-transform: uppercase;
}

.menu ul {
  width: 80%;
  min-width: 240px;
}

.menu > ul li {
  font-size: 1rem;
  text-justify:distribute;
  padding: 1.3rem 0.5rem 1.3rem 0.2rem;
  border-top: 0.75px solid var(--primary-mid-green);
  cursor: pointer;
}

.anglischools {
	text-align: center;
	background-image: url('../img/poas.png');
	background-repeat: no-repeat;
	background-position: center bottom;
	background-size: 250px;
	width: 100%;
	height: 6rem;
}

.enrol {
  display: flex;
  flex-flow: row wrap;
  font-family: "Cormorant Garamond", serif;
  justify-content: flex-start;
  align-content: center;
  gap: 1rem;
  margin: 0;
  font-optical-sizing: auto;
  color: var(--primary-dark-green);
  font-weight: 700;
  font-size: 1.8rem;
}

.enrol * {
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
}

p.enrol-text {
  flex: 1 1 100%;
  display: grid;
  align-items: center;
  width: 100%;
  text-align: left;
}

.button {
  flex: 0 0 auto;
  text-align: center;
  padding: 0.85rem 0;
  border-radius: var(--third-border-radius);
  color: var(--primary-white);
  background-color: var(--primary-mid-green);
  height: 64px;
  min-width: 312px;
} 

.overlay {
  display: none;
  gap: 0px 0px;
  background-color: rgba(255,255,255,1);
  /* backdrop-filter: blur(10px); */
  height: 100%;
  width: 100%;
  min-width: 100%;
  min-height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.overlay div.close-btn {
  position:absolute;
  right: 0.5rem;
  top: 0.5rem;
}

.overlay div.close-btn:hover {
  color: var(--primary-dark-green);
  transition: color 0.3s ease-in-out;
}

.overlay > div {
  display: grid;
  height: 100%;
  width: 100%;
  min-width: 100%;
  min-height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.overlay.left-img > div,
.overlay.right-img > div {
  grid-template-rows: 0.1fr 55px 295px 90px 3fr 0.1fr;  
}

.overlay.left-img > div {
  grid-template-columns: 0.1fr 250px 4fr 0.1fr; 
  grid-template-areas: 
    ". . . ."
    ". photo title ."
    ". photo paragraph ."
    ". capt paragraph ."
    ". . paragraph ."
    ". . . ."; 
}

.overlay.right-img > div {
  grid-template-columns: 0.1fr 4fr 250px 0.1fr;  
  grid-template-areas: 
    ". . . ."
    ". title photo ."
    ". paragraph photo ."
    ". paragraph capt ."
    ". paragraph . ."
    ". . . ."; 
}

.overlay.right-img.wide > div {
  grid-template-columns: 0.1fr 3.5fr 450px 0.1fr;  
  grid-template-areas: 
    ". . . ."
    ". title photo ."
    ". paragraph photo ."
    ". paragraph capt ."
    ". paragraph . ."
    ". . . ."; 
}

.overlay.tables > div {
  grid-template-columns: 0.1fr 3.5fr 450px 0.1fr;  
  grid-template-areas: 
    ". . . ."
    ". title title ."
    ". table table ."
    ". table table ."
    ". . . ."; 
}

.overlay.list-with-links > div {
  grid-template-columns: 0.1fr 3.5fr 450px 0.1fr;
  grid-template-rows: min-content auto;
  grid-template-areas: 
    ". . . ."
    ". title title ."
    ". list list ."
    ". list list ."
    ". . . ."; 
}

#adobe-dc-view {
	max-width: calc(100% - 2rem);
	border-right: 1px solid #eee;
}

.overlay.list-with-links > div ul.list-with-document li {
   font-size: 3rem;
}

.overlay.list-with-links > div ul li a{
   color: inherit;
   margin-left: 1rem;
   font-size: 1rem;
}

.overlay.left-img div h2,
.overlay.left-img div p {
  padding-left: 2rem ;
}

.overlay.right-img div h2,
.overlay.right-img div p {
  padding-right: 2rem ;
}

.overlay div h2 {
  grid-area: title;
  font-size: 1.5rem;
  color: var(--primary-dark-green);
}

.overlay.paragraph div p {
  grid-area: paragraph;
  font-family: "Cormorant Garamond", serif;
  color: var(--background-dark-green);
  font-size: 1rem;
  font-weight: 600;
  height: 100%;
  overflow-y: scroll;
}

.overlay.paragraph div img {
  grid-area: photo;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.overlay.paragraph div h4 {
  display: block;
  grid-area: capt;
  padding: 0.5rem 0;
  color: var(--primary-dark-green);
}

.pressed {
  background-color: var(--primary-dark-green);
  transition: background-color 0.4 ease;
}

.overlay.list-with-links > div > div {
  grid-area: list;
  display: flex;
  flex-flow: column nowrap;
}





/* Flex Table */

div.flex-table {
	grid-area: table;
	display: grid;
	grid-auto-rows: max-content;
	width: 100%;
	font-family: sans-serif;
	overflow: scroll;
	max-height: 100%;
	height: fit-content;
}

div.flex-table > .table-header,
div.flex-table > .table-row {
    display: flex;
    flex-flow: row nowrap;
    align-items: flex-start;
}

div.flex-table > .table-header > .header-cell,
div.flex-table > .table-row > .row-cell {
    padding: 6px;
    border:1px solid var(--primary-dark-green);
    text-align: left;
    text-wrap: nowrap;
    flex: 1 0 33.29%;
    border-right-width: 0;
    border-bottom-width: 0;
}

div.flex-table > .table-row > .row-cell {
    font-size: 85%;
}

div.flex-table > .table-header > .header-cell:last-child,
div.flex-table > .table-row > .row-cell:last-child {
  border-right-width: 1px;
}

div.flex-table > .table-row:last-child > .row-cell {
  border-bottom-width: 1px ;
}

div.flex-table > .table-header > .header-cell {
    background-color: var(--primary-dark-green);
    color: var(--primary-white);
    font-weight: bold;
    font-size: 70%;
}

div.flex-table > .table-row:nth-of-type(even) > .row-cell {
    background-color: #fafafa;
}

/* Slider */

.tabs {
    grid-area: table;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0 auto;
    font-family: sans-serif;
    font-size: 85%;
  }

  input[type="radio"] {
    display: none;
  }

  .tab-labels {
    display: flex;
    padding: 0;
  }

  .tab-labels label {
    flex: 1;
    padding: 10px;
    background: #e4e4e4;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 80%;
    font-weight: bold;
  }

  input#tab1:checked ~ .tab-labels label[for="tab1"],
  input#tab2:checked ~ .tab-labels label[for="tab2"] {
    background: var(--primary-dark-green);
    color: var(--primary-white);
  }

  .slider-wrapper {
    overflow: hidden;
    position: relative;
    border-top: none;
  }

  .slider {
    display: flex;
    width: 200%;
    transition: transform 0.4s ease;
  }

  .tab-content {
    width: 100%;
    padding: 10px 0 0;
    box-sizing: border-box;
  }

  input#tab1:checked ~ .slider-wrapper .slider {
    transform: translateX(0%);
  }

  input#tab2:checked ~ .slider-wrapper .slider {
    transform: translateX(-50%);
  }


/* Mobile Styles */
@media (max-width: 768px) {
   
  /* Make container a vertical column */
  .container {
    grid-template-columns: 1fr; 
    grid-template-rows: 1fr 3.5fr 2fr 0.7fr; 
    gap: 0px 0px; 
    grid-template-areas: 
      "nav"
      "overlay"
      "enrol"
      "as"; 
    height: 100dvh;
    width:100dvw;
    overflow: scroll;
  }
  
  /* Ensure all sectors stack vertically */
  .container > .sector {
    border: none;
  }

  #nav, #overlay, #enrol, #as {
    min-height: min-content;
    padding: 1rem;
  }

  #nav {
    flex-flow: row nowrap;
    justify-content: flex-start;
  }

  #nav .logo {
    flex: 0 0 280px;
    height: 70px;
  }
  
  #enrol {
    justify-content: center;
    align-content: baseline;
  }

  .enrol {
    justify-content: center;
    font-size:1.5rem;
    width: 312px ;
  }

  .menu {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
  }

  .anglischools {
    background-size: 200px;
  }

  .menu::before {
    content: "☰ Menu";
    display: block;
    padding: 0.75rem;
    background-color: var(--primary-mid-green);
    color: var(--primary-white);
    text-align: center;
    font-size: 1.2rem;
    cursor: pointer;
    margin-top: 0.6rem;
    border-radius: var(--third-border-radius);
  }

  .menu::after {
    display: none;
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    z-index: 8000;
    background-color: rgba(255,255,255,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 100dvw;
    height: 100dvh;
  }

  .menu > ul {
    display: none;
    position: fixed;
    z-index: 99999;
    background-color: var(--primary-mid-green);
    top: 0;
    right: 0;
    width: max-content;
    height: 100dvh;
    flex-flow: column nowrap;
    color: var(--primary-white);
    padding: 0;
    box-shadow: -2px 0 4px rgba(0,0,0,0.2);
  }

  .menu.active::after {
    display: block;
    transition: opacity 0.4s ease-in-out;
  }
  
  .menu.active > ul {
    display: flex;
    transition: opacity 0.4s ease-in-out;
  }

  .menu > ul::before {
    content: "×";
    font-weight: 300;
    font-size: 205%;
    color: var(--primary-light-green);
    padding: 0.75rem;
    text-align: right;
    cursor: pointer;
    margin-bottom: 3.5rem;
    margin-right: 0.5rem;
  }

  .menu > ul::after {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 8000;
    background-color: var(--primary-white);
    opacity: 0.7;
    width: 100dvw;
    height: 100dvh;
  }

  .menu > ul li {
    font-size: 90%;
    padding: 1rem 2rem;
    border: none;
    cursor: pointer;
  }

  .overlay {
    min-height: min-content;
    position: fixed;
    top: 0.2rem;
    left: 0.2rem;
    width: calc( 100dvw -  0.4rem );
    height: calc( 100dvh - 0.4rem);
    z-index: 10000;
    min-width: auto;
    min-height: auto;
  }

  .overlay div.close-btn {
    position:absolute;
    left: 0;
    top: 0;
  }

  .overlay div {
    display: block;
    overflow: hidden;
    overflow-y: scroll;
  }

  .overlay div.tab-labels,
  .overlay div.slider  {
    display: flex;
  }

  .overlay div.slider {
    width: 200%;
  }

  .overlay div h2 {
    display: block;
    width: 100%;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
  }

  .overlay.paragraph div,
  .overlay.pdf div.close-btn,
  .overlay.tables > div,
  .overlay.tables > div div.close-btn {
    padding: 1rem;
  }

  .overlay #adobe-dc-view {
    max-width: 100%;
    border-right: none;
    margin-top: 2rem;
  } 

  .overlay.list-with-links div {
    padding: 1rem;
  }

  .overlay.paragraph div img {
    width: 150px;
    height: 180px;
  }

  .overlay.paragraph.wide div img {
    width: 100%;
    height: auto;
    display: block;
  }

  .overlay.paragraph div h4 {
    width: 150px;
    font-size: 65%;
    clear: both;
  }

  .overlay.paragraph.wide div h4 {
    width: 100%;
    text-align: center;
  }

  .overlay.paragraph.left-img div h2,
  .overlay.paragraph.left-img div p {
    padding: 0 ;
  }

  .overlay.paragraph.left-img div img,
  .overlay.paragraph.left-img div h4 {
    float: left;
    margin-right: 1rem; 
  }

  .overlay.paragraph.right-img div img,
  .overlay.paragraph.right-img div h4 {
      float: right;
      margin-left: 1rem;
  }

  .overlay.paragraph div p {
    display: inline;
    width: 100%;
    text-align: justify;
  }

}

/* iPhone-specific styles (standard size) */
@media only screen 
  and (min-device-width: 375px) 
  and (max-device-width: 428px)
  and (orientation: portrait)
  and (-webkit-min-device-pixel-ratio: 2) {
  /* Your iPhone-specific styles will go here */

  #nav {
    min-height: 100px;
  }

  #nav .logo {
    flex: 0 0 280px;
    height: 70px;
  }

  .logo > div svg:first-child {
    flex: 0 0 40px;
  }

  .logo > div svg:last-child {
    flex: 0 0 160px;
  }

}