/**
 * Cards and Components CSS
 * Styles for cards, buttons and specific components
 */

/* ========================================
   GENERAL CONTENT CARDS
   ======================================== */

/* Content block container */
.block-content-basic {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.block-content-basic .content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.block-content-basic .field__item {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ========================================
   CARDS WITH IMAGES AND TEXT
   ======================================== */

/* Card container */
.layout--threecol-section .block-content-basic,
.layout--twocol-section .block-content-basic {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: auto;
}



.layout--threecol-section .field__item p,
.layout--twocol-section .field__item p {
  margin-bottom: 1rem;
  line-height: 1.6;
  flex-grow: 1;
}

/* ========================================
   "Go to Chapter X" BUTTONS
   ======================================== */

.btn.h6 {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 0.25rem;
  transition: all 0.2s ease-in-out;
  margin-top: auto;
}

.btn.h6:hover {
  background-color: #d0d0d0 !important;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Floating buttons */
.btn.float-left {
  float: none !important;
  display: inline-block;
}

/* ========================================
   "FULL REPORT" CARD
   ======================================== */

.card.p-2 {
  padding: 0.75rem !important;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.card.p-2 h2 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.card.p-2 img {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
}

.card.p-2 p {
  text-align: center;
  margin-top: 0.35rem;
  margin-bottom: 0;
  font-size: 0.85rem;
}

/* Adjust in narrow column */
.layout--threecol-section--50-25-25 .layout__region--third .card.p-2 {
  padding: 0.5rem !important;
}

.layout--threecol-section--50-25-25 .layout__region--third .card.p-2 h2 {
  font-size: 0.8rem;
}

/* ========================================
   "A WORD FROM THE DIRECTOR" SECTION
   ======================================== */

/* Container with top border */
div[style*="border-top:4px solid #007db3"] {
  padding-top: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Floating director image */
img.align-left {
  float: left;
  margin-right: 1rem;
  margin-bottom: 1rem;
  max-width: 100px;
  height: auto;
}

img.align-right {
  float: right;
  margin-left: 1rem;
  margin-bottom: 1rem;
  max-width: 100px;
  height: auto;
}

/* ========================================
   ROTATED BOXES "ELIMINATION FACTS"
   ======================================== */

/* Rotated box container */
div[style*="transform:rotate(-4deg)"] {
  transform: rotate(-4deg) !important;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

div[style*="transform:rotate(-4deg)"]:hover {
  transform: rotate(-1deg) !important;
}

/* Inner content of rotated boxes */
div[style*="transform:rotate(-4deg)"] > div {
  padding: 1.5rem 2.5rem;
}

/* Titles in rotated boxes */
div[style*="transform:rotate(-4deg)"] h2 {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

div[style*="transform:rotate(-4deg)"] h3 {
  margin-bottom: 0;
  line-height: 1.5;
}

/* Icons in rotated boxes */
div[style*="transform:rotate(-4deg)"] i.fas {
  margin-right: 0.5rem;
}

/* ========================================
   PREVIOUS TOPICS
   ======================================== */

/* Previous topics container */
.layout--twocol-section p[style*="border-top"] {
  display: flex;
  align-items: flex-start;
  padding-top: 1rem;
  margin-top: 0;
  gap: 1rem;
}

.layout--twocol-section p[style*="border-top"] img {
  flex-shrink: 0;
  margin: 0;
}

.layout--twocol-section p[style*="border-top"] a {
  flex-grow: 1;
  line-height: 1.4;
}

/* ========================================
   GENERAL UTILITIES
   ======================================== */

/* Top spacing */
.mt-2 {
  margin-top: 0.5rem !important;
}

/* Text spacing */
.text-formatted {
  line-height: 1.6;
}

/* Clearfix for floats */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Prevent overflow */
.block__content {
  overflow: hidden;
}
