/* Style for Solé 2026 Brand Guidelines */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Raleway:wght@700&display=swap');

:root {
  /* Brand Colors */
  --nautical-navy: #152644;
  --nautical-navy-dark: #13294B;
  --nashville-blue: #8EC8E9;
  --lemony-green: #E2FF65;
  --lemony-green-dark: #D6E965;
  
  /* Theme Colors (Default Light Mode) */
  --primary: var(--nautical-navy);
  --primary-rgb: 21, 38, 68;
  --secondary: var(--nashville-blue);
  --secondary-rgb: 140, 195, 225;
  --accent: var(--lemony-green);
  --accent-dark: var(--lemony-green-dark);
  
  --bg-primary: #F4F7F6;
  --bg-card: #FFFFFF;
  --text-main: #1C273C;
  --text-muted: #50668F;
  --border-color: rgba(21, 38, 68, 0.08);
  --sidebar-bg: #FFFFFF;
  --sidebar-border: rgba(21, 38, 68, 0.06);
  --shadow-color: rgba(21, 38, 68, 0.04);
  
  --card-shadow: 0 10px 30px -10px var(--shadow-color), 0 1px 3px rgba(21, 38, 68, 0.02);
  --hover-shadow: 0 20px 40px -15px rgba(21, 38, 68, 0.08), 0 1px 3px rgba(21, 38, 68, 0.02);
  
  --logo-color: var(--nautical-navy);
  --accent-badge-bg: rgba(226, 255, 101, 0.2);
  --accent-badge-text: var(--nautical-navy-dark);
  
  /* Typography */
  --font-main: 'Montserrat', sans-serif;
  --font-logo: 'Raleway', sans-serif;
  
  /* Interface Sizes */
  --header-height: 80px;
  --sidebar-width: 320px;
  --max-content-width: 900px;
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Dynamic font scale (controlled by JS) */
  --font-scale: 1;
}

/* Dark Mode Theme */
[data-theme="dark"] {
  --primary: var(--nashville-blue);
  --primary-rgb: 140, 195, 225;
  --secondary: var(--lemony-green);
  --secondary-rgb: 226, 255, 101;
  --accent: var(--lemony-green);
  --accent-dark: var(--lemony-green-dark);
  
  --bg-primary: #0A111F;
  --bg-card: #121D31;
  --text-main: #E2E8F0;
  --text-muted: #94A3B8;
  --border-color: rgba(142, 195, 233, 0.12);
  --sidebar-bg: #0F1A2C;
  --sidebar-border: rgba(142, 195, 233, 0.08);
  --shadow-color: rgba(0, 0, 0, 0.2);
  
  --card-shadow: 0 10px 30px -10px var(--shadow-color), 0 1px 2px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.1);
  
  --logo-color: #FFFFFF;
  --accent-badge-bg: rgba(226, 255, 101, 0.1);
  --accent-badge-text: var(--lemony-green);
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(var(--primary-rgb), 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--primary-rgb), 0.3);
}

/* Logo Styles */
.logo-svg {
  cursor: pointer;
}

.logo-text {
  fill: var(--logo-color);
  transition: fill var(--transition-normal);
}

.logo-leaf {
  fill: var(--nashville-blue);
  animation: leafFloat 4s ease-in-out infinite alternate;
  transform-origin: 114px 14px;
}

