_header.scss 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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. border: 1px solid var(--accent-color);
  91. background: var(--accent-color);
  92. color: #fff;
  93. &:hover {
  94. transform: translateY(-1px);
  95. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  96. }
  97. }
  98. }
  99. // Burger menu button
  100. &__burger {
  101. display: none;
  102. flex-direction: column;
  103. justify-content: space-between;
  104. width: 30px;
  105. height: 24px;
  106. background: transparent;
  107. border: none;
  108. cursor: pointer;
  109. padding: 0;
  110. z-index: 1001;
  111. transition: transform 0.3s ease;
  112. &:hover {
  113. transform: scale(1.1);
  114. }
  115. &-line {
  116. width: 100%;
  117. height: 3px;
  118. background:#fff;
  119. border-radius: 2px;
  120. // background will be set dynamically
  121. transition: all 0.3s ease;
  122. }
  123. // Active state (menu open)
  124. &.active {
  125. .header__burger-line {
  126. &:nth-child(1) {
  127. transform: translateY(10.5px) rotate(45deg);
  128. }
  129. &:nth-child(2) {
  130. opacity: 0;
  131. }
  132. &:nth-child(3) {
  133. transform: translateY(-10.5px) rotate(-45deg);
  134. }
  135. }
  136. }
  137. }
  138. // Tablet styles
  139. @include tablet {
  140. &__menu {
  141. gap: 24px;
  142. }
  143. &__btn {
  144. padding: 8px 16px;
  145. font-size: 13px;
  146. }
  147. }
  148. // Mobile styles
  149. @include mobile {
  150. height: 60px;
  151. &__logo {
  152. width: 150px;
  153. height: 35px;
  154. img {
  155. width: 150px;
  156. height: 35px;
  157. }
  158. }
  159. // Show burger menu
  160. &__burger {
  161. display: flex;
  162. }
  163. // Mobile navigation
  164. &__nav {
  165. position: fixed;
  166. top: 60px;
  167. left: 0;
  168. width: 100%;
  169. height: calc(100vh - 60px);
  170. // background will be set dynamically
  171. transform: translateX(-100%);
  172. transition: transform 0.3s ease;
  173. padding: 40px 20px;
  174. overflow-y: auto;
  175. //backdrop-filter: blur(10px);
  176. @include mobile{
  177. background: var(--body-bg-color);
  178. }
  179. &.active {
  180. transform: translateX(0);
  181. }
  182. }
  183. &__menu {
  184. flex-direction: column;
  185. align-items: center;
  186. width: 100%;;
  187. gap: 24px;
  188. &-link {
  189. font-size: 18px;
  190. @include mobile{
  191. font-size: 16px;
  192. background: var(--body-bg-color);
  193. color:var(--text-color);
  194. }
  195. }
  196. }
  197. &__actions {
  198. gap: 8px;
  199. }
  200. &__btn {
  201. display: none;
  202. }
  203. // Mobile buttons in menu
  204. &__nav.active {
  205. .header__btn {
  206. display: block;
  207. width: calc(100% - 40px);
  208. margin: 0 20px 16px;
  209. }
  210. }
  211. }
  212. }