:root {
  --primary: #4a7043;       /* forest green */
  --accent: #c0ed6e;         /* light green from your original */
  --dark: #2c2c2c;
  --light: #f8f8f8;
  --wood: #8b5a2b;
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
}
header {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../../images/header.jpg') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 20px 20px 20px;
}
header h1 {
  font-size: 5.5rem;
  margin-bottom: 0.5rem;
  font-family: gagalin;
  color: #C0ED6E;
}
header p {
  font-size: 2.0rem;
  margin-bottom: 1.5rem;
}
.highlight { color: var(--accent); }

.cont { max-width: 1200px; 
  margin: 0 auto; 
  padding: 5px 5px;
  
}

.container { max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 20px;
  text-align: left;
}
section { padding: 60px 0; }
h2 { text-align: center; font-size: 2.8rem; margin-bottom: 2rem; color: var(--primary); }
.about { background: white; text-align: center; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.service-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}
.service-card:hover { transform: translateY(-10px); }
.service-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.service-card h3 {
  padding: 1.2rem;
  background: var(--primary);
  color: white;
  height: 48px;
  text-align: center;
  font-size: 1.4rem;
}
.experience {
  background: var(--wood);
  color: white;
  text-align: center;
}
.experience h2 { color: white; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.gallery img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
footer {
  background: var(--dark);
  color: white;
  text-align: center;
  padding: 5px 5px;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--dark);
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 1.5rem;
  transition: background 0.3s;
}
.btn:hover { background: #a8d44e; }
@media (max-width: 768px) {
  header h1 { font-size: 2.8rem; }
  header p { font-size: 1.3rem; }
  h2 { font-size: 2.2rem; }
}

.admin-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--dark);
  padding: 5px 25px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  font-size: 10px;
  margin-top: 1.0rem;
  transition: background 0.3s;
}
.admin-btn:hover { background: #a8d44e; }

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  font-size: 1.1rem;
}
.pagination a, .pagination span {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  background: #eee;
  color: var(--dark);
  transition: all 0.2s;
}
.pagination a:hover {
  background: var(--primary);
  color: white;
}
.pagination .active {
  background: var(--primary);
  color: white;
  font-weight: bold;
}
.pagination .disabled {
  background: #ddd;
  color: #aaa;
  cursor: not-allowed;
}
.per-page {
  margin: 0 1.5rem;
}
.per-page select {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.gallery-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  cursor: pointer;
}
.gallery-card:hover { transform: translateY(-10px); }
.gallery-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.gallery-card h3 {
  padding: 1.2rem;
  background: var(--primary);
  color: white;
  text-align: center;
  font-size: 1.4rem;
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
}
.modal-content {
  max-width: 90%;
  max-height: 90%;
}
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover { color: #bbb; }

form { background: white; padding: 2.5rem; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
label { display: block; margin: 1rem 0 0.4rem; font-weight: bold; }
input, textarea {
  width: 100%;
  padding: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}
textarea { height: 140px; resize: vertical; }
button {
  background: var(--accent);
  color: var(--dark);
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: background 0.3s;
}
button:hover { background: #a8d44e; }
.success { color: green; font-size: 1.4rem; text-align: center; margin: 2rem 0; }
.error { color: red; font-size: 1.2rem; text-align: center; margin: 1rem 0; }
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  max-width: 500px;
  text-align: center;
}
.close-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 1.5rem;
}

/* Tooltip container - keeps positioning relative */
.tooltip-container {
    position: relative;
    display: inline-block;
}

/* The tooltip text itself */
.tooltip {
    visibility: hidden;
    width: auto;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 10;
    bottom: 100%;              /* Positions above the icon */
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;       /* Space between tooltip and icon */
    white-space: nowrap;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* Arrow (triangle) pointing down */
.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;                 /* Below the tooltip box */
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Show on hover */
.tooltip-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);  /* Slight lift-up animation */
}

a[href^="mailto:"] {
    color: #1e88e5;          /* Nice blue */
    text-decoration: underline;
}
a[href^="mailto:"]:hover {
    color: #1565c0;
    text-decoration: none;
}

.header-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;           /* space between buttons */
  margin-top: 1.5rem;
}

.header-buttons .btn {
  flex: 1 1 220px;       /* allows buttons to grow/shrink but keeps minimum width */
  min-width: 220px;      /* prevents buttons from becoming too narrow */
  text-align: center;
  white-space: nowrap;   /* keeps text on one line */
}

/* On very small screens, make them full-width and stacked */
@media (max-width: 600px) {
  .header-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .header-buttons .btn {
    flex: 1 1 auto;
    min-width: unset;
  }
}

/* ────────────────────────────────────────────────
   Admin Tables & CRUD Styling
───────────────────────────────────────────────── */

.admin-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

.admin-form {
  background: #f9fafb;
  padding: 1.8rem;
  border-radius: 10px;
  margin-bottom: 2.5rem;
  border: 1px solid #e5e7eb;
}

.admin-form label {
  display: block;
  margin: 1.2rem 0 0.5rem;
  font-weight: 600;
  color: var(--dark);
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form select,
.admin-form input[type="file"] {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.admin-form input:focus,
.admin-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74,112,67,0.15);
}

.admin-form button {
  margin-top: 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s;
}

.admin-form button:hover {
  background: #3e5f38;
  transform: translateY(-1px);
}

/* ── Admin Table ── */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.admin-table th,
.admin-table td {
  padding: 1.1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.admin-table th {
  background: var(--primary);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover {
  background: #f8fafc;
}

.admin-table img {
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  object-fit: cover;
}

/* Action links */
.admin-table .actions a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  margin-right: 0.8rem;
  transition: color 0.2s;
}

.admin-table .actions a:hover {
  color: #2e4a2a;
  text-decoration: underline;
}

.admin-table .actions a.delete {
  color: #c2410c;
}

.admin-table .actions a.delete:hover {
  color: #9a3412;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .admin-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tr {
    display: block;
    margin-bottom: 1.2rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: white;
  }

  .admin-table td {
    display: block;
    text-align: right;
    position: relative;
    padding-left: 50%;
    border: none;
    border-bottom: 1px solid #f3f4f6;
  }

  .admin-table td:last-child {
    border-bottom: none;
  }

  .admin-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 1.2rem;
    width: 45%;
    font-weight: 600;
    text-align: left;
    color: var(--dark);
  }

  .admin-table td.actions {
    text-align: center;
    padding: 1rem;
  }
}

/* Password form styling */
.password-form {
  max-width: 420px;
  margin: 6rem auto;
  padding: 2.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  text-align: center;
}

.password-form h2 {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.password-form input[type="password"] {
  margin-bottom: 1.2rem;
}

/* Smaller image previews in admin_colors.php */
.admin-table img {
  max-width: 120px !important;
  height: auto;
  max-height: 120px;          /* prevents very tall images from stretching */
  object-fit: cover;          /* crops nicely if aspect ratio differs */
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Even smaller in the edit form "Current Image" preview */
.admin-form img {
  max-width: 120px !important;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 8px;
}