/* =======================
    Background Images 
   ======================= */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.bg-home {
    background: url(../img/truongdinhanh-boat-9866008_1920.jpg) no-repeat center center fixed;
    background-size: cover;
}

.bg-sub {
    background: url(../img/ignartonosbg-pink-8253910.jpg) no-repeat center center fixed;
    background-size: cover;
}

/* =====================
    Typography & Fonts
   ===================== */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400;1,700&family=Prata&display=swap');

html { scroll-behavior: smooth; }

h1 { font-size: clamp(3rem, 10vw, 6rem); color: #f11b62; }
h2 { font-size: clamp(2.5rem, 8vw, 5rem); color: #ff3183; }

/* Darkened Cyan for H5 */
h5 { font-size: 2rem; color: #008b8b; } 

h6 { font-size: 1.6rem; color: #7b1a41; }

h1, h2, h3, h4, h5, h6, p {
    font-family: "Prata", serif;
    margin: 0 0 20px 0;
}

p { line-height: 1.75; font-size: 1.1rem; color: #400c1d; }

/* ===================
    Navbar 
   ==================== */
.nav-container {
    background-color: #89ffef;
    box-shadow: 0px 4px 15px rgba(65, 18, 26, 0.3);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.navbar ul { display: flex; list-style: none; padding: 0; }
.navbar ul li { margin-left: 25px; }
.navbar a { 
    color: #400c1d; 
    font-family: "Lato", sans-serif; 
    transition: 0.3s; 
    text-decoration: none;
}
.navbar a:hover { color: #f11b62; }

/* ===================
    Links (Fixing Blue)
   ==================== */
a {
    text-decoration: none;
    color: aliceblue; 
    transition: 0.3s;
}

.subpage-content ul li a {
    color: #053530; 
    text-decoration: none;
    font-weight: bold;
}

a:hover, .subpage-content ul li a:hover {
    color: #ff3183;
}

/* ===================
    Buttons 
   ==================== */
.action-btn, button[type="submit"] {
    display: inline-block;
    background-color: #ff3183;
    font-family: "Lato", sans-serif;
    color: white !important; 
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none; /* Ensures links look like buttons */
}

.action-btn:hover, button[type="submit"]:hover {
    background-color: #a0fce1;
    color: #f63c64 !important;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.1);
    
    /* This triggers the shake animation defined below */
    animation: shake 0.3s infinite; 
}

/* The Shake Animation Logic */
@keyframes shake {
    0% { transform: translate(0, -2px) rotate(0deg); }
    25% { transform: translate(-2px, -2px) rotate(-1deg); }
    50% { transform: translate(2px, -2px) rotate(1deg); }
    75% { transform: translate(-2px, -2px) rotate(-1deg); }
    100% { transform: translate(0, -2px) rotate(0deg); }
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

/* ============================
    Page Containers
   ============================== */
.homepage-container, .subpage-container {
    width: 90%;
    max-width: 1000px;
    margin: 60px auto;
    padding: 40px;
    text-align: center;
    background-color: rgba(149, 255, 244, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    flex-grow: 1;
}

.homepage-container { background: transparent; margin-top: 15vh; }

.photo {
    width: 100%;
    max-width: 600px;
    border-radius: 20px;
    margin: 20px 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* =====================
    Resources List (Bullet Fix)
   ====================== */
.subpage-content ul {
    list-style: none; /* Removes the dots */
    padding: 0;
    margin: 0;
}

.subpage-content li {
    background-color: rgba(181, 116, 138, 0.5);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    line-height: 1.5;
    text-align: center; 
    color: #400c1d;
}

/* =====================
    GALLERY ENGINE
   ====================== */
.gallery {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 15px;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.gallery input { display: none; }

.image-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

.image-wrapper img {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* Logic to show selected image */
#img-1:checked ~ .image-1,
#img-2:checked ~ .image-2,
#img-3:checked ~ .image-3,
#img-4:checked ~ .image-4,
#img-5:checked ~ .image-5 {
    opacity: 1;
    z-index: 2;
}

/* Nav Dots */
.gallery-nav {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.gallery-nav label {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

#img-1:checked ~ .gallery-nav label[for="img-1"],
#img-2:checked ~ .gallery-nav label[for="img-2"],
#img-3:checked ~ .gallery-nav label[for="img-3"],
#img-4:checked ~ .gallery-nav label[for="img-4"],
#img-5:checked ~ .gallery-nav label[for="img-5"] {
    background: white;
    transform: scale(1.3);
}

/* Arrows */
.next-control {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 10;
    display: none;
}

#img-1:checked ~ .next-control-1,
#img-2:checked ~ .next-control-2,
#img-3:checked ~ .next-control-3,
#img-4:checked ~ .next-control-4,
#img-5:checked ~ .next-control-5 {
    display: block;
}

/* =====================
    School Grid, FAQ, Contact
   ====================== */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.grid-card {
    background-color: rgba(255, 93, 147, 0.8);
    color: #7affd3;
    padding: 30px 10px;
    border-radius: 12px;
    transition: 0.3s;
}

.grid-card:hover { background-color: #ff3183; transform: scale(1.03); }

details {
    background: rgba(242, 186, 197, 0.8);
    border-radius: 10px;
    margin-bottom: 10px;
    text-align: left;
}

summary { padding: 15px; font-weight: bold; cursor: pointer; list-style: none; }
summary:hover { background: #fae1e6; border-radius: 10px; }

/* Answer boxes smaller and centered */
input, select, textarea {
    width: 100%;
    max-width: 500px; /* Makes the boxes smaller */
    padding: 12px;
    margin: 10px auto 20px;
    display: block; /* Helps with centering */
    border: 1px solid #ff3183;
    border-radius: 10px;
    font-family: "Prata", serif;
    box-sizing: border-box;
}

/* =====================
    Footer 
   ====================== */
.footer-container {
    background-color: rgba(149, 255, 244, 0.3);
    padding: 20px;
    text-align: center;
    margin-top: auto;
}

.footer-content { color: #ff47b2; }


.pixel-pet {
    width: 80px; /* Adjusted for the image I generated */
    height: 80px;
    position: fixed;
    bottom: 20px;
    left: 0; /* CRITICAL: Must have a starting number */
    background: url('../img/pixel-pet.png') no-repeat; 
    background-size: contain;
    image-rendering: pixelated;
    z-index: 2000;
    /* This makes the movement smooth instead of teleporting */
    transition: left 0.1s linear; 
    pointer-events: none;
}