@keyframes leafFloat {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-2px) rotate(3deg); }
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(var(--primary-rgb), 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

/* Blur overlay for light mode header to feel ultra glassmorphic */
body:not([data-theme="dark"]) .site-header {
  background: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] .site-header {
  background: rgba(18, 29, 49, 0.8);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-color: var(--accent-badge-bg);
  color: var(--accent-badge-text);
  padding: 4px 10px;
  border-radius: 50px;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Buttons */
.btn-icon {
  background: transparent;
  border: 1px solid var(--border-color);
  width: 42px;
  height: 42px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(var(--primary-rgb), 0.05);
  border-color: rgba(var(--primary-rgb), 0.2);
  transform: translateY(-1px);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  fill: none;
  stroke: currentColor;
}

/* Theme Icons Toggle */
[data-theme="dark"] .btn-theme .icon-sun {
  display: block;
}
[data-theme="dark"] .btn-theme .icon-moon {
  display: none;
}
body:not([data-theme="dark"]) .btn-theme .icon-sun {
  display: none;
}
body:not([data-theme="dark"]) .btn-theme .icon-moon {
  display: block;
}

/* Layout */
.main-container {
  display: flex;
  margin-top: var(--header-height);
  flex: 1;
}

/* Sidebar styling */
.sidebar {
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  position: fixed;
  left: 0;
  top: var(--header-height);
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  z-index: 90;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

/* Search bar styling */
.search-container {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  border-radius: var(--border-radius-md);
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: rgba(var(--primary-rgb), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
  background: var(--bg-card);
}

.search-container svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Search Results Floating Panel */
.search-stats {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
  padding: 0 5px;
}

/* Navigation List */
.nav-scroll {
  overflow-y: auto;
  flex: 1;
  margin-right: -15px;
  padding-right: 10px;
}

.navigation-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item-link {
  display: block;
  padding: 10px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 3px solid transparent;
}

.nav-item-link:hover {
  background: rgba(var(--primary-rgb), 0.03);
  color: var(--text-main);
}

.nav-item-link.active {
  background: rgba(var(--primary-rgb), 0.06);
  color: var(--primary);
  font-weight: 700;
  border-left-color: var(--secondary);
  padding-left: 16px;
}

/* Lector Area styling */
.content-area {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.content-wrapper {
  width: 100%;
  max-width: var(--max-content-width);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Cover / Hero Card */
.cover-card {
  background: linear-gradient(135deg, var(--nautical-navy) 0%, #1c3258 100%);
  color: #FFFFFF;
  padding: 60px 50px;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 40px rgba(21, 38, 68, 0.15);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Brand pattern decor for cover */
.cover-card::after {
  content: '';
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--lemony-green) 0%, transparent 60%);
  opacity: 0.12;
  border-radius: 50%;
  pointer-events: none;
}

.cover-card::before {
  content: '';
  position: absolute;
  left: -20px;
  top: -20px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--nashville-blue) 0%, transparent 70%);
  opacity: 0.15;
  border-radius: 50%;
  pointer-events: none;
}

.cover-brand-logo {
  margin-bottom: 20px;
}

.cover-brand-logo .logo-text {
  fill: #FFFFFF;
}

.cover-card h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.cover-meta-item strong {
  color: #FFFFFF;
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

/* Sections Styling */
.policy-section {
  scroll-margin-top: calc(var(--header-height) + 30px);
  padding: 40px;
  border-radius: var(--border-radius-lg);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), background-color var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.policy-section:hover {
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
}

.policy-section h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: baseline;
  gap: 10px;
  letter-spacing: -0.01em;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.policy-section h2 .sec-num {
  font-weight: 500;
  opacity: 0.6;
}

/* Paragraph styling */
.policy-section p {
  color: var(--text-main);
  font-size: calc(0.95rem * var(--font-scale));
  line-height: 1.75;
}

/* Highlight Text */
.highlight-match {
  background-color: rgba(226, 255, 101, 0.6);
  color: #000000 !important;
  font-weight: bold;
  border-radius: 2px;
  padding: 0 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Lists styling */
.bullet-list-alpha, .bullet-list-alpha-paren {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-left: 5px;
}

.bullet-list-alpha li, .bullet-list-alpha-paren li {
  position: relative;
  padding-left: 35px;
  font-size: calc(0.92rem * var(--font-scale));
}

.bullet-list-alpha li strong, .bullet-list-alpha-paren li strong {
  position: absolute;
  left: 0;
  top: 0;
  width: 25px;
  height: 25px;
  background-color: rgba(var(--primary-rgb), 0.05);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.bullet-list-star {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 5px;
}

.bullet-list-star li {
  position: relative;
  padding-left: 28px;
  font-size: calc(0.92rem * var(--font-scale));
}

.bullet-list-star li::before {
  content: '★';
  position: absolute;
  left: 5px;
  top: 1px;
  color: var(--secondary);
  font-size: 0.8rem;
}

/* Section specific styling: Definitions Grid */
.definitions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.definition-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
}

.definition-card:hover {
  border-color: rgba(var(--primary-rgb), 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.04);
}

.def-term-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.def-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--secondary);
}

.def-term {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}

.def-desc {
  font-size: 0.88rem !important;
  color: var(--text-muted) !important;
  line-height: 1.6 !important;
}

.def-extra-text {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Finalidades groups styling */
.finalidad-group {
  margin-top: 15px;
  padding: 25px;
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.finalidad-group-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

/* Sub-sections styling */
.policy-subsection {
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px dashed var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.policy-subsection h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

/* Changes Table styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.table th, .table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background-color: var(--bg-primary);
  color: var(--primary);
  font-weight: 700;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.version-tag {
  background-color: var(--primary);
  color: var(--bg-card);
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
}

.badge-success {
  background-color: rgba(var(--secondary-rgb), 0.15);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 6px;
}

/* Print simulation styling in browser */
.btn-mobile-menu {
  display: none;
}

/* Floating back to top button */
.btn-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--bg-card);
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  border: none;
}

.btn-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn-back-to-top:hover {
  background-color: var(--secondary);
  color: var(--nautical-navy);
  transform: translateY(-2px);
}

.btn-back-to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Footer styling */
.site-footer {
  margin-left: var(--sidebar-width);
  padding: 40px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: background-color var(--transition-normal), border-color var(--transition-normal), color var(--transition-normal);
}

.site-footer p {
  margin-bottom: 5px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 280px;
  }
  .site-header {
    padding: 0 20px;
  }
  .content-area {
    padding: 40px 20px;
  }
}

@media (max-width: 868px) {
  /* Mobile Layout - Sidebar converted to slide drawer */
  .sidebar {
    position: fixed;
    left: -100%;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    width: 300px;
    z-index: 150;
    box-shadow: 15px 0 30px rgba(0,0,0,0.15);
    transition: left var(--transition-normal);
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .sidebar-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 140;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }
  
  .sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
  }
  
  .content-area {
    margin-left: 0;
  }
  
  .site-footer {
    margin-left: 0;
  }
  
  .btn-mobile-menu {
    display: flex;
  }
}

@media (max-width: 480px) {
  .cover-card {
    padding: 35px 25px;
  }
  .cover-card h1 {
    font-size: 1.6rem;
  }
  .policy-section {
    padding: 25px 20px;
  }
  .policy-section h2 {
    font-size: 1.2rem;
  }
  .header-badge {
    display: none; /* Hide document badge on small devices */
  }
}

/* Print Layout Optimization */
@media print {
  body {
    background-color: #FFFFFF;
    color: #000000;
    font-size: 10pt;
    line-height: 1.5;
  }
  
  .site-header,
  .sidebar,
  .sidebar-overlay,
  .btn-back-to-top,
  .header-controls,
  .search-container,
  .btn-mobile-menu {
    display: none !important;
  }
  
  .main-container {
    margin-top: 0;
    display: block;
  }
  
  .content-area {
    margin-left: 0;
    padding: 0;
    width: 100%;
  }
  
  .content-wrapper {
    max-width: 100%;
    gap: 0;
  }
  
  .cover-card {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    padding: 30px;
    box-shadow: none !important;
    page-break-after: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80vh;
  }
  
  .cover-card h1 {
    font-size: 24pt;
    color: #000000 !important;
  }
  
  .cover-brand-logo .logo-text {
    fill: #000000 !important;
  }
  
  .cover-meta {
    border-top: 1px solid #000000;
    color: #000000 !important;
  }
  
  .cover-meta-item strong {
    color: #000000 !important;
  }
  
  .policy-section {
    background-color: #FFFFFF !important;
    border: none !important;
    box-shadow: none !important;
    padding: 20px 0;
    page-break-inside: avoid;
    page-break-after: auto;
  }
  
  .policy-section h2 {
    font-size: 14pt;
    color: #000000 !important;
    border-bottom: 1px solid #000000;
    padding-bottom: 5px;
    page-break-after: avoid;
  }
  
  .policy-section p {
    color: #000000 !important;
  }
  
  .definition-card,
  .finalidad-group {
    background-color: #FFFFFF !important;
    border: 1px solid #000000 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  
  .def-desc,
  .def-term {
    color: #000000 !important;
  }
  
  .bullet-list-alpha li strong,
  .bullet-list-alpha-paren li strong {
    background-color: transparent !important;
    color: #000000 !important;
  }
  
  .bullet-list-star li::before {
    color: #000000 !important;
  }
  
  .table {
    border: 1px solid #000000;
  }
  
  .table th, .table td {
    border: 1px solid #000000;
    color: #000000 !important;
  }
  
  .table th {
    background-color: #F0F0F0 !important;
  }
  
  .site-footer {
    margin-left: 0;
    border-top: 1px solid #000000;
    padding: 20px 0;
    font-size: 8pt;
    color: #000000 !important;
  }
}
