@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

:root {
    --primary-color: #8B0000;
    --primary-dark: #660000;
    --accent-color: #FFD700;
    --text-color: #696969;
    --light-bg: #ffffff;
    --white: #ffffff;
    --border-color: #ddd;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

/* AI Message Section */
.message-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: rgba(123, 0, 0, 0.85);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 999;
}

.message-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

.message-button:active {
    transform: scale(0.95);
}

.image-container {
    display: flex;           /* Arrange items in a row */
    justify-content: center; /* Center horizontally */
    gap: 20px;               /* Optional spacing between images */
}

.image-container img {
    max-width: 600px; /* Adjust size as needed */
    height: auto;
}

.big-image {
    display: flex;           /* Arrange items in a row */
    justify-content: center; /* Center horizontally */
    gap: 20px;               /* Optional spacing between images */
}

.big-image img {
    max-width: 1000px; /* Adjust size as needed */
    height: auto;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card {
    position: relative;
    width: 300px;
    height: 450px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
  isolation: isolate; /* 🔑 KEY LINE */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(200, 0, 0, 0.4); /* red tint */
    transition: background 0.3s ease;
    pointer-events: none;
    z-index: 1; /* lower than overlay and title */
}

.card:hover::before {
    background: rgba(0, 0, 0, 0); /* fully transparent */
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    opacity: 0;
    transform: translateY(100%); /* start below */
    transition: opacity 0.6s ease, transform 0.6s ease;
    z-index: 3;
    border-radius: 14px;
    height: 50%;
}

.card:hover .card-title {
    opacity: 0;
}

.card:hover .card-overlay {
    opacity: 1; /* overlay text and button appear */
    transform: translateY(225px);
}

.card-title {
    position: absolute;
    bottom: -50px; /* start slightly below */
    left: 0;
    right: 0;
    height: 150px; /* cover bottom half */
    background-color: #4f0000; /* dark muted red */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.3;
    padding: 20px;
    transition: opacity 0.4s ease; /* slow transition */
    z-index: 2;
}

        .card-title h2 {
            color: white;
            font-size: 24px;
            font-weight: bold;
            line-height: 1.3;
            margin-top: -60px;
        }

.overlay-text {
    color: white;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.more-info-btn {
    border: 2px solid white;
    background: transparent;
    color: white;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    text-decoration: none;
}

.more-info-btn:hover {
    background: white;
    color: #000;
}

.page-section {
    background-color: var(--white);
    border-radius: 14px;
    padding: 15px;
    max-width: 1400px;
    margin: 0 auto 60px;
    display: flex;
    flex-direction: column;  /* stack contents */
    align-items: center;     /* center cards + ORDS */
    gap: 60px;
}


.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    justify-items: center;   /* center each card */
    justify-content: center; /* center the grid itself */
}

/* Container */
.ords-container {
    display: flex;
    flex-direction: column;
    align-items: center;     /* center card + footer */
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    margin-top: -50px;       /* keep your vertical placement */
    text-align: center;
}

/* Card */
.ords-card {
    background-color: #d9d9d9; /* light gray */
    border-radius: 15px;
    padding: 50px 30px;
    max-width: 950px;
    width: 100%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.ords-card h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
}

/* Button */
.ords-button {
    display: inline-block;
    background-color: #4f0000; /* dark red */
    color: white;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.ords-button:hover {
    background-color: #F7D21E;
    color: black;
}

/* Footer below card */
.ords-footer {
    display: flex;
    align-items: center;
    margin-top: 20px;
    max-width: 1000px;
    text-align: left;
    gap: 10px;
}

.ords-footer a {
    text-decoration: none;
    color: #333;
}

.ords-footer p {
    font-weight: bold ;
    color: #333;
    font-size: 22px;
    word-break: break-all;
}

.user-icon {
    width: 25px;
    height: 25px;
}

.contents-link {
  position: relative;
  overflow: visible;
}

/* Pop-out panel */
.popout {
  position: absolute;
  right: 105%;
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  width: 220px;
  background: var(--white);
  color: var(--text-color);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 11.5px;
  line-height: 1.4;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);

  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 25;
}

/* Show on hover */
.contents-link:hover .popout {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.popout::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent var(--white) transparent transparent;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.close-btn {
    display: none;
}

.nav-logo {
    display: none;
}

/* MOBILE VIEW */
@media (max-width: 900px) {
    
    * {
    margin: 0;
    margin-right: 0;
    padding: 0;
    box-sizing: border-box;
    }

/* Cards Mobile View */
.more-info-btn {
    border: 2px solid white;
    background: transparent;
    color: white;
    padding: 8px 20px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.overlay-text {
    color: white;
    font-size: 8px;
    line-height: 1.6;
}

.card:hover .card-overlay {
    opacity: 1;
    transform: translateY(25px);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.6s ease, transform 0.6s ease;
    z-index: 3;
    border-radius: 14px;
    height: 180px;
}

.card-title h2 {
    font-size: 11px;
    margin-top: -50px;
}

.card-title {
    font-size: 12px;
    height: 120px;
}

.card {
    width: 120px;
    height: 200px;
}

.cards-container {
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
}

.page-section {
    margin-top: -20px;
    flex-direction: column;
    gap: 30px;
}

.card-image {
    object-fit: cover;
}

/* Contents Section */
.contents-sidebar {
    margin-bottom: 0;
    margin-left: 3px;
}

/* ORDS Section Mobile View*/
.ords-container {
    padding: 5px;
    margin-left: 7px;
    text-align: center;
    margin-top: -100px;
}

.ords-card {
    width: 350px;
    height: 170px;
}

.ords-card h1 {
    font-size: 15px;
    margin-top: -20px;
    margin-bottom: 10px;
}

.ords-footer p {
    font-size: 10px;
}


}

/* --- SMART SCROLL ANIMATIONS --- */

.reveal {
    opacity: 0;
    /* Default: Start from bottom (50px) */
    transform: translateY(50px); 
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

/* Active State: Always visible and centered */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* CONTEXT: SCROLLING UP
   When the body has the 'scroll-up' class, hidden elements 
   should start from the TOP (-50px) so they slide DOWN into view.
   This prevents the "falling" effect.
*/
body.scroll-up .reveal:not(.active) {
    transform: translateY(-50px);
}

/* Optional delays */
.reveal.delay-100 { transition-delay: 0.1s; }
.reveal.delay-200 { transition-delay: 0.2s; }