_header.scss 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. // Header
  2. .header {
  3. position: fixed;
  4. width: 100%;
  5. top: 0;
  6. left: 0;
  7. height: 70px;
  8. z-index: 1000;
  9. background: var(--header-color);
  10. .container {
  11. @include flex(space-between, center);
  12. height: 100%;
  13. gap: 20px;
  14. }
  15. // Logo
  16. &__logo {
  17. width: 190px;
  18. height: 44px;
  19. flex-shrink: 0;
  20. @include flex(center, center);
  21. z-index: 1001;
  22. &-link {
  23. display: inline-block;
  24. line-height: 0;
  25. }
  26. img {
  27. width: 190px;
  28. height: 44px;
  29. display: block;
  30. cursor: pointer;
  31. object-fit: contain;
  32. transition: opacity 0.3s ease;
  33. }
  34. }
  35. // Navigation
  36. &__nav {
  37. flex: 1;
  38. @include flex(center);
  39. }
  40. &__menu {
  41. list-style: none;
  42. margin: 0;
  43. padding: 0;
  44. @include flex(null, center, null, 40px);
  45. &-link {
  46. // color will be set dynamically
  47. text-decoration: none;
  48. font-size: 16px;
  49. font-weight: 500;
  50. transition: opacity 0.3s ease;
  51. color:#fff;
  52. white-space: nowrap;
  53. opacity: 0.9;
  54. &:hover {
  55. opacity: 1;
  56. color:#fff;
  57. }
  58. }
  59. }
  60. // Actions (buttons)
  61. &__actions {
  62. @include flex(null, center, null, 12px);
  63. flex-shrink: 0;
  64. }
  65. &__btn {
  66. border-radius: 6px;
  67. border: 1px solid #FFF;
  68. display: flex;
  69. height: 42px;
  70. padding: 8px 32px;
  71. justify-content: center;
  72. align-items: center;
  73. gap: 8px;
  74. color: #FFF;
  75. font-size: 14px;
  76. font-style: normal;
  77. font-weight: 600;
  78. line-height: normal;
  79. text-transform: uppercase;
  80. background:none;
  81. cursor:pointer;
  82. &--primary {
  83. // background and color will be set dynamically
  84. &:hover {
  85. transform: translateY(-1px);
  86. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  87. }
  88. }
  89. &--secondary {
  90. // background and color will be set dynamically
  91. &:hover {
  92. transform: translateY(-1px);
  93. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  94. }
  95. }
  96. }
  97. // Burger menu button
  98. &__burger {
  99. display: none;
  100. flex-direction: column;
  101. justify-content: space-between;
  102. width: 30px;
  103. height: 24px;
  104. background: transparent;
  105. border: none;
  106. cursor: pointer;
  107. padding: 0;
  108. z-index: 1001;
  109. transition: transform 0.3s ease;
  110. &:hover {
  111. transform: scale(1.1);
  112. }
  113. &-line {
  114. width: 100%;
  115. height: 3px;
  116. background:#fff;
  117. border-radius: 2px;
  118. // background will be set dynamically
  119. transition: all 0.3s ease;
  120. }
  121. // Active state (menu open)
  122. &.active {
  123. .header__burger-line {
  124. &:nth-child(1) {
  125. transform: translateY(10.5px) rotate(45deg);
  126. }
  127. &:nth-child(2) {
  128. opacity: 0;
  129. }
  130. &:nth-child(3) {
  131. transform: translateY(-10.5px) rotate(-45deg);
  132. }
  133. }
  134. }
  135. }
  136. // Tablet styles
  137. @include tablet {
  138. &__menu {
  139. gap: 24px;
  140. }
  141. &__btn {
  142. padding: 8px 16px;
  143. font-size: 13px;
  144. }
  145. }
  146. // Mobile styles
  147. @include mobile {
  148. height: 60px;
  149. &__logo {
  150. width: 150px;
  151. height: 35px;
  152. img {
  153. width: 150px;
  154. height: 35px;
  155. }
  156. }
  157. // Show burger menu
  158. &__burger {
  159. display: flex;
  160. }
  161. // Mobile navigation
  162. &__nav {
  163. position: fixed;
  164. top: 60px;
  165. left: 0;
  166. width: 100%;
  167. height: calc(100vh - 60px);
  168. // background will be set dynamically
  169. transform: translateX(-100%);
  170. transition: transform 0.3s ease;
  171. padding: 40px 20px;
  172. overflow-y: auto;
  173. //backdrop-filter: blur(10px);
  174. @include mobile{
  175. background: var(--body-bg-color);
  176. }
  177. &.active {
  178. transform: translateX(0);
  179. }
  180. }
  181. &__menu {
  182. flex-direction: column;
  183. align-items: center;
  184. width: 100%;;
  185. gap: 24px;
  186. &-link {
  187. font-size: 18px;
  188. @include mobile{
  189. font-size: 16px;
  190. background: var(--body-bg-color);
  191. color:var(--text-color);
  192. }
  193. }
  194. }
  195. &__actions {
  196. gap: 8px;
  197. }
  198. &__btn {
  199. display: none;
  200. }
  201. // Mobile buttons in menu
  202. &__nav.active {
  203. .header__btn {
  204. display: block;
  205. width: calc(100% - 40px);
  206. margin: 0 20px 16px;
  207. }
  208. }
  209. }
  210. }