/* Reset & basics */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f8f9fa;
            color: #333;
}

a {
  color: #faa307;
  text-decoration: none;
}

        .intro-section {
            background: linear-gradient(135deg, #4e73df, #1cc88a);
            color: white;
            padding: 30px 20px;
            text-align: center;
            border-bottom: 2px solid black;
        }
       .intro-section h1 {
            font-size: 2.5em;
            margin-bottom: 10px;
        }
        .intro-section p {
            font-size: 1.2em;
            margin-bottom: 20px;
        }
        .intro-section a {
            background: white;
            color: #4e73df;
            padding: 12px 25px;
            text-decoration: none;
            border-radius: 8px;
            font-weight: bold;
        }
        section {
            margin: auto;
            padding: 40px 20px;
        }
        section h1,
        section h2,
        .layer-2 h2 {
            margin: 10px auto 15px;
            background: linear-gradient(135deg, #4e73df, #1cc88a);
            padding: 10px;
            width: 450px;
            color: white;
            text-align: center;
            border-radius: 8px;
        }
        .layer-2 h2 {
            width: 630px;
        }
        section h2 {
            margin-top: 50px;
        }
        section h3 {
            margin-bottom: 5px;
        }
        section p {
            font-size: 19px;
            margin-bottom: 15px;
        }
        .features {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            justify-content: center;
        }
        .feature {
            background: white;
            padding: 20px;
            flex: 1 1 250px;
            box-shadow: 1px 2px 5px #5e59bb;
            border-radius: 8px;
            text-align: center;
        }
        
.home-place-type-section {
    background: linear-gradient(135deg, #4e73df, #ffffff);
    border-top: 2px solid black;
    border-bottom: 2px solid black;
}        
.home-locations-section {
    background: linear-gradient(135deg, #4e73df, #548c1a);
    border-bottom: 2px solid black;
}
        
        
        
.login,
.register,
.ai-container {
    text-align: center;
}


.login h1,
.register h1,
.ai-container {
    margin-top: 30px;
    margin-bottom: 30px;
}

    .view-post h1 {
       margin-top: 25px;
    }


/* Container for nav */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #4e73df, #1cc88a);
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid white;
}


/* Menu styles */
.menu {
  list-style: none;
  display: flex;
  gap: 30px;
}

.menu li a {
  color: white;
  font-weight: 600;
}

/* Hamburger styles */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  cursor: pointer;
}

.hamburger div {
  height: 3px;
  background-color: #faa307;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Hamburger animation */
.change .bar1 {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.change .bar2 {
  opacity: 0;
}

.change .bar3 {
  transform: rotate(45deg) translate(-5px, -6px);
}






/* Container & Typography */
.app-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 0.3em;
  font-family: 'Poppins', sans-serif;
  text-align: center;
}

.app-description {
  font-size: 1.15rem;
  color: #555;
  max-width: 600px;
  margin: 0 auto 1.5em auto;
  line-height: 1.5;
  text-align: center;
  font-family: 'Poppins', sans-serif;
}

/* Form styling */
form {
  max-width: 500px;
  margin: 30px auto;
  background: #fff;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  font-family: 'Poppins', sans-serif;
}

form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
  margin-top: 15px;
}

form input[type="text"],
form input[type="date"],
form textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 6px;
  transition: border-color 0.3s ease;
  font-family: 'Poppins', sans-serif;
  resize: vertical;
  min-height: 38px;
}

form textarea {
  min-height: 80px;
}

form input[type="text"]:focus,
form input[type="date"]:focus,
form textarea:focus {
  outline: none;
  border-color: #faa307;
  box-shadow: 0 0 6px rgba(250, 163, 7, 0.4);
}

/* Button styling */
form button {
  margin-top: 25px;
  width: 100px;
  padding: 12px 0;
  background-color: #1e68c1;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

form button:hover,
form button:focus {
  background-color: #e59400;
  outline: none;
}

form h4 {
    margin-top: 50px;
    margin-bottom: 10px;
}

/* Posts grid */
.posts-grid,
.locations-grid,
.place-types-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    margin: 0 auto;
}
.post-card,
.locations-card,
.place-type-card {
    background: #fff;
    padding: 20px;
    flex: 1 1 250px;
    border-radius: 8px;
    box-shadow: 1px 2px 5px #5e59bb;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-card h3 {
    margin-bottom: 10px;
}
.post-card p {
    flex-grow: 1;
}
.post-card .btn {
    align-self: flex-start;
    margin-top: 10px;
}
.post-card a,
.locations-card a,
.place-type-card a {
    background: linear-gradient(135deg, #4e73df, #1cc88a);
    padding: 10px;
    width: 135px;
    color: white;
    font-weight: bold;
    text-align: center;
    border-radius: 15px;
    margin: 0 auto;
}

.locations-card a,
.place-type-card a {
    width: 330px;
}


.card-listing-btn {
    color: white;
    text-decoration: none;
    background-color: #3f51b5;
    text-align: center;
    display: block;
    padding: 5px;
    width: 400px;
    margin: 15px auto;
    border-radius: 16px;
}

.search-result {
    text-align: center;
    line-height: 1.5;
}

.search-result a {
    margin: 0 auto;
    display: block;
    width: 400px;
    text-align: center;
    border: 1px solid black;
    border-radius: 10px;
    padding: 10px;
    font-weight: bold;
    color: black;
}


.autocomplete-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #000;
    position: absolute;
    background: #fff;
    width: 450px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    color: black;
}
.autocomplete-list li {
    padding: 8px;
    cursor: pointer;
    border: 1px solid;
}
.autocomplete-list li:hover {
    background: #f0f0f0;
}

/* Open 24h icon next to place name */
.open-24h {
    display: flex;
    align-items: center;
    gap: 5px; /* space between circle and text */
    font-weight: 500;
    color: white;
    font-size: 0.9em;
    background: green;
    padding: 3px;
    border-radius: 5px;
}

.listing-card {
    border:1px solid #ddd; 
    padding:15px; 
    margin-bottom:20px; 
    border-radius:8px;
    box-shadow:0 2px 5px rgba(0,0,0,0.05);
}

.listing-meta span {
    display:flex;
    align-items:center;
    gap:5px;
}


/* Pagination */
.pagination {
    text-align: center;
    margin: 20px 0;
}
.pagination a {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 12px;
    text-decoration: none;
    background: #f4f4f4;
    color: #333;
    border-radius: 4px;
    transition: background 0.3s;
}
.pagination a.active,
.pagination a:hover {
    background: #007bff;
    color: #fff;
}

/* Dashboard Container */
.dashboard {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Heading */
.dashboard h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

/* Buttons */
.dashboard .btn {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: #4CAF50;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.dashboard .btn:hover {
    background: #45a049;
}

/* Table Styling */
.dashboard table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Table Head */
.dashboard table thead {
    background: #4CAF50;
    color: #fff;
}
.dashboard table thead th {
    text-align: left;
    padding: 12px 15px;
}

/* Table Body */
.dashboard table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s;
}
.dashboard table tbody tr:hover {
    background: #f1f1f1;
}
.dashboard table tbody td {
    padding: 12px 15px;
    color: #555;
}

/* Action Links */
.dashboard table tbody td a {
    color: #2196F3;
    text-decoration: none;
    margin-right: 10px;
}
.dashboard table tbody td a:hover {
    text-decoration: underline;
}




.view-post p {
    width: 800px;
    margin: 25px auto;
    font-size: 18px;
}
.post-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.listings {
    display: grid;
    gap: 16px;
    max-width: 700px;
    margin: 0 auto;
}

.listing-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 1px 2px 5px #5e59bb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.listing-card:hover {
    transform: translateY(-3px);
    box-shadow: 1px 2px 5px #0e965d;
}

