:root {
  --nsblack: #000; 
  --nsgreen: #68ceb9;
  --nsgrey: #e7e7e7;
  --nsnavy: #26408b;
  --nspink: #a43c87;
  --nswhite: #fff; 

  --ns-cta-radius: 0px;
  --ns-card-radius: 0px;

  --ns-breakpoint: 768px;
}

.nsblack { color: #000 }  
.nsgreen { color: #68ceb9 }
.nsgrey  { color: #e7e7e7 }
.nsnavy  { color: #26408b }
.nspink  { color: #a43c87 }
.nswhite { color: #fff } 

body { 
    color: #666;
    background-color: var(--nswhite);
    font-family: sans-serif;
    margin: 0em;
}

@media (min-width: var(--ns-breakpoint)) {
  body { 
      margin: 2em;
  }
}

.content {
    padding: 0.2em 1em;
    background: var(--nsgrey);
}
.content a {
    color: var(--nsnavy);
}
.content .ctas a {
  font-weight: bold;
  color: var(--nsnavy);
  border-color: var(--nsnavy);
}
.content .ctas a:hover {
  color: var(--nsgrey);
  background: var(--nsnavy);
  border-color: var(--nsnavy);
}

@media (min-width: 768px) {
/**XX **/  
  .content img {
    max-width: 400px;
  }
}

#header {
  padding: 1em;
}

#header img { width: 100%; }

#nav {
  display:none;
  text-align: right;
}


/* on desktop, show smaller logo and nav */
@media (min-width: 768px) {
  #header {
    margin: 1em;  
  }
  #header img { width: 200px; }
  #nav {
    display:block;
    margin-top: -30px
  }
}


#crumb {
   margin: 0 1em;
 }

/* on desktop, push text over */
@media (min-width: 768px) {
  #crumb {
   margin: 0 2em;
    display: block;
  }
}

h1 { 
  color: var(--nsblack);
  font-family: "Titan One", sans-serif;
  font-weight: 400;
  font-size: 2em;
  font-style: normal;
  margin: 0.5em;
  text-transform: uppercase;
}

/* on desktop, push text over */
@media (min-width: 768px) {
  h1 {
     font-size: 4em;
  }
}

/* on desktop, indent main body text */
@media (min-width: 768px) {
  .content {
    margin-left: 10em;
  }
}

h2 { 
  color: var(--nsnavy);
  font-family: "Titan One", sans-serif;
  font-weight: 400;
  font-size: large;
  font-style: normal;
}
p {
   max-width: 70ch;
  line-height: 1.5em;

}
#footer {
  border-top: 2px solid var(--nswhite);
  background-color: var(--nsnavy);
  color: var(--nswhite);
  border-top: 2px solid var(--nswhite);
  padding: 1em 0.5em;
  text-align: center;
}

@media (max-width: 768px) {

#footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 2;

}

#links {
  padding-bottom: 4em;
}

}


.bigpromo {
  margin-top: 1em;
  background-color: var(--nspink);
  padding: 0.2em 1em;
}
.bigpromo h2 {
  font-size: xx-large;
  color: var(--nswhite);
}
.bigpromo p {
  color: var(--nswhite);
}
.bigpromo a {
  font-weight: bold;
  color: var(--nswhite);
}
.bigpromo a:hover {
  font-weight: bold;
  color: var(--nsgrey);
}
.bigpromo .ctas {
  margin: 2em 0em;
}

.hero img {
  width: 100%;
}

.imgframe img { 
  margin-left:-1em;
  width: calc(100% + 2em);
}

@media (min-width: 1300px) {
  .content .imgframe  {
    float: right;
    width: 400px; 
    margin-right: 2em;
    margin-top: -2em;  
  }
  .content { clear: both; }
}


