/* Global Styles */

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

html {
    scroll-padding-top: 200px;
    /* offset for fixed header */
    scroll-behavior: smooth;
    /* smooth scrolling */
}

body {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    line-height: 1.6;

    background-image: url("https://www.ischgl.com/002_ISCHGL/WINTER/FREERIDE/155719053/image-thumb__155719053__hero/Ischgl_Freeride%20%283%29.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;

    background-color: aquamarine;
}

/* Component Styles */
.container {
    max-width: 1200px;
    margin: 200px auto 40px;
    padding: 20px;
    /* background-color: rgb(141, 166, 230); */
}

.badge {
    background-color: #333;
    color: #fff;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 20px;
    font-weight: bold;

    vertical-align: middle;
}

pre {
    background: #f1f1f1;
    padding: 10px;
    overflow-x: auto;
    border-left: #333 4px solid;
}

code {
    background-color: rgb(229, 224, 224);
    padding: 2px 4px;
    border-radius: 4px;
}

.card {
    background-color: rgb(255, 255, 255);
    margin-bottom: 25px;
    padding: 15px;
    border-radius: 10px;

}

.card.module-1 {
    border-top: 4px solid #f7e36b;
}

.card.module-2 {
    border-top: 4px solid #6570b0;
}

.card.module-3 {
    border-top: 4px solid #df9143;
}

.card.module-4 {
    border-top: 4px solid #d374bb;
}

.card.module-5 {
    border-top: 4px solid #3bcae0;
}

.card.module-6 {
    border-top: 4px solid #f7e36b;
}

.note {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(34, 197, 94, 0.08);
    border-left: 4px solid #dde9e2;
    border-radius: 8px;
    color: #000000;
    font-size: 14px;
}

.note::before {
    content: "💡";
}

/* Group 1 Styles */
.header {
    /* set properties */
    background-color: lightcoral;
    box-shadow: 5px 5px 15px rgba(209, 187, 187, 0.3);
    padding: 20px;

    /* จัดตำแหน่ง */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    position: fixed;
    top: 0;
    width: 100%;
}

.btn-text-link {
    list-style: none;
    margin-top: 20px;

    display: flex;
    gap: 20px;
}

.btn-text-link li {
    margin: 15px 0;
    transition: transform 0.3s ease;

}

.btn-text-link li:hover {
    transform: translateY(-10px);

}

.btn-text-link a {
    /* background-color: rgb(133, 133, 100); */
    background: linear-gradient(135deg, rgb(245, 244, 239), rgb(150, 147, 147));
    box-shadow: 0 4px 15px gray;
    padding: 13px 20px;
    border-radius: 50%;

    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
}

.btn-text-link a:hover {
    background: linear-gradient(135deg, rgb(184, 174, 125), rgb(235, 235, 225));

}

/* Group 2 Styles */
.image-small {
    width: 100px;
    height: auto;
}

.position {
    display: flex;
    border: 2px dashed gray;
    margin: 20px 0;
    align-items: center;
}

.position.left {
    justify-content: flex-start;
}

.position.center {
    justify-content: center;
}

.position.right {
    justify-content: flex-end;
}

/* Group 3 Styles */
.img-fixed {
    width: 260px;
    height: 60px;
    object-fit: cover;

    margin: 15px 0;
    border: 2px solid gray;

}

/* Group 4 Styles */
.obj-fit-image {
    width: 800px;
    height: 200px;
    border: 1px solid black;
}

.obj-fit-image.contain {
    object-fit: contain;
}

.obj-fit-image.fill {
    object-fit: fill;
}

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

/* Group 5 Styles */
.YT-img img {
    transition: 0.3s ease;
    width: 200px;
    height: auto;
    margin: 15px 0;
    border-radius: 20px;
}

.YT-img img:hover {
    transform: scale(1.05);
}

/* Group 6 Styles */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;

    margin-top: 15px;
}

.gallery img {
    height: 120px;
    width: 100%;
    object-fit: cover;
}

/* Group 7 Styles */
img {
    max-width: 100%;
    height: auto;
    margin: 15px;
}

/* Group 8 Styles */
figure {
    margin-top: 20px;
    text-align: center;
}

/* Group 9 Styles */
.local-image {
    background-image: url("../images/winter.jpg");
    /* ต้องย้อนกลับไปนอกโฟลเดอร์(css)ที่อยู่ก่อนหนึ่งชั้น */
    background-size: cover;
}

/* Group 10 Styles */
.back-link {
    display: block;
    margin-top: 15px;
    text-decoration: none;
    color: #333;
    font-weight: bold;

    background-color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
}

.back-link:hover {
    text-decoration: none;
    color: #df9143;
}