/* --- 1. Global Reset & Base --- */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #eeedf4;
  color: #09020b; 
  line-height: 1.6;
}

.container {
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- 2. MANDATORY FIELDS --- */
.mandatory::after {
  content: " *";
  color: #ff0000;
  font-weight: bold;
}

/* --- 3. TRIO-ROW LOGIC (Restored Original) --- */
.trio-row { 
  display: flex; 
  gap: 15px; 
  margin-bottom: 15px; 
}

.trio-row .input-group { 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
}

.single-row { 
  margin-bottom: 15px; 
  display: flex; 
  flex-direction: column; 
}

/* --- 4. INPUTS & LABELS (Restored Dark Lettering) --- */
label {
  font-size: 0.95rem;
  color: #09020b;      /* Dark/bold lettering as requested */
  font-weight: 600;
  margin-bottom: 4px;  
  display: block;
}

input[type="text"], 
input[type="email"], 
input[type="tel"], 
input[type="number"],
select, 
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px; 
  font-size: 1rem;
  margin: 0;
  background-color: #fff;
  color: #000;
}

/* Light helper text back to faint grey */
::placeholder {
  color: #b0b0b0 !important; 
  opacity: 1;
}

/* --- 5. ENHANCED HEADER (Blue Accents) --- */
header {
  background: #333;
  color: #fff;
  padding: 20px 0;
  border-bottom: 6px solid #0038b8; /* Blue brand line */
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; 
  gap: 15px;
}

header h1 {
  margin: 0;
  font-weight: 400;
  font-size: 1.8rem;
  border-inline-start: 4px solid #0038b8; /* Blue accent next to title */
  padding-inline-start: 15px;
}

.logo-area img {
  height: 85px;
  width: auto;
}

/* --- 6. NAVIGATION & LANGUAGE --- */
nav {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #444;
}
/* Container for the nav links */
.nav-flex {
  display: flex;
  align-items: center;
  width: 100%;
}
/* Pushes the Admin link to the opposite side */
.admin-nav-link {
  margin-inline-start: auto; 
  font-size: 0.85rem;
  color: #666; /* Subtle color so it doesn't distract from main actions */
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.admin-nav-link:hover {
  color: #0038b8;
  border-color: #0038b8;
  background-color: rgba(0, 56, 184, 0.05);
}
header a {
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 500;
}

header a:hover {
  color: #0038b8;
}

/* Language selector with blue border and rounded style */
.lang-select {
  border: 2px solid #0038b8 !important;
  border-radius: 20px !important;
  padding: 5px 15px !important;
  font-weight: 600;
  color: #0038b8;
  cursor: pointer;
  background-color: white;
}

/* --- 7. FORMS & PILL BUTTONS --- */
form {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin: 20px 0;
}

fieldset { 
  margin-top: 25px; 
  border-radius: 6px; 
  padding: 20px; 
  border: 1px solid #ddd; 
}

legend {
  font-weight: bold;
  padding: 0 10px;
  color: #0038b8; /* Section titles in blue */
}

/* Pill-shaped buttons with blue theme */
button, .btn {
  background: #0038b8; 
  color: #fff;
  padding: 12px 35px;
  border: none;
  border-radius: 40px; /* Fully rounded multimedia style */
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 56, 184, 0.2);
  text-decoration: none;
  display: inline-block;
}

button:hover, .btn:hover {
  background: #222; /* Darker shift on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}
/* --- Multimedia Remove Button (Red Pill) --- */
.btn-danger {
  background-color: #dc3545; /* Modern Red */
  color: #ffffff;
  border: none;
  padding: 8px 22px;        /* Slightly more compact than the Add button */
  border-radius: 40px;      /* Pill shape to match the Add button */
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 5px rgba(220, 53, 69, 0.15);
  
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Optional: Add a small 'x' icon before the text */
.btn-danger::before {
  content: "×"; 
  font-size: 1.2rem;
  line-height: 0;
  margin-bottom: 2px;
}

.btn-danger:hover {
  background-color: #c82333; /* Darker red on hover */
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(220, 53, 69, 0.25);
}

.btn-danger:active {
  transform: translateY(0);
}

/* --- 8. CATEGORY GRID --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 15px;
}

.category-card {
  background: #fdfdfd;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 30px; /* Rounded card style */
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-card label {
  margin-bottom: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: #333;
}
/* --- Fix for Spread Out Date Boxes --- */
.triple-input {
  display: flex;
  gap: 8px; 
  width: fit-content; /* This stops it from stretching to 100% */
  max-width: 250px;    /* Keeps the group compact */
}

.triple-input input {
  padding: 10px 5px !important;
  text-align: center;
  width: 60px !important; /* Forces the box to be a small square/rectangle */
}

.triple-input .year {
  width: 90px !important; /* Gives the Year a little more room */
}

/* Ensure the label and group stay aligned */
.date-entry-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Keeps everything left-aligned (or right for Hebrew) */
}
/* --- Multimedia Add Button (Compact Pill) --- */
.btn-add {
  background-color: #28a745; 
  color: #ffffff;
  border: none;
  padding: 12px 30px;      /* Comfortable horizontal padding */
  min-width: 180px;        /* Ensures it's not too tiny */
  width: fit-content;      /* Only as wide as the content needs */
  border-radius: 40px;     /* Multimedia Pill Shape */
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(40, 167, 69, 0.15);
  
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* The single plus icon */
.btn-add::before {
  content: "";
  font-size: 1.3rem;
  font-weight: bold;
}

.btn-add:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(40, 167, 69, 0.25);
}

.btn-add:active {
  transform: translateY(0);
}
/* Style for the 'Choose File' button inside the row */
.file-wrapper button {
  background-color: #333;
  color: white;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  border: none;
}
/* --- 9. MOBILE FIXES --- */
@media (max-width: 768px) {
  .trio-row { 
    flex-direction: column; 
    gap: 0; 
  }
  
  .header-flex { 
    flex-direction: column-reverse; 
    text-align: center; 
  }

  header h1 { 
    border-inline-start: none; 
    padding: 0; 
  }

  .category-grid { 
    grid-template-columns: 1fr; 
  }
  
  .table-container {
    overflow-x: auto;
    display: block;
    width: 100%;
  }
}