body {
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    margin: 0;
    padding: 0;
}

header {
    background: #003366;
    color: white;
    text-align: left;
    padding: 15px;
}

h2 {
    color: #003366;
}

section {
    background: white;
    margin: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
}

th {
    background: #003366;
    color: white;
}

.note {
    margin-top: 10px;
    font-weight: bold;
    color: green;
}

.nav-btn {
    margin-top: 15px;
    text-align: center;
}

button {
    padding: 8px 15px;
    margin: 5px;
    border: none;
    background: #003366;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background: #0055aa;
}

footer {
    text-align: center;
    padding: 10px;
    background: #003366;
    color: white;
    margin-top: 20px;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: white;
}

/* TOP LOGO BAR */
.top-bar {
    border-bottom: 4px solid black;
    padding: 10px;
    position: relative;
    height: 200px;
}



.left { position: absolute; left: 10px; }
.center { position: absolute; left: 50%; transform: translateX(-50%); }
.right { position: absolute; right: 50px; }

/* TITLE */
.title-section {
    padding: 20px;
}

.title-section h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 1px;
}

.title-section h3 {
    margin-top: 5px;
    font-weight: normal;
}

/* YELLOW SECTION BAR */
.section-title {
    background: #ffe08a;
    border: 2px solid red;
    text-align: center;
    font-weight: bold;
    padding: 6px;
    margin: 15px 20px;
}

/* TABLE */
table {
    width: 95%;
    margin: 10px auto 30px auto;
    border-collapse: collapse;
    font-size: 15px;
}

.table-header th {
    background: #b7c9e2;
    padding: 8px;
    border: 1px solid #999;
    text-align: Center;
}

td {
    padding: 8px;
    border: 1px solid #999;
}
/* Style for the navbar links */
  .navbar-nav .nav-link {
    color: rgb(255, 243, 243); /* Set the link color */
    font-weight: bold; /* Make the links bold */
    margin-right: 15px; /* Add some right margin between links */
    text-transform: uppercase; /* Convert link text to uppercase */
    transition: color 0.3s; /* Add a smooth color transition on hover */
  }

  .race-info {
    display: flex;
    justify-content: space-between;
    width: 95%;
    margin: 10px auto;
    font-size: 18px;
    border-bottom: 2px solid black;
    padding-bottom: 5px;
}

.qualify-box {
    background: #ffe08a;
    border: 2px solid red;
    width: 60%;
    margin: 25px auto;
    text-align: center;
    padding: 8px;
    font-weight: bold;
    font-size: 16px;
}

.nav-links {
    text-align: center;
    color: red;
    font-weight: bold;
    margin-top: 30px;
    font-size: 18px;
}



/* =========================
   EVENT IMAGES (HEADER LOGOS)
   img1 kiri, img2 tengah, img3 kanan
   ========================= */

/* container gambar event */
.event-images{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 10px 0 20px 0;
    padding: 0 20px;   /* jarak global kiri & kanan */
}

.event-images img{
    width: 200px !important;
    height: 140px !important;
    object-fit: contain !important;
}

/* img1 – dari kiri masuk ke tengah */
.event-images .img-left{
    margin-left: 80px;
}

/* img2 – kekal tengah */
.event-images .img-center{
    margin: 0 auto;
}

/* img3 – dari kanan masuk ke tengah (MASIH KANAN) */
.event-images .img-right{
    margin-right: 90px;
}


/* Responsive: mobile stack ke bawah */
@media (max-width: 768px){
    .event-images{
        flex-direction: column;
        gap: 10px;
        padding: 0;
    }
}

@media print {
  /* Paksa logo sebaris masa print */
  .event-images{
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;

    width: 100% !important;
    padding: 0 60px !important;  /* jarak kiri kanan */
    margin: 10px 0 20px 0 !important;
  }

  /* Paksa saiz logo masa print */
  .event-images img{
    width: 110px !important;
    height: 70px !important;
    max-width: 110px !important;
    max-height: 70px !important;
    object-fit: contain !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* Tarik masuk sikit kiri/kanan */
  .event-images .img-left{  margin-left: 30px !important; }
  .event-images .img-right{ margin-right: 30px !important; }

  /* Elak container pecah ke page lain */
  .event-images{
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* Button basic (screen sahaja) */
.btn-print{
  padding: 8px 15px;
  border: none;
  background: #003366;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
}

/* PRINT MODE */
@media print {

  /* sembunyikan button/nav bila print */
  .print-bar, .nav-btn, button, .nav-links {
    display: none !important;
  }

  /* buang margin browser yang besar */
  body{
    background: #fff !important;
  }

  /* paksa logo sebaris masa print */
  .event-images{
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 60px !important;
    margin: 10px 0 20px 0 !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .event-images img{
    width: 110px !important;
    height: 70px !important;
    max-width: 110px !important;
    max-height: 70px !important;
    object-fit: contain !important;
    display: block !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* table print cantik */
  table{
    width: 100% !important;
    margin: 0 !important;
    font-size: 12px;
    border-collapse: collapse;
  }

  th, td{
    border: 1px solid #000 !important;
    padding: 6px !important;
  }

  th{
    background: #eee !important;
    color: #000 !important;
  }
}
.btn-back, .btn-print {
    padding: 8px 15px;
    margin: 5px;
    border: none;
    background: #003366;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
}

.btn-back:hover, .btn-print:hover {
    background: #0055aa;
}


    
   






