@charset "utf-8";

/*
   Author: Ashikur Prodhan
   Date: 05/21/2026
*/

body {
   width: 90%;
   margin-left: auto;
   margin-right: auto;
   background-color: rgba(245, 245, 245, 0.75);
   color: #222222;
   font-family: Arial, Helvetica, sans-serif;
}

header {
   background-color: #2c3e50;
   color: rgb(247, 245, 245);
   text-align: center;
}

header img {
   width: 100%;
   display: block;
}

h1, h2 {
   color: #2c3e50;
   text-shadow: 4px 6px 5px gray;
}

nav ul {
   list-style: none;
   margin: 0;
   padding: 0;
   overflow: hidden;
}

nav li {
   display: block;
   width: 20%;
   float: left;
}

nav a {
   display: block;
   background-color: #34495e;
   line-height: 2.8em;
   text-decoration: none;
   text-align: center;
   color: white;
}

nav a:hover {
   background-color: #f4a261;
   color: black;
}

main {
   background-color: rgba(255, 255, 255, 0.65);
   padding: 20px;
   margin-top: 35px;
}

main ul {
   list-style-type: square;
}

main > img {
   float: right;
   width: 25%;
   height: auto;
   padding: 25px;
   margin-left: 15px;
   margin-bottom: 10px;
}

p {
   line-height: 1.6;
}

body > footer {
   background-color: #2c3e50;
   color: white;
   text-align: center;
   font-weight: bold;
   font-size: 0.9em;
   line-height: 3em;
   margin-top: 10px;
   padding: 10px;
   clear: both;
}

/* Vacation Gallery */

.gallery {
   display: flex;
   flex-wrap: wrap;
}

.imgGallery {
   flex: 25%;
   max-width: 25%;
   box-sizing: border-box;
   padding: 8px;
}

.imgGallery img {
   width: 100%;
   height: auto;
   display: block;
}

/* Family Table */

table {
   width: 100%;
   border-collapse: collapse;
   margin-top: 20px;
   background-color: rgba(255, 255, 255, 0.9);
}

th,
td {
   border: 1px solid #2c3e50;
   padding: 10px;
   text-align: left;
}

thead {
   background-color: #34495e;
   color: white;
}

tbody tr:nth-child(even) {
   background-color: rgba(220, 220, 220, 0.7);
}

tfoot {
   background-color: #2c3e50;
   color: white;
   font-weight: bold;
   text-align: center;
}

/* Mobile and Tablet */

@media only screen and (max-width: 768px) {

   body {
      width: 100%;
      margin: 0;
   }

   nav li {
      float: none;
      width: 100%;
      font-size: x-large;
   }

   nav a {
      border-bottom: 1px solid black;
   }

   main > img {
      width: 90%;
      float: none;
      display: block;
      margin-left: auto;
      margin-right: auto;
      padding: 25px;
   }

   .imgGallery {
      flex: 50%;
      max-width: 50%;
   }

   table,
   thead,
   tbody,
   tfoot,
   tr,
   th,
   td {
      display: block;
   }

   thead {
      display: none;
   }

   tr {
      margin-bottom: 15px;
      border: 1px solid #2c3e50;
      background-color: rgba(255, 255, 255, 0.95);
   }

   td {
      border: none;
      border-bottom: 1px solid #cccccc;
      padding-left: 45%;
      position: relative;
   }

   td::before {
      position: absolute;
      left: 10px;
      width: 40%;
      font-weight: bold;
   }

   td:nth-of-type(1)::before {
      content: "Name";
   }

   td:nth-of-type(2)::before {
      content: "Relationship";
   }

   td:nth-of-type(3)::before {
      content: "Birthday";
   }

   td:nth-of-type(4)::before {
      content: "Interesting Fact(s)";
   }
}

/* Small Phones */

@media only screen and (max-width: 480px) {

   .imgGallery {
      flex: 100%;
      max-width: 100%;
   }

}

/* Desktop */

@media only screen and (min-width: 769px) {

   html {
      background-image: url("background.jpg");
      background-repeat: no-repeat;
      background-position: center center;
      background-size: cover;
      background-attachment: fixed;
   }

}