/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables */
:root {
    --lilly-white: #ffffff;
    --lilly-black: #212121;
    --lilly-red: #d52b1e;
    --lilly-pink: #fbcfc8;
}

body {
    font-family: Arial, sans-serif;
    color: var(--lilly-black);
}

/* Superscript adjustment */
sup {
    top: 0;  
  }

h2 sup {
    font-size: 20px;
    top: -0.7em;  
  }

p sup {
    top: 0;  
  }

/* Navigation */
.navigation {
    width: 100%;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-container {
    width: 100%;
    height: 80px;
    background-color: var(--lilly-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Logo */
.logo {
    width: 290px;
    height: 80px;
    display: flex;
    align-items: center;
    padding-left: 78px;
}

.logo img {
    width: 100%;
    height: auto;
}

/* Nav Links */
.nav-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 60px;
    padding-right: 78px;
    height: 28px;
}

/* Hamburger Menu (Hidden by default) */
.menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--lilly-black);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    line-height: 14px;
    text-align: center;
    gap: 2px;
    color: var(--lilly-black);
    font-weight: 400;
}

.nav-item.active {
    color: var(--lilly-white);
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.nav-item span {
    display: block;
}

/* Decorative element (red semicircle under active nav item) */
.nav-decoration {
    position: absolute;
    left: 50%;
    top: -33px;
    transform: translateX(-50%);
    width: 220px;
    height: 100px;
    background-color: var(--lilly-red);
    border-radius: 0 0 99px 99px;
    z-index: -1;
}

.hero {
    position: relative;
    height: 230px;
    background-image: url('../assets/img/hero.gif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: 15px;
}

.hero-title {
    display: flex !important;
    height: 100%;
    align-items: center;
    color: #ffffff !important;
    font-size: 56px !important;
    padding-left: 78px;
    margin: 0 !important;
    line-height: 1.15 !important;
    font-weight: 600 !important;
}

.chapters {
    display: flex;
    flex-direction: column;
    padding-top: 24px;
}

.chapters-text {
    width: 70%;
    padding-bottom: 48px;
}

.chapters-title {
    padding-top: 24px;
    padding-left: 78px;
    font-size: 20px;
}

.chapters-title h1 {
    font-size: 40px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.chapters-subtitle {
    padding-top: 20px;
    padding-left: 78px;
    font-size: 25px;
}

.chapters-subtitle h2 {
    font-size: 25px !important;
    font-weight: normal !important;
    margin: 0 !important;
    line-height: 1.15 !important;
    font-weight: 600 !important;
}

.chapters-list {
  width: 100%;
  display: flex;
  gap: 20px;
  padding-left: 40px;
  padding-right: 40px;
  justify-content: center;
  align-items: stretch;
}

.chapter {
  width: 100%;
  height: 477px;
  background: #fde8e3; /* beige dal Figma r:0.992 g:0.910 b:0.898 */
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 30px;
  padding-left: 30px;
  padding-right: 30px;
  box-sizing: border-box;
}

.chapter-img {
  width: 100%;
  height: 171px;
  padding-top: 25px;
  overflow: hidden;
}

.chapter-img img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.chapter-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-top: 30px;
}

.chapter-title {
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 24px;
  line-height: 24px;
  color: #212121;
  margin: 0;
}

.chapter-subtitle {
  font-family: Arial, sans-serif;
  font-weight: normal;
  font-size: 18px;
  line-height: 21.6px;
  color: #212121;
}

.chapter-body {
  font-family: Arial, sans-serif;
  font-weight: normal;
  font-size: 14px;
  line-height: 16.8px;
  color: #212121;
  margin: 0;
  padding-bottom: 15px;
}

.chapter-btn {
  margin-top: auto;
}

.chapter-btn button {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: 6px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 18px;
  line-height: 21.6px;
  color: white;
  cursor: pointer;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Button normale */
.chapter-btn button {
  background: #e1251b;
}

.chapter-btn button:hover {
  background: #c41f17;
}

/* Button disabled */
.chapter-btn button:disabled {
  background: #fbcfc8;
  color: #ffffff;
  cursor: not-allowed;
}

.chapter-btn button:disabled:hover {
  background: #fbcfc8;
}

/* Chapter pages hidden by default */
.chapter-page {
    display: none;
}

/* Swiper overrides */
.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==================== RESPONSIVE ==================== */

/* iPad Pro landscape (max-width: 1440px) */
@media (max-width: 1440px) {
  /* Superscript adjustment for iPad Pro */
  p sup {
    top: 0.1em;
  }
}

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .nav-links {
    gap: 50px;
    padding-right: 40px;
  }

  .logo {
    padding-left: 40px;
  }

  .hero-title {
    font-size: 40px;
    padding-left: 40px;
  }

  .chapters-title {
    padding-left: 40px;
  }

  .chapters-subtitle {
    padding-left: 40px;
  }

  .chapters-text {
    width: 90%;
  }

  .chapters-list {
    flex-wrap: wrap;
    padding-left: 20px;
    padding-right: 20px;
  }

  .chapter {
    width: calc(50% - 10px);
    height: auto;
    min-height: 400px;
  }

  /* Superscript adjustment for tablet landscape */
  h2 sup {
    font-size: 18px;
    top: -0.65em;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .navigation {
    height: auto;
  }

  .nav-container {
    flex-direction: row;
    flex-wrap: wrap;
    height: auto;
    padding: 15px 20px;
    position: relative;
  }

  .logo {
    padding-left: 0;
    width: 200px;
    height: auto;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 15px;
    padding: 15px 0 0 0;
    height: auto;
    width: 100%;
    order: 3;
  }

  /* Show menu when checked */
  .menu-toggle:checked ~ .nav-links {
    display: flex !important;
  }

  /* Display Hamburger */
  .hamburger {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
  }

  /* Hamburger Animation */
  .menu-toggle:checked + .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }
  .menu-toggle:checked + .hamburger span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle:checked + .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .nav-item.active {
    color: var(--lilly-red);
  }

  .nav-decoration {
    display: none;
  }

  .hero {
    height: 180px;
  }

  .hero-title {
    font-size: 28px;
    padding-left: 20px;
    padding-right: 20px;
    line-height: 1.2;
  }

  .chapters-title {
    padding-left: 20px;
    padding-right: 20px;
  }

  .chapters-title h1 {
    font-size: 28px;
    line-height: 1.2;
  }

  .chapters-subtitle {
    padding-left: 20px;
    padding-right: 20px;
  }

  .chapters-subtitle h2 {
    font-size: 16px;
    line-height: 1.4;
  }

  .chapters-text {
    width: 100%;
  }

  .chapters-list {
    flex-direction: column;
    padding-left: 20px;
    padding-right: 20px;
  }

  .chapter {
    width: 100%;
    min-height: auto;
  }

  .chapter-img {
    height: auto;
    max-height: 150px;
  }

  .chapter-content {
    gap: 15px;
    padding-top: 20px;
  }

  .chapter-title {
    font-size: 20px;
  }

  .chapter-subtitle {
    font-size: 16px;
  }

  .chapter-body {
    font-size: 14px;
  }

  .chapter-btn button {
    font-size: 16px;
    padding: 0 20px;
  }
}

/* Footer Styles */
.footer-app {
  background-color: var(--lilly-red);
  color: var(--lilly-white);
  padding: 40px 20px;
  text-align: center;
}

.footer-app h3 {
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: bold;
}

.footer-app p {
  font-size: 16px;
  margin-bottom: 30px;
  line-height: 1.5;
}

.app-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.app-buttons a img {
  height: 50px;
  width: auto;
}

.footer-legal {
  background-color: var(--lilly-black);
  color: var(--lilly-white);
  padding: 30px 20px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--lilly-white);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--lilly-red);
}

.footer-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0;
}

.footer-logo img {
  max-width: 150px;
  height: auto;
}

.footer-legal p {
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  margin: 10px 0;
  color: var(--lilly-white);
}

.piece-footer {
  background-color: var(--lilly-black);
  color: var(--lilly-white);
  padding: 30px 20px 0;
  text-align: center;
}

.piece-footer p {
  font-size: 12px;
  line-height: 1.6;
  margin: 10px 0 0 0;
  color: var(--lilly-white);
}

@media (max-width: 768px) {
  .footer-app h3 {
    font-size: 20px;
  }

  .footer-app p {
    font-size: 14px;
  }

  .app-buttons {
    flex-direction: column;
    align-items: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 15px;
  }

  /* Superscript adjustment for tablet */
  h2 sup {
    font-size: 16px;
    top: -0.6em;
  }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 22px;
  }

  .chapters-title h1 {
    font-size: 24px;
  }

  .chapter {
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
  }

  /* Superscript adjustment for mobile */
  h2 sup {
    font-size: 14px;
    top: -0.5em;
  }
}

/* Kaltura Video Players - Force 16:9 aspect ratio */
.video-static {
  position: relative;
  width: 100%;
}

.video-static iframe,
.video-static > div {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
}
