/* ====================================================== */
/* DRAWINGS PAGE CSS - Mobile-First, Device & Orientation Aware */
/* ====================================================== */

/* === Base Styles (Mobile portrait default) === */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #111;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  box-sizing: border-box;
}

* {
  box-sizing: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === Header & Navigation === */
header {
  width: 100%;
  padding: 0.5rem;
  background-color: #111;
}

nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
  justify-content: center;
}

nav ul li a {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
  color: #FFD700;
  text-shadow: 0 0 5px #FFD700;
}

/* === Main Content === */
main {
  flex: 1;
  padding: 1rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

p {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1rem;
  color: #333;
}

/* === Drawing Container === */
.drawings-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  align-items: center;
}

.drawing-list {
  width: 100%;
  background-color: rgba(255,255,255,0.9);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.drawing-list h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.drawing-list ul {
  list-style-type: none;
  padding: 0;
}

.drawing-list ul li {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.drawing-list ul li:hover {
  background-color: #f1f1f1;
}

.drawing-display {
  width: 100%;
  background-color: rgba(255,255,255,0.9);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.drawing-display iframe {
  width: 100%;
  height: 360px;
  border: none;
}

/* === Buttons for Drawing Numbers === */
.drawing-list ul li button {
  background-color: #FFD700;
  color: #111;
  border: none;
  padding: 0.5rem 1rem;
  margin-top: 0.5rem;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-align: center;
}

.drawing-list ul li button:hover {
  background-color: #FF6347;
  transform: scale(1.05);
}

/* === Footer === */
footer {
  text-align: center;
  padding: 5px 0;
  font-size: 0.8rem;
  background-color: rgba(0,0,0,0.1);
  color: #111;
}

/* ====================================================== */
/* MOBILE - 0px to 767px */
@media (max-width: 767px) {
  main {
    padding: 1rem 1.5rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .drawing-list h2 {
    font-size: 1.3rem;
  }

  .drawing-list ul li {
    font-size: 1rem;
  }

  .drawing-display iframe {
    height: 240px;
  }

  .drawing-list ul li button {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

/* ========================= */
/* TABLET - 768px to 1023px (portrait & landscape) */
/* ========================= */
@media (min-width: 768px) and (max-width: 1023px) {

  main {
    padding: 2rem 3rem;
  }

  h1 {
    font-size: 2rem;
  }

  .drawing-list h2 {
    font-size: 1.5rem;
  }

  /* Container: side by side for both orientations */
  .drawings-container {
    display: flex;
    flex-direction: row;       /* side by side */
    justify-content: space-between;
    align-items: stretch;      /* equal height */
    gap: 2%;
    width: 100%;
  }

  .drawing-list,
  .drawing-display {
    width: 48%;
    display: flex;
    flex-direction: column;
    background-color: rgba(255,255,255,0.9);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
  }

  /* Default iframe height */
  .drawing-display iframe {
    width: 100%;
    height: 450px;
    border: none;
  }
}

/* Optional: slightly taller iframe for tablet landscape */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: landscape) {
  .drawing-display iframe {
    height: 500px;
  }
}

/* ========================= */
/* LAPTOP - 1024px to 1279px */
@media (min-width: 1024px) and (max-width: 1279px) {
  main {
    padding: 2.5rem 4rem;
  }

  .drawing-list h2 {
    font-size: 1.7rem;
  }

  .drawing-display iframe {
    height: 360px;
  }
}

/* DESKTOP - 1280px+ */
@media (min-width: 1280px) {
  .drawings-container {
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
  }

  .drawing-list {
    width: 45%;
  }

  .drawing-display {
    width: 45%;
  }

  .drawing-display iframe {
    height: 360px;
  }
}
