/* Modern UI CSS for Helpdesk App */

:root {
  --primary-color: #0284c7;
  --primary-hover: #0369a1;
  --secondary-color: #475569;
  --light-bg: #f8fafc;
  --dark-bg: #0f172a;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #0ea5e9;
  --border-radius: 0.5rem;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --soft-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --transition: all 0.2s ease;
  --container-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Global Styles */
body {
  font-family: 'Inter', 'Source Sans Pro', sans-serif;
  background-color: #f9fafb;
  color: #1f2937;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Animations and Effects */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
}

.hover-shadow {
  transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: #0f172a;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* Navigation Bar */
.site-header {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  background-color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.5rem 0;
}

.navbar {
  padding: 0.5rem 0;
}

.navbar-brand {
  padding: 0;
}

.navbar-brand img {
  max-height: 45px;
  width: auto;
  transition: var(--transition);
}

.navbar-light .navbar-nav .nav-link {
  color: var(--secondary-color);
  font-weight: 500;
  padding: 0.625rem 1rem;
  transition: var(--transition);
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  position: relative;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
  color: var(--primary-color);
}

.navbar-light .navbar-nav .nav-link:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-light .navbar-nav .nav-link:hover:after {
  width: 30px;
}

.navbar-light .navbar-nav .active > .nav-link {
  color: var(--primary-color);
  font-weight: 600;
}

.navbar-light .navbar-nav .active > .nav-link:after {
  width: 30px;
}

/* Dropdown styling */
.dropdown-menu {
  border: none;
  box-shadow: var(--container-shadow);
  border-radius: var(--border-radius);
  padding: 0.75rem 0.5rem;
  margin-top: 0.5rem;
  min-width: 12rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  border-radius: 0.25rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  transition: var(--transition);
  color: var(--secondary-color);
  font-weight: 500;
}

.dropdown-item:hover, 
.dropdown-item:focus {
  background-color: rgba(2, 132, 199, 0.06);
  color: var(--primary-color);
}

.navbar-nav .dropdown-toggle::after {
  margin-left: 0.4em;
  vertical-align: 0.15em;
  border-top-width: 0.3em;
}

/* Search Box */
.site-search {
  margin: 2rem auto 2.5rem;
  max-width: 800px;
  position: relative;
}

.site-search .container {
  position: relative;
}

.search-form {
  position: relative;
  z-index: 1;
}

.search-field {
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem !important;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: var(--soft-shadow);
  background-color: white;
}

.search-field:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
  outline: none;
}

.search-field::placeholder {
  color: #94a3b8;
  font-size: 0.95rem;
}

.btn-search {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.btn-search:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-search i {
  font-size: 0.875rem;
}

/* Search animation */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(2, 132, 199, 0); }
  100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

.search-field:focus {
  animation: pulse 2s infinite;
}

/* Cards */
.card {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
  overflow: hidden;
  height: 100%;
  background-color: white;
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-body {
  padding: 1.75rem;
}

.card-title {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark-bg);
  font-size: 1.25rem;
}

/* Feature Cards */
.feature-card {
  text-align: center;
  padding: 2rem 1.5rem;
  transition: all 0.3s ease;
  border-radius: 1rem;
  background-color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.feature-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-color);
  z-index: 2;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.5s ease;
}

.feature-card:hover:before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-card i,
.feature-card svg {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.feature-card:hover i,
.feature-card:hover svg {
  transform: scale(1.1);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--secondary-color);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  border-radius: var(--border-radius);
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  z-index: -1;
  transform: scale(0);
  transition: transform 0.5s ease;
  border-radius: inherit;
}

.btn:hover::before {
  transform: scale(1);
}

.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(2, 132, 199, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.2);
}

.btn-custom {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}

.btn-custom:hover {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(2, 132, 199, 0.3);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background-color: transparent;
}

.btn-outline-primary:hover {
  background-color: rgba(2, 132, 199, 0.05);
  color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
}

