:root {
  --primary: #8b0001;
  --primary-dark: #660001;
  --primary-light: #b30001;
  --accent: #d16800;
  --accent-light: #ff7f00;
  --dark: #1a1a1a;
  --gray-900: #212529;
  --gray-800: #343a40;
  --gray-700: #495057;
  --gray-600: #6c757d;
  --gray-500: #adb5bd;
  --gray-400: #ced4da;
  --gray-300: #dee2e6;
  --gray-200: #e9ecef;
  --gray-100: #f8f9fa;
  --white: #ffffff;
  --light: #f8f9fa;
}

/* Global Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.75rem; }
h3 { font-size: 2.25rem; }
h4 { font-size: 1.75rem; }
h5 { font-size: 1.5rem; }
h6 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--gray-600);
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--gray-600);
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Buttons */
.btn {
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 12px;
  border: none;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  display: inline-block;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 15px rgba(139, 0, 1, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 0, 1, 0.4);
  color: white;
  text-decoration: none;
}

.btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(139, 0, 1, 0.25);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 0, 1, 0.3);
  text-decoration: none;
  border-color: var(--primary);
}

.btn-light {
  background: white;
  color: var(--gray-800);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-light:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  color: var(--gray-800);
  text-decoration: none;
}

.btn-outline-light {
  border: 2px solid white;
  color: white;
  background: transparent;
}

.btn-outline-light:hover {
  background: white;
  color: var(--gray-800);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* Navigation */
.premium-nav {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  padding: 1.5rem 0;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1040;
}

.premium-nav .navbar-brand {
  text-decoration: none;
}

.brand-name {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
  display: none;
  line-height: 1;
}

@media (min-width: 992px) {
  .brand-name {
    display: block;
  }
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--gray-600);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
  display: block;
}

.premium-nav .navbar-toggler {
  border: none;
  padding: 0.5rem;
  background: none;
  position: relative;
  z-index: 1041;
}

.premium-nav .navbar-toggler span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--gray-700);
  margin: 5px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.premium-nav .nav-link {
  font-weight: 500;
  color: var(--gray-700) !important;
  padding: 0.75rem 1.25rem !important;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1041;
}

.premium-nav .nav-link:hover {
  color: var(--primary) !important;
  background: rgba(139, 0, 1, 0.05);
  text-decoration: none;
}

.premium-nav .nav-link.active {
  color: var(--primary) !important;
  background: rgba(139, 0, 1, 0.1);
}

/* Dropdown Fixes */
.navbar-nav .nav-item.dropdown {
  position: relative;
  z-index: 1041;
}

.dropdown-toggle {
  position: relative;
  z-index: 1041;
}

.navbar-nav .dropdown-menu {
  z-index: 1055 !important;
  position: absolute !important;
}

.premium-dropdown {
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.98);
  padding: 1rem 0;
  margin-top: 0.5rem;
  z-index: 1055 !important;
  position: absolute !important;
}

.premium-dropdown .dropdown-item {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  margin: 0.25rem 1rem;
  transition: all 0.3s ease;
  font-weight: 500;
  color: var(--gray-700);
  position: relative;
  z-index: 1056;
}

.premium-dropdown .dropdown-item:hover {
  background: rgba(139, 0, 1, 0.08);
  color: var(--primary);
  transform: translateX(8px);
  text-decoration: none;
}

/* Logo */
#logo {
  width: 80px;
  height: 80px;
  transition: all 0.3s ease;
}

/* Alerts */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
    max-width: 400px;
    width: 100%;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    padding: 20px;
    border-left: 4px solid;
    position: relative;
    pointer-events: auto;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(400px);
    opacity: 0;
}

.toast.success {
    border-left-color: #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(255, 255, 255, 0.95));
}

.toast.danger, .toast.error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(255, 255, 255, 0.95));
}

.toast.info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(255, 255, 255, 0.95));
}

.toast.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(255, 255, 255, 0.95));
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.toast.success .toast-icon {
    background: #22c55e;
}

.toast.danger .toast-icon, .toast.error .toast-icon {
    background: #ef4444;
}

.toast.info .toast-icon {
    background: #3b82f6;
}

.toast.warning .toast-icon {
    background: #f59e0b;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    font-weight: 500;
}

.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    color: #374151;
    background: rgba(0, 0, 0, 0.05);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 16px 16px;
    transform-origin: left;
    animation: progressBar 5s linear forwards;
}

.toast.success .toast-progress {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.toast.danger .toast-progress, .toast.error .toast-progress {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.toast.info .toast-progress {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.toast.warning .toast-progress {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

@keyframes progressBar {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        margin-bottom: 8px;
        padding: 16px;
        transform: translateY(-100px);
    }

    .toast.show {
        transform: translateY(0);
    }

    .toast.hide {
        transform: translateY(-100px);
    }
}

@media (max-width: 480px) {
    .toast {
        padding: 14px;
        border-radius: 12px;
    }

    .toast-message {
        font-size: 13px;
    }

    .toast-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
}

/* Content Wrapper Z-Index Fix */
.wrapper, .content {
  position: relative;
  z-index: 1;
}

.hero-section, .main-content {
  position: relative;
  z-index: 1;
}

/* Footer Styles */
.bg-light-gradient {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-premium {
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.border-radius-premium {
  border-radius: 20px;
}

/* Animation Classes */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in-up.delay-1 { animation-delay: 0.2s; }
.fade-in-up.delay-2 { animation-delay: 0.4s; }
.fade-in-up.delay-3 { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Selection */
::selection {
  background: rgba(139, 0, 1, 0.2);
  color: var(--primary);
}

::-moz-selection {
  background: rgba(139, 0, 1, 0.2);
  color: var(--primary);
}

/* Responsive Design */
@media (max-width: 992px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 2rem; }

  .brand-name {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .premium-nav {
    padding: 1rem 0;
  }

  .brand-name {
    font-size: 1.4rem;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.75rem; }
  h4 { font-size: 1.5rem; }

  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  #logo {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 576px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }

  .brand-tagline {
    display: none;
  }

  #logo {
    width: 50px;
    height: 50px;
  }

  .premium-nav .nav-link {
    padding: 0.5rem 1rem !important;
  }
}

footer {
  background: linear-gradient(135deg, #8b0001 0%, #660001 100%) !important;
  border-top: 2px solid #ffffff;
  color: white;
  padding: 40px 20px 20px;
  position: relative;
  z-index: 1;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.03)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.03)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  pointer-events: none;
}

footer .container {
  position: relative;
  z-index: 2;
}

footer h3, footer h5, footer h4 {
  color: white !important;
  margin-bottom: 1.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}

footer p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

/* Footer Menu Styles */
#footer-menu, footer ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#footer-menu li, footer ul li {
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

#footer-menu a, .white-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-block;
  position: relative;
}

#footer-menu a::before, .white-link::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  transition: width 0.3s ease;
}

#footer-menu a:hover, .white-link:hover {
  color: white;
  text-decoration: none;
  transform: translateX(5px);
}

#footer-menu a:hover::before, .white-link:hover::before {
  width: 100%;
}

/* Social Media Icons */
#footer-social {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
}

#footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  text-decoration: none;
}

#footer-social i {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
  margin: 0;
  transition: all 0.3s ease;
}

#footer-social a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#footer-social a:hover i {
  color: white;
  transform: scale(1.1);
}

/* Fixed Newsletter Form with Proper Input Width */

/* Newsletter Form */
.newsletter-form {
  margin-top: 1rem;
  width: 100%;
}

.newsletter-form .input-group {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  width: 100%;
}

.newsletter-form .form-control {
  border: none;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--gray-800);
  font-weight: 500;
  flex: 1;
  border-radius: 0;
  width: 100%;
  min-width: 0; /* Important for flex */
}

.newsletter-form .form-control:focus {
  box-shadow: none;
  background: white;
  outline: none;
  border: none;
}

.newsletter-form .form-control::placeholder {
  color: var(--gray-500);
  font-weight: 400;
}

.newsletter-form .btn {
  border: none;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transition: all 0.3s ease;
  border-radius: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.newsletter-form .btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: none;
  color: white;
}

/* Mobile Newsletter Form Fix */
@media (max-width: 768px) {
  .newsletter-form {
    width: 100%;
    max-width: none;
  }
  
  .newsletter-form .input-group {
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    display: block; /* Change to block for mobile */
  }
  
  .newsletter-form .form-control {
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    display: block;
    box-sizing: border-box;
  }
  
  .newsletter-form .btn {
    border-radius: 0 0 12px 12px;
    border-top: none;
    padding: 1rem 1.5rem;
    width: 100%;
    display: block;
    box-sizing: border-box;
  }
}

@media (max-width: 576px) {
  .newsletter-form .input-group {
    border-radius: 10px;
    width: 100%;
  }
  
  .newsletter-form .form-control {
    padding: 0.75rem 1rem;
    border-radius: 10px 10px 0 0;
    font-size: 0.9rem;
    width: 100%;
  }
  
  .newsletter-form .btn {
    padding: 0.75rem 1rem;
    border-radius: 0 0 10px 10px;
    font-size: 0.9rem;
    width: 100%;
  }
}

/* Alternative Stacked Layout for Very Small Screens */
@media (max-width: 480px) {
  .newsletter-form {
    width: 100%;
  }
  
  .newsletter-form .input-group {
    flex-direction: column;
    gap: 8px;
    background: none;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    width: 100%;
    display: block;
  }
  
  .newsletter-form .form-control {
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
    display: block;
    box-sizing: border-box;
  }
  
  .newsletter-form .form-control:focus {
    border-color: rgba(255, 255, 255, 0.6);
  }
  
  .newsletter-form .btn {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    display: block;
    box-sizing: border-box;
  }
  
  .newsletter-form .btn:hover {
    background: white;
    color: var(--primary-dark);
    border-color: white;
  }
}

/* Footer CTA */
.footer-cta {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
}

.footer-cta .btn {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.footer-cta .btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
}

.footer-cta .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
  transform: translateY(-1px);
}

.footer-cta .btn-light {
  background: rgba(255, 255, 255, 0.95);
  color: var(--gray-800);
  border: none;
}

.footer-cta .btn-light:hover {
  background: white;
  color: var(--gray-900);
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Contact Info Icons */
footer p i {
  color: rgba(255, 255, 255, 0.8);
  width: 20px;
  text-align: center;
}

/* Bottom Footer */
footer hr {
  border-color: rgba(255, 255, 255, 0.2) !important;
  margin: 30px 0 20px !important;
}

#copyright {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

@media (max-width: 992px) {
    footer {
        padding: 30px 15px 15px;
    }

    footer h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    #footer-social {
        justify-content: center;
        margin: 1rem 0;
    }

    .footer-cta {
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    footer {
        text-align: center;
    }

    footer .col-lg-3,
    footer .col-lg-2,
    footer .col-md-6 {
        margin-bottom: 2rem;
    }

    #footer-logo {
        display: flex;
        justify-content: center;
        margin-bottom: 1rem;
    }

    #footer-menu a, .white-link {
        font-size: 0.9rem;
    }

    #footer-social {
        gap: 0.75rem;
    }

    #footer-social a {
        width: 45px;
        height: 45px;
    }

    #footer-social i {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    footer {
        padding: 25px 10px 10px;
    }

    footer h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    footer p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    #footer-menu a, .white-link {
        font-size: 0.85rem;
    }

    #footer-social a {
        width: 40px;
        height: 40px;
    }

    #footer-social i {
        font-size: 1.1rem;
    }

    .footer-cta .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    #copyright {
        font-size: 0.8rem;
        text-align: center;
    }

    footer .row.align-items-center {
        text-align: center;
    }

    footer .col-md-4.text-md-end {
        text-align: center !important;
        margin-top: 1rem;
    }
}
