/* Legrand branding */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Roboto:wght@300;400;500&display=swap");

body {
  font-family: "Roboto", sans-serif;
  background-color: #ffffff;
  color: #000000;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
}

/* Homepage specific styles */
.homepage-title {
  color: #000000;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
}

.homepage-subtitle {
  font-size: 1.5rem;
  font-weight: 400;
  color: #555;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.05);
}

.btn {
  border-radius: 8px;
  text-transform: uppercase;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 0.5rem 1.5rem;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #004085;
  border-color: #004085;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #00376e;
  border-color: #00376e;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 64, 133, 0.3);
}

/* Navbar styling - white background */
.navbar {
  background-color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand,
.nav-link {
  color: #000000 !important;
}

.nav-link:hover {
  color: #d5393a !important;
}

footer {
  background-color: #ffffff !important;
  color: #000000;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

/* Profile grid styling */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Responsive grid adjustments */
@media (max-width: 992px) {
  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

/* Profile card animations */
.profile-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 64, 133, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  background-color: #ffffff;
  border: 2px solid #a8c7ed;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 64, 133, 0.15);
  border-color: #004085;
}

.profile-card:hover .profile-image {
  transform: scale(1.05);
}

.profile-card a {
  color: #000000;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.profile-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.profile-card .card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background-color: #ffffff;
  border-top: 1px solid rgba(0, 64, 133, 0.1);
}

.profile-card h5 {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #004085;
  font-size: 1.2rem;
  text-shadow: 1px 1px 1px rgba(0, 64, 133, 0.1);
}

.profile-card p {
  color: #666;
  margin-bottom: 0;
  font-size: 0.95rem;
}

.card-excerpt {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #555;
  min-height: 80px;
}

.author-info {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  text-align: right;
  border-top: 1px solid #eee;
  padding-top: 0.5rem;
}

.profile-card .btn-outline-primary {
  border-color: #004085;
  color: #004085;
  transition: all 0.3s ease;
  background-color: #ffffff;
}

.profile-card .btn-outline-primary:hover {
  background-color: #004085;
  color: white;
}

.profile-detail-image {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
  border-radius: 8px;
}

/* Like button animation */
.like-button {
  color: #d5393a;
  cursor: pointer;
  transition: transform 0.2s, color 0.2s;
}

.like-button:hover {
  transform: scale(1.2);
  color: #ff2a2d;
}

.like-button.liked {
  animation: heart-beat 0.7s ease;
  color: #ff2a2d;
}

@keyframes heart-beat {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.3);
  }
  50% {
    transform: scale(1);
  }
  75% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

/* Form styling */
.form-control {
  border-radius: 8px;
  padding: 0.6rem 1rem;
  border: 1px solid #ced4da;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
  border-color: #d5393a;
  box-shadow: 0 0 0 0.25rem rgba(213, 57, 58, 0.25);
}

/* Form validation styling */
.form-control.is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid {
  border-color: #198754;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875em;
  color: #dc3545;
}

/* Card styling for detail view */
.card {
  border-radius: 12px;
  overflow: hidden;
}

/* Instructions container styling */
.instructions-container {
  border-left: 4px solid #007bff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background-color: #e7f3ff !important;
}

.instructions-container h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.instructions-container .fas {
  color: #007bff !important;
}

.instructions-container p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
  .h1, h1 {
    font-size: calc(1.1rem + 1.5vw);
  }

  .homepage-subtitle {
    font-size: 1rem;
  }
}