/* Social Media Buttons */
.btn-social {
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.35rem;
  transition: all 0.3s ease;
  color: white !important;
  position: relative;
  overflow: hidden;
  border: none;
}

.btn-social:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0);
  transition: all 0.3s ease;
  border-radius: 50%;
}

.btn-social:hover:before {
  transform: scale(1);
}

.btn-social:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-social i {
  font-size: 1rem;
  position: relative;
  z-index: 2;
}

.site-social ul {
  margin: 0;
  padding: 0;
}

/* Footer */
.site-footer {
  background-color: white;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);
  position: relative;
}

.site-footer:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--info-color));
}

.site-footer .section-title {
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--dark-bg);
  position: relative;
  padding-bottom: 0.75rem;
}

.site-footer .section-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

.site-footer .textwidget p {
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.site-footer .textwidget a {
  color: var(--primary-color);
  font-weight: 500;
  transition: var(--transition);
}

.site-footer .textwidget a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.site-info {
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 2rem;
}

/* Login Form */
.login-form {
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  margin-top: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.login-form .form-control {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.login-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.login-form .form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #334155;
}

.login-form .form-check-label {
  font-size: 0.9rem;
  color: #475569;
}

.login-form .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.login-form .btn-primary {
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 1rem;
}

.separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.separator-text {
  padding: 0 1rem;
  color: #64748b;
  font-size: 0.9rem;
}

/* Homepage Cards */
.feature-card {
  text-align: center;
  padding: 1.5rem;
  transition: var(--transition);
  border-radius: var(--border-radius);
  background-color: white;
  box-shadow: var(--box-shadow);
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* User Profile */
.user-data {
  padding: 1.5rem;
  text-align: center;
}

#user_avatar {
  border-radius: 50%;
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.banner-title {
  margin: 0.75rem 0;
  font-weight: 600;
}

/* Alerts */
.alert {
  border-radius: var(--border-radius);
  border: none;
  padding: 1rem 1.25rem;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #065f46;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #991b1b;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #92400e;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .site-search {
    margin: 1.5rem 0;
  }
  
  .navbar-brand img {
    max-height: 40px;
  }
  
  .feature-card {
    margin-bottom: 1.5rem;
  }
  
  .navbar-collapse {
    background-color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
  }
  
  .navbar-light .navbar-nav .nav-link:after {
    display: none;
  }
  
  .navbar-nav .dropdown-menu {
    box-shadow: none;
    border: 1px solid #e5e7eb;
    padding: 0.5rem;
    margin-left: 1rem;
  }
  
  .site-footer {
    padding: 3rem 0 1.5rem;
  }
  
  .site-footer .section {
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 0.5rem 0;
  }
  
  .site-search {
    margin: 1rem 0;
  }
  
  .search-field {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
  
  .btn-search {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
  }
  
  .login-form {
    padding: 1.5rem;
  }
  
  .card {
    margin-bottom: 1.5rem;
  }
  
  .site-footer {
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
  }
  
  .site-footer .section-title {
    margin-bottom: 1rem;
  }
  
  .site-info, .site-social {
    text-align: center !important;
  }
  
  .site-social ul {
    justify-content: center !important;
    margin-top: 1rem;
  }
}

@media (max-width: 576px) {
  .navbar-brand img {
    max-height: 35px;
  }
  
  .site-search {
    margin: 0.75rem 0;
  }
  
  .btn-search {
    padding: 0.625rem;
    min-width: 50px;
  }
  
  .search-text {
    display: none;
  }
  
  .btn-search i {
    font-size: 0.9rem;
    margin: 0 auto;
  }
  
  .card-body {
    padding: 1.25rem;
  }
  
  .feature-card {
    padding: 1.5rem 1rem;
  }
  
  .feature-card i,
  .feature-card svg {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .feature-card h3 {
    font-size: 1.1rem;
  }
  
  .btn-social {
    width: 34px;
    height: 34px;
    margin: 0 0.25rem;
  }
}