.listing-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
}

.listing-address {
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
    line-height: 1.4;
}

.listing-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
}

.distance, .time {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: bold;
}

.back-link {
    display: inline-block;
    margin: 20px auto;
    text-decoration: none;
    color: #4CAF50;
    font-weight: bold;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #388E3C;
}
.copyright-box {
    background: #89dbff;
    width: 400px;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    line-height: 1.5;
    border-radius: 10px;
    margin: 50px auto;
}
.copyright-box a {
    color: #5f1919;
}

/* Footer */
footer {
  background: linear-gradient(135deg, #4e73df, #1cc88a);
  color: white;
  text-align: center;
  padding: 15px 0;
  margin-top: 40px;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.2s;
}
.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px 0 20px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #222;
  color: #fff;
  font-size: 20px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.footer-social a:hover {
  transform: translateY(-5px);
  background: linear-gradient(135deg, #ff4b2b, #ff416c);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}


/* Responsive: mobile */

@media (max-width: 900px) {

    .view-post p {
        width: 95%;
    }

}


@media (max-width: 768px) {
  .menu {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: #05457c;
    flex-direction: column;
    padding: 10px 0;
    gap: 0;
    border-top: 1px solid white;
    border-bottom: 1px solid white;
  }

  .menu li {
    border-top: 1px solid #444;
  }

  .menu li:first-child {
    border-top: none;
  }

  .menu li a {
    display: block;
    padding: 12px 20px;
    color: white;
  }

  .nav-container.active .menu {
    display: flex;
  }

  .hamburger {
    display: flex;
  }
  
    .dashboard table, .dashboard thead, .dashboard tbody, 
    .dashboard th, .dashboard td, .dashboard tr {
        display: block;
        width: 100%;
    }

    .dashboard table thead {
        display: none; /* hide header */
    }

    .dashboard table tbody tr {
        background: #fff;
        margin-bottom: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        padding: 12px;
    }

    .dashboard table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 8px 12px;
        border: none;
        font-size: 14px;
    }

    .dashboard table tbody td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #333;
        flex-basis: 40%;
    }

    .dashboard table tbody td span {
        flex-basis: 60%;
        text-align: right;
    }

    .dashboard table tbody td a {
        margin: 0 5px;
        display: inline-block;
    }
    .features, .posts-grid {
        flex-direction: column;
        align-items: center;
    }
    .post-card {
        flex: none;
    }
}
@media (max-width: 715px) {
    
    .listing-card {
        margin-right: 10px;
        margin-left: 10px;
    }
}

@media (max-width: 660px) {

    .layer-2 h2 {
        width: 95%;
    }
}

@media (max-width: 600px) {
    .posts-grid {
        width: 95%;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
      .app-title {
        font-size: 2rem;
      }
    
      form {
        padding: 20px;
      }
      section h2,
      .locations-card a,
      .place-type-card a {
        width: 97%;
      }
    .card-listing-btn,
    section h1,
    .copyright-box {
        width: 97%;
    }

}