@media (min-width: 1220px) {

  .hero.side {
  }

  .hero.side img {
    display: block; /* Ensure it's a block-level element */
    margin-left: auto; /* Pushes the image to the right */
    margin-right: 2em; /* Optional, but good practice */
    width: 400px; /* Give it a width so auto margin has space to work */
    max-width: 100%;
    height: auto;
    margin-bottom: -400px;
  }

  

  .content { clear:both;}
    
.hero.wide {
  width: 100%; /* The container will take up 100% of its parent's width */
  height: 400px; /* Set your desired fixed height */
  overflow: hidden; /* Important: This hides any part of the image that overflows */
}
.hero.wide img {
  width: 100%; /* The image will try to fill 100% of the container's width */
  height: 100%; /* The image will try to fill 100% of the container's height */
  object-fit: cover; /* This is the magic! */
  object-position: center; /* This ensures it's center-cropped */
}

}

  
/* menu buttons */
#nav a {
  border: 2px solid var(--nsnavy);
  padding: 0.5em 1em;
  border-radius: var(--ns-cta-radius);
  text-decoration: none;
}
#nav a:hover {
  background: var(--nsnavy);
  border: 2px solid var(--nsnavy);
  color: var(--nswhite);
}

/* cta buttons e.g. on big promos */
.ctas a {
  border-width: 2px;
  border-style: solid;
  padding: 0.5em 1em;
  border-radius: var(--ns-cta-radius);
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  margin-top: 0.5em;
  border-color: var(--nswhite);
}
.ctas a:hover {
  border-width: 2px;
  border-style: solid;
  border-color: var(--nswhite);
  background: var(--nswhite);
  color: var(--nspink);
}


/* promo (default is white) */

.promo {
  margin-top: 1em;
  padding: 1em;
  display: flex; /* Make content inside promo-item flex for vertical alignment */
  flex-direction: column;
  justify-content: space-between; /* Push content to top/bottom */
}

.promo img { 
   width: 100%;
   height: 100%;
   object-fit: cover;
   object-position: center;
}

.promo img.profile-pic { 
  width: 100%;
  max-width: 178px;
  object-fit: fill;
   object-position: 50% 50%;
}


.promo h2 {
  font-size: xx-large; 
}
.promo a {
  font-weight: bold;
}

.promo a:hover {
  color: var(--nspink);
}

.promo .ctas {
  margin: 1em 0em;
}

.promo .ctas a {
  font-weight: bold;
  color: var(--nsnavy);
  border-color: var(--nsnavy);
}

.promo .ctas a:hover {
  color: var(--nswhite);
  background: var(--nsnavy);
}

/* green promo */

.promo.green {
  background: var(--nsgreen);
  color: var(--nswhite);
}

.promo.green h2 {
  color: var(--nswhite);
}

.promo.green a {
  color: var(--nswhite);
}

.promo.green a:hover {
  color: var(--nsgrey);
}

.promo.green .ctas a {
  font-weight: bold;
  color: var(--nswhite);
  border-color: var(--nswhite);
}
.promo.green .ctas a:hover {
  color: var(--nsgreen);
  background: var(--nswhite);
}

/* pink promo */ 

.promo.pink {
  background: var(--nspink);
  color: var(--nswhite);
}

.promo.pink h2 {
  color: var(--nswhite);
}

.promo.pink a {
  color: var(--nswhite);
}

.promo.pink a:hover {
  color: var(--nsgrey);
}

.promo.pink .ctas a {
  font-weight: bold;
  color: var(--nswhite);
  border-color: var(--nswhite);
}
.promo.pink .ctas a:hover {
  color: var(--nspink);
  background: var(--nswhite);

}

/* navy promo */ 

.promo.navy {
  background: var(--nsnavy);
  color: var(--nswhite);
}

.promo.navy h2 {
  color: var(--nswhite);
}

.promo.navy a {
  color: var(--nswhite);
}

.promo.navy a:hover {
  color: var(--nsgrey);
}

.promo.navy .ctas a {
  font-weight: bold;
  color: var(--nswhite);
  border-color: var(--nswhite);
}
.promo.navy .ctas a:hover {
  color: var(--nsnavy);
  background: var(--nswhite);
}


/* grey promo */ 

.promo.grey {
  background: var(--nsgrey);
  color: var(--nsnavy);
}

.promo.grey h2 {
  color: var(--nsnavy);
}

.promo.grey a {
  color: var(--nsblack);
}

.promo.grey a:hover {
  color: var(--nspink);
}

.promo.grey .ctas a {
  font-weight: bold;
  color: var(--nsnavy);
  border-color: var(--nsnavy);
}
.promo.grey .ctas a:hover {
  color: var(--nsgrey);
  background: var(--nsnavy);
}


/* CSS Grid for the grid container */
.promo-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 column, takes up 1 fraction of space */
    gap: 20px; /* Space between grid items */
    max-width: 1200px; /* Optional: Limit the overall width of the grid */
    margin: 0 auto; /* Center the grid container */
}

.promo-grid > .promo {
  margin-top: 0em;
}

@media (min-width: 768px) {
    .promo-grid {
      padding: 20px;
      grid-template-columns: repeat(2, 1fr);
  }
}


  #links img { width: 200px; }

  /* timetable */
.timetable-container {
    max-width: 800px;
    margin: 20px auto;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: -var(ns-card-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.timetable-title {
    text-align: center;
    padding: 15px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
    margin-top: 0;
    border-top-left-radius: -var(ns-card-radius);
    border-top-right-radius: -var(ns-card-radius);
}

/* Default table styles for desktop */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #ccc;
    padding: 12px 15px;
    text-align: left;
}

thead th {
    background-color: #e9e9e9;
    font-weight: bold;
    color: #333;
}

.day-header {
    background-color: #dcdcdc;
    vertical-align: top;
    text-align: center;
}

tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

tbody tr:hover {
    background-color: #f1f1f1;
}

/* ------------------------------------- */
/* Responsive CSS for Small Screens */
/* ------------------------------------- */

@media (min-width: 768px) {
  table.timetable th:nth-child(2) { display: none; }  
  table.timetable td:nth-child(2) { display: none; }  
}

@media (max-width: 768px) {
    .timetable-container {
        overflow-x: hidden; /* Hide horizontal scroll if previously set */
        border: none; /* Remove container border for card view */
        box-shadow: none;
        padding: 0;
    }

    .timetable-title {
        border-radius: 0;
    }

    table, thead, tbody, th, td, tr {
        display: block; /* Make all table elements behave like block elements */
    }

    /* Hide the original table header on small screens */
    thead {
        display: none;
    }

    tr {
        margin-bottom: 15px; /* Space between "cards" */
        border: 1px solid var(--nsnavy);
        background-color: var(--nswhite);
        border-radius: var(--ns-card-radius);
        padding: 10px;
    }

    td {
        border: none; /* Remove cell borders */
        position: relative;
        padding-left: 50%; /* Make space for the pseudo-element label */
        text-align: right; /* Align content to the right */
        font-size: 0.95em;
    }

    td:before {
        content: attr(data-label); /* Use data-label attribute for the label */
        position: absolute;
        left: 10px;
        width: 45%; /* Space for the label */
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--nsnavy);
    }

    /* Specific handling for the "SUNDAY" header cell */
    .mobile-day-label {
        display: block;
        text-align: center;
        background-color: var(--nsnavy);
        color: var(--nswhite);
        font-size: 1.2em;
        padding: 10px;
        border-bottom: 1px solid #ccc;
        margin-bottom: 10px;
        border-radius: var(--ns-card-radius);
    }
    
    /* Adjust the first td in each row (time) */
    tbody tr td:first-of-type {
        font-weight: bold;
        text-align: center;
        padding-left: 10px; /* Remove padding if no label needed */
        margin-bottom: 5px;
    }
    tbody tr td:first-of-type:before {
        content: none; /* No label for the first cell (time) */
    }
}


.two-column-list-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1em;
    
    margin: 0px;
}

@media (min-width: 768px) {

.two-column-list-grid {
    grid-template-columns: repeat(2, 1fr);
}

}

.promo.new {
  position: relative;;
}
.promo.new .ctas::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    /* Create a triangle using borders.
        The 90-degree angle of the yellow triangle will be at the
        top-right corner of the .card div.
        The hypotenuse runs from the top-left of the pseudo-element's
        conceptual space to its bottom-right.
    */
    border-top: 50px solid #FFD700; /* Yellow color for the triangle */
    border-left: 50px solid transparent; /* This creates the diagonal edge */
    border-bottom: 0px solid transparent; /* No bottom border */
    border-right: 0px solid transparent; /* No right border */
    /* Adjust border-top and border-left to control triangle size */
    z-index: 1; /* Ensure it's above the div content if needed */
}


/* on desktop, push text over */
.qr-code {
    width: 100%
}
/* on desktop, fixed width */
@media (min-width: 768px) {
  .qr-code {
     width: 400px
  }
}

/* Alternatively, for a simple arrow */
a[href^="http"]:not([href*="northstardancestudio.com"])::after {
    content: " ↗"; /* Unicode arrow character */
    margin-left: 0.2em;
    font-size: 0.9em;
}