/* Estilos personalizados para SEO Tools App */

:root {
  --primary-color: #df2f54;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --info-color: #b7ecf5;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --sidebar-width: 280px;
}

/* Layout */
body {
  background-color: #f8f9fa;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: .9rem;
}

.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
}

.bg-info {
  background-color: var(--info-color) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

/* Sidebar */
.sidebar {
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  background: var(--primary-color);
  color: white;
  min-height: 100vh;
  transition: all 0.3s;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
  margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar .sidebar-header {
  padding: 20px;
  background: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .sidebar-header h3 {
  color: white;
  margin: 0;
  font-weight: 600;
  font-size: 1.3rem;
}

.sidebar .sidebar-header p {
  color: rgba(255, 255, 255, 0.8);
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

/* Navigation */
.sidebar ul.components {
  padding: 0;
  border-bottom: 1px solid var(--light-color);
}

.sidebar ul li {
  list-style: none;
}

.sidebar li ul li {
  padding-left: 10px;
  padding-right: 10px;
}

.sidebar ul li a {
  padding: 15px 10px;
  font-size: .9rem;
  display: block;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.sidebar ul li a:hover {
  color: white;
  background: rgba(10, 10, 10, 0.1);
  border-left-color: white;
}

.sidebar ul li a.active {
  color: white;
  background: rgba(10, 10, 10, 0.1);
  border-left-color: #ffc107;
}

.sidebar ul li a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

/* Navigation Groups */
.nav-section {
  margin-bottom: 5px;
}

.nav-section-header {
  padding: 12px 15px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.95) !important;
  background: transparent !important;
  margin: 0 10px !important;
  border-left: 3px solid transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-section-header:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-left-color: rgba(255, 255, 255, 0.5) !important;
}

.nav-section-header[aria-expanded="true"] {
  background: transparent;
  border-left-color: #ffc107 !important;
}

.nav-section-header[aria-expanded="true"] .fa-chevron-down {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

.nav-section-header .fa-chevron-down {
  transition: transform 0.3s ease;
  font-size: 0.8rem;
  opacity: 0.7;
}

.nav-sub-link {
  padding: 12px 15px 12px 20px !important;
  font-size: 0.85rem !important;
  color: rgba(255, 255, 255, 0.8) !important;
  margin: 0 !important;
  border-left: 3px solid transparent !important;
  position: relative;
}

.nav-sub-link:hover {
  color: white !important;
  background: rgba(10, 10, 10, 0.1) !important;
  border-left-color: rgba(255, 255, 255, 0.4) !important;
}

.nav-sub-link.active {
  color: white !important;
  border-left-color: #ffc107 !important;
}

.nav-sub-link i {
  margin-right: 8px !important;
  width: 16px !important;
  font-size: 0.9rem;
}

/* Collapse animation */
.collapse {
  transition: height 0.3s ease;
}

/* Content */
.h-60 {
  height: 60px;
}

.content {
  width: 100%;
  padding: 0;
  min-height: 100vh;
}

.main-content {
  padding: 20px;
}

/* Header */
.top-navbar {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 15px 30px;
  border-bottom: 1px solid #dee2e6;
}

.top-navbar .navbar-brand {
  font-weight: 600;
  color: var(--dark-color);
}

.top-navbar .btn-toggle-sidebar {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--dark-color);
  padding: 5px 10px;
  border-radius: 5px;
  transition: all 0.3s;
}

.top-navbar .btn-toggle-sidebar:hover {
  background-color: var(--light-color);
}

/* Navbar Menu */
.navbar-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-menu-link {
  color: var(--dark-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 5px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.nav-menu-link:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu-link i {
  font-size: 0.85rem;
}

/* Responsive Menu - Mobile */
@media (max-width: 768px) {
  .navbar-clock {
    display: none !important;
  }

  .nav-menu-link-desktop {
    display: none !important;
  }

  .navbar-menu {
    gap: 0.5rem;
  }

  .nav-menu-link {
    font-size: 0.85rem;
    padding: 6px 10px;
  }

  .top-navbar {
    padding: 12px 15px;
  }
}

/* Module Container */
.module-container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-top: 0;
  min-height: 500px;
}

.module-container .module-header {
  border-bottom: 2px solid var(--light-color);
  padding-bottom: 15px;
  margin-bottom: 25px;
}

.module-container .module-header h2 {
  color: var(--dark-color);
  font-size: 1.6rem;
  margin: 0;
  font-weight: 600;
}

.module-container .module-header p {
  color: var(--secondary-color);
  margin: 5px 0 0 0;
}

/* Forms */
.form-label {
  font-weight: 600;
  color: var(--dark-color);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 8px;
}

.form-control {
  font-size: 0.9rem;
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 12px 15px;
  transition: all 0.3s;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control-color {
  padding: 5px;
}

.form-select {
  font-size: 0.9rem;
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 10px 15px;
  transition: all 0.3s;
}

/* Card */
.card-header {
  border-bottom: 0;
}

/* Buttons */
.btn {
  border-radius: 8px;
  padding: 10px 15px 9px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s;
}

.btn.btn-sm {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--primary-color);
  border: none;
  color: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--dark-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(223, 45, 84, 0.22);
  color: #fff;
  outline: none;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.btn-primary:disabled,
.btn-primary[disabled] {
  opacity: 0.6;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-outline-primary {
  background: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline-primary:hover {
  background: transparent;
  border-color: var(--dark-color) !important;
  color: var(--dark-color);
}

.btn-check:checked+.btn,
.btn.active,
.btn.show,
.btn:first-child:active,
:not(.btn-check)+.btn:active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.btn-check:checked+.btn:hover,
.btn.active:hover,
.btn.show:hover,
.btn:first-child:active:hover,
:not(.btn-check)+.btn:active:hover {
  background: var(--dark-color);
  color: #fff !important;
  border-color: var(--dark-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Results */
.result-container {
  background: var(--light-color);
  border-radius: 8px;
  padding: 0 10px 10px 10px;
}

.result-container .result-item {
  padding: 10px 0;
  border-bottom: 1px solid #dee2e6;
}

.result-container .result-item:last-child {
  border-bottom: none;
}

.result-container .result-label {
  font-weight: 600;
  color: var(--dark-color);
}

.result-container .result-value {
  color: var(--primary-color);
  font-family: 'Courier New', monospace;
  font-weight: 700;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
}

.loading .spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Welcome Screen */
.welcome-screen {
  text-align: center;
  padding: 60px 20px;
  color: var(--secondary-color);
}

.welcome-screen i {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.welcome-screen h2 {
  color: var(--dark-color);
  margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .btn {
    padding: 8px 10px 7px 10px;
    font-size: 0.8rem;
  }

  .sidebar {
    margin-left: calc(-1 * var(--sidebar-width));
  }

  .sidebar.active {
    margin-left: 0;
  }

  .main-content {
    padding: 20px 15px;
  }

  .module-container {
    padding: 20px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Utilities */
.text-gradient {
  background: var(--primary-color);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-header {
  padding: 15px;
}

.card-title {
  font-size: medium;
  font-weight: 600;
  color: var(--dark-color);
}

.card-hover {
  transition: all 0.3s;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}