/* ===================================
   SHARED LAYOUT STYLES - RD ELECTRONICS
   ================================== */

/* BASE STYLES */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 0;
  font-family: 'Poppins', sans-serif;
}

/* NAVBAR STYLES - PREMIUM ENHANCEMENT */
.navbar-brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.logo-img {
  height: 55px;
  width: 55px;
  margin-right: 15px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(30, 90, 168, 0.3);
  transition: all 0.4s ease;
  border: 3px solid rgba(255, 107, 53, 0.2);
}

.navbar-brand:hover .logo-img {
  box-shadow: 0 8px 30px rgba(30, 90, 168, 0.4);
  transform: rotate(5deg) scale(1.1);
}

.brand-text {
  color: #1e5aa8;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(30, 90, 168, 0.1);
  background: linear-gradient(135deg, #1e5aa8 0%, #ff6b35 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar {
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.98) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(30, 90, 168, 0.1);
  transition: all 0.3s ease;
  padding: 1rem 0;
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.navbar-nav .nav-link {
  font-weight: 600;
  color: #2c3e50;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.8rem 1.2rem;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.navbar-nav .nav-link:not(.dropdown-toggle)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(135deg, #1e5aa8 0%, #ff6b35 100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.navbar-nav .nav-link:not(.dropdown-toggle)::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background: linear-gradient(135deg, #ff6b35 0%, #1e5aa8 100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.navbar-nav .nav-link:not(.dropdown-toggle):hover::before,
.navbar-nav .nav-link:not(.dropdown-toggle).active::before {
  width: 100%;
}

.navbar-nav .nav-link:not(.dropdown-toggle):hover::after,
.navbar-nav .nav-link:not(.dropdown-toggle).active::after {
  width: 80%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #1e5aa8;
  transform: translateY(-2px);
}

/* DROPDOWN STYLES - PREMIUM ENHANCEMENT */
.dropdown-menu {
  border: none;
  box-shadow: 0 15px 50px rgba(0,0,0,0.15);
  border-radius: 15px;
  padding: 1.5rem 0;
  min-width: 320px;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(30, 90, 168, 0.1);
  margin-top: 10px !important;
  z-index: 1050;
  position: absolute;
  top: 100%;
  left: 0;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(255,255,255,0.98);
}

.dropdown-header {
  color: #1e5aa8;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 1rem 2rem 0.8rem;
  border-bottom: 2px solid rgba(30, 90, 168, 0.1);
  margin-bottom: 0.8rem;
  position: relative;
}

.dropdown-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 2rem;
  width: 30px;
  height: 2px;
  background: linear-gradient(135deg, #1e5aa8 0%, #ff6b35 100%);
}

.dropdown-item {
  padding: 1rem 2rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0;
  position: relative;
  color: #2c3e50;
  overflow: hidden;
  margin: 0 0.5rem;
}

.dropdown-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(135deg, #1e5aa8 0%, #ff6b35 100%);
  transition: width 0.3s ease;
}

.dropdown-item:hover::before {
  width: 4px;
}

.dropdown-item:hover {
  background: linear-gradient(135deg, rgba(30, 90, 168, 0.05) 0%, rgba(255, 107, 53, 0.05) 100%);
  color: #1e5aa8;
  transform: translateX(8px);
  padding-left: 2.5rem;
}

.dropdown-item i {
  color: #ff6b35;
  width: 24px;
  margin-right: 12px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.dropdown-item:hover i {
  color: #1e5aa8;
  transform: scale(1.2);
}

.dropdown-divider {
  margin: 1rem 0;
  border-color: rgba(30, 90, 168, 0.1);
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(30, 90, 168, 0.1) 50%, transparent 100%);
  border: none;
}

/* TOP INFO BAR - PREMIUM ENHANCEMENT */
.top-info-bar {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 2px solid rgba(30, 90, 168, 0.2);
  position: relative;
  overflow: hidden;
}

.top-info-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.top-info-bar a {
  color: white;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.top-info-bar a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ff6b35;
  transition: width 0.3s ease;
}

.top-info-bar a:hover {
  color: #ff6b35;
  transform: translateY(-1px);
}

.top-info-bar a:hover::after {
  width: 100%;
}

.top-info-bar i {
  color: #ff6b35;
  margin-right: 8px;
  transition: all 0.3s ease;
}

.top-info-bar a:hover i {
  transform: scale(1.2);
}

/* FOOTER STYLES */
.main-footer {
  background: linear-gradient(135deg, #343a40 0%, #495057 100%);
  color: white;
  margin-top: auto;
}

.footer-brand {
  color: #ff6b35;
  font-weight: 700;
}

.footer-links a {
  color: #adb5bd;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #ff6b35;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-right: 10px;
}

.footer-social a:hover {
  background: #ff6b35;
  transform: translateY(-2px);
}

/* RESPONSIVE NAVBAR */
@media (max-width: 991.98px) {
  .navbar-nav .nav-item {
    margin: 0.25rem 0;
  }
  
  .navbar-nav .nav-link::after {
    display: none;
  }
  
  .logo-img {
    height: 40px;
    width: 40px;
  }
  
  .brand-text {
    font-size: 1.1rem;
  }
  
  .dropdown-menu {
    min-width: 250px;
  }
}

/* FORM STYLES */
.form-floating > .form-control-plaintext::placeholder, 
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, 
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* FOCUS STYLES */
.btn:focus, 
.btn:active:focus, 
.btn-link.nav-link:focus, 
.form-control:focus, 
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(30, 90, 168, 0.25);
}

/* BRAND INFO ENHANCEMENT */
.brand-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand-tagline {
  font-size: 0.7rem;
  color: #6c757d;
  font-weight: 500;
  letter-spacing: 0.3px;
  /*margin-top: px;*/
  text-transform: uppercase;
  opacity: 0.8;
}

/* CTA BUTTONS ENHANCEMENT */
.cta-btn {
  border-radius: 25px !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.cta-btn:hover::before {
  left: 100%;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* NAVBAR TOGGLER ENHANCEMENT */
.navbar-toggler {
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.navbar-toggler:hover {
  background: rgba(30, 90, 168, 0.1);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2830, 90, 168, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* RESPONSIVE BRAND ADJUSTMENTS */
@media (max-width: 991.98px) {
  .brand-text {
    font-size: 1.2rem;
  }
  
  .brand-tagline {
    font-size: 0.65rem;
  }
  
  .logo-img {
    height: 45px;
    width: 45px;
  }
  
  .navbar-nav .nav-link {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
  
  .cta-btn {
    margin: 0.5rem 0;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .top-info-bar {
    font-size: 0.75rem;
  }
  
  .brand-text {
    font-size: 1rem;
  }
  
  .brand-tagline {
    display: none;
  }
  
  .logo-img {
    height: 40px;
    width: 40px;
  }
}

/* SCROLL BEHAVIOR */
.navbar.scrolled .logo-img {
  height: 45px;
  width: 45px;
}

.navbar.scrolled .brand-text {
  font-size: 1.2rem;
}

.navbar.scrolled .brand-tagline {
  font-size: 0.65rem;
}