暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

navbar.css 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. :root {
  2. --shadow-small: 0 1px 3px 0 rgba(0, 0, 0, 0.1),
  3. 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  4. --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
  5. 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  6. --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
  7. 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  8. --color: #063f6f;
  9. --color2: #161d27;
  10. --color2-dark: #0f131a;
  11. }
  12. *,
  13. *::before,
  14. *::after {
  15. padding: 0;
  16. margin: 0;
  17. box-sizing: border-box;
  18. list-style: none;
  19. list-style-type: none;
  20. text-decoration: none;
  21. -webkit-font-smoothing: antialiased;
  22. -moz-osx-font-smoothing: grayscale;
  23. text-rendering: optimizeLegibility;
  24. }
  25. html {
  26. scroll-behavior: smooth;
  27. height: -webkit-fill-available;
  28. }
  29. body {
  30. font-family: "Inter", sans-serif;
  31. font-size: 14px;
  32. font-weight: 400;
  33. line-height: 1.4;
  34. color: #000;
  35. background-color: #fff;
  36. transition: 0.35s;
  37. }
  38. body.darkmode {
  39. color: #fff;
  40. background-color: var(--color2-dark);
  41. }
  42. main {
  43. overflow: hidden;
  44. }
  45. a,
  46. button {
  47. cursor: pointer;
  48. -webkit-user-select: none;
  49. -moz-user-select: none;
  50. -ms-user-select: none;
  51. user-select: none;
  52. border: none;
  53. outline: none;
  54. background: none;
  55. }
  56. img,
  57. video {
  58. display: block;
  59. max-width: 100%;
  60. height: auto;
  61. -o-object-fit: cover;
  62. object-fit: cover;
  63. }
  64. img {
  65. image-rendering: -webkit-optimize-contrast;
  66. image-rendering: -moz-crisp-edges;
  67. image-rendering: crisp-edges;
  68. }
  69. @-webkit-keyframes slideLeft {
  70. 0% {
  71. opacity: 0;
  72. transform: translateX(100%);
  73. }
  74. 100% {
  75. opacity: 1;
  76. transform: translateX(0%);
  77. }
  78. }
  79. @keyframes slideLeft {
  80. 0% {
  81. opacity: 0;
  82. transform: translateX(100%);
  83. }
  84. 100% {
  85. opacity: 1;
  86. transform: translateX(0%);
  87. }
  88. }
  89. @-webkit-keyframes slideRight {
  90. 0% {
  91. opacity: 1;
  92. transform: translateX(0%);
  93. }
  94. 100% {
  95. opacity: 0;
  96. transform: translateX(100%);
  97. }
  98. }
  99. @keyframes slideRight {
  100. 0% {
  101. opacity: 1;
  102. transform: translateX(0%);
  103. }
  104. 100% {
  105. opacity: 0;
  106. transform: translateX(100%);
  107. }
  108. }
  109. .section {
  110. margin: 0 auto;
  111. padding: 6rem 0 2rem;
  112. }
  113. .container {
  114. /* max-width: 75rem; */
  115. height: auto;
  116. margin-inline: auto;
  117. padding-inline: 1.5rem;
  118. }
  119. .centered {
  120. text-align: center;
  121. vertical-align: middle;
  122. margin-bottom: 1rem;
  123. }
  124. .header {
  125. position: fixed;
  126. top: 0;
  127. left: 0;
  128. width: 100%;
  129. height: auto;
  130. z-index: 100;
  131. margin: 0 auto;
  132. background-color: #fff;
  133. box-shadow: var(--shadow-medium);
  134. }
  135. .darkmode .header {
  136. background-color: var(--color2);
  137. }
  138. .navbar {
  139. display: flex;
  140. flex-wrap: wrap;
  141. align-content: center;
  142. align-items: center;
  143. justify-content: center;
  144. width: 100%;
  145. height: 100px;
  146. margin: 0 auto;
  147. }
  148. .navbar .navbar__left {
  149. display: flex;
  150. align-items: center;
  151. flex: 0 0 17%;
  152. }
  153. @media (max-width: 766px) {
  154. .navbar .navbar__left {
  155. flex: 0 0 auto;
  156. }
  157. }
  158. .navbar .navbar__center {
  159. display: flex;
  160. }
  161. @media (max-width: 766px) {
  162. .navbar .navbar__center {
  163. flex: 0 0 100%;
  164. order: 3;
  165. align-items: center;
  166. }
  167. }
  168. .navbar .navbar__right {
  169. display: flex;
  170. flex: 0 0 17%;
  171. align-items: center;
  172. justify-content: flex-end;
  173. -moz-column-gap: 1.5rem;
  174. column-gap: 1.5rem;
  175. }
  176. @media (max-width: 766px) {
  177. .navbar .navbar__right {
  178. flex: 0 0 auto;
  179. align-items: center;
  180. }
  181. .brand img {
  182. max-width: 200px;
  183. }
  184. }
  185. .brand {
  186. display: flex;
  187. align-items: center;
  188. order: 1;
  189. }
  190. .brand svg {
  191. width: 60px;
  192. height: 60px;
  193. }
  194. @media (max-width: 766px) {
  195. .menu {
  196. position: fixed;
  197. top: 0;
  198. left: 0;
  199. width: 350px;
  200. max-width: 85%;
  201. height: 100%;
  202. z-index: 100;
  203. overflow: hidden;
  204. background-color: #fff;
  205. transform: translate(-100%);
  206. transition: all 0.4s ease-in-out;
  207. }
  208. .menu.is-active {
  209. transform: translate(0%);
  210. }
  211. .darkmode .menu {
  212. background-color: var(--color2);
  213. }
  214. }
  215. .menu .menu__header {
  216. display: none;
  217. box-shadow: var(--shadow-medium);
  218. }
  219. @media (max-width: 766px) {
  220. .menu .menu__header {
  221. position: relative;
  222. top: 0;
  223. display: flex;
  224. align-items: center;
  225. justify-content: flex-start;
  226. height: 4rem;
  227. z-index: 110;
  228. visibility: hidden;
  229. background: transparent;
  230. }
  231. .menu .menu__header.is-active {
  232. visibility: visible;
  233. background-color: #fff;
  234. }
  235. .menu .menu__header.is-active > .menu__arrow {
  236. display: flex;
  237. }
  238. .darkmode .menu .menu__header.is-active {
  239. background-color: var(--color2);
  240. }
  241. }
  242. @media (max-width: 766px) {
  243. .menu .menu__header .menu__arrow {
  244. display: none;
  245. justify-content: center;
  246. align-items: center;
  247. cursor: pointer;
  248. width: 3rem;
  249. }
  250. .menu .menu__header .menu__arrow:hover i {
  251. color: var(--color);
  252. }
  253. .menu .menu__header .menu__arrow > i {
  254. font-size: 1.5rem;
  255. color: #000;
  256. transition: all 0.25s ease;
  257. }
  258. .darkmode .menu .menu__header .menu__arrow > i {
  259. color: #fff;
  260. }
  261. }
  262. @media (max-width: 766px) {
  263. .menu .menu__header .menu__title {
  264. cursor: pointer;
  265. font-weight: 500;
  266. text-transform: capitalize;
  267. color: #000;
  268. transition: all 0.25s ease;
  269. }
  270. .menu .menu__header .menu__title:hover {
  271. color: var(--color);
  272. }
  273. .darkmode .menu .menu__header .menu__title {
  274. color: #fff;
  275. }
  276. }
  277. @media (max-width: 766px) {
  278. .menu .menu__inner {
  279. height: 100%;
  280. margin-top: -3rem;
  281. overflow-y: auto;
  282. overflow-x: hidden;
  283. }
  284. }
  285. .menu .menu__inner .menu__item {
  286. position: static;
  287. display: inline-block;
  288. padding-right: 20px;
  289. padding: 15px 25px 15px 0;
  290. }
  291. .menu .menu__inner .menu__item:last-child {
  292. padding-right: 0;
  293. }
  294. .menu .menu__inner .menu__item:hover > .menu__link {
  295. color: var(--color);
  296. }
  297. .darkmode .menu .menu__inner .menu__item:hover > .menu__link {
  298. color: var(--color);
  299. }
  300. @media (max-width: 766px) {
  301. .menu .menu__inner .menu__item {
  302. display: block;
  303. padding: 0;
  304. }
  305. }
  306. @media (min-width: 767px) {
  307. .menu .menu__inner .menu__item:hover > .menu__link i {
  308. transform: rotate(-90deg);
  309. }
  310. }
  311. @media (min-width: 767px) {
  312. .menu .menu__inner .menu__item.menu__dropdown:hover > .submenu {
  313. opacity: 1;
  314. visibility: visible;
  315. top: 95%;
  316. }
  317. }
  318. .menu .menu__inner .menu__item .menu__link {
  319. display: flex;
  320. align-items: center;
  321. justify-content: center;
  322. cursor: pointer;
  323. font-size: 16px;
  324. font-weight: 500;
  325. color: #000;
  326. text-transform: capitalize;
  327. transition: all 0.25s ease;
  328. }
  329. @media (max-width: 766px) {
  330. .menu .menu__inner .menu__item .menu__link {
  331. justify-content: space-between;
  332. padding: 20px;
  333. }
  334. }
  335. .menu .menu__inner .menu__item .menu__link > i {
  336. margin-left: 5px;
  337. font-size: 1.35rem;
  338. transform: rotate(90deg);
  339. transition: 0.35s;
  340. }
  341. @media (max-width: 766px) {
  342. .menu .menu__inner .menu__item .menu__link > i {
  343. margin-left: 10px;
  344. transform: rotate(0deg);
  345. }
  346. }
  347. .darkmode .menu .menu__inner .menu__item .menu__link {
  348. color: #fff;
  349. }
  350. .submenu {
  351. position: absolute;
  352. z-index: 100;
  353. top: 110%;
  354. left: 50%;
  355. width: 100%;
  356. height: auto;
  357. padding: 20px 15px;
  358. border-radius: 0.25rem;
  359. border-top: 2px solid var(--color);
  360. background-color: #fff;
  361. box-shadow: var(--shadow-medium);
  362. opacity: 0;
  363. visibility: hidden;
  364. transition: all 0.35s ease-in-out;
  365. transform: translateX(-50%);
  366. }
  367. .darkmode .submenu {
  368. border-top: 2px solid var(--color);
  369. background-color: var(--color2);
  370. }
  371. @media (max-width: 766px) {
  372. .submenu {
  373. position: absolute;
  374. display: none;
  375. top: 0;
  376. left: 0;
  377. width: 100%;
  378. height: 100%;
  379. max-width: none;
  380. min-width: auto;
  381. margin: 0;
  382. padding: 100px 15px 0 15px;
  383. border-radius: 0;
  384. border-top: 0;
  385. box-shadow: none;
  386. opacity: 1;
  387. overflow-y: auto;
  388. visibility: visible;
  389. transform: translateX(0%);
  390. }
  391. .submenu.is-active {
  392. display: block;
  393. }
  394. }
  395. @media (min-width: 767px) {
  396. .submenu {
  397. -webkit-animation: none !important;
  398. animation: none !important;
  399. }
  400. }
  401. @media (min-width: 767px) {
  402. .submenu.megamenu__normal {
  403. left: 65%;
  404. max-width: 250px;
  405. width: 100%;
  406. height: auto;
  407. margin: 0 auto;
  408. }
  409. .submenu.megamenu__normal.process {
  410. left: 48%;
  411. }
  412. }
  413. @media (min-width: 767px) {
  414. .submenu.megamenu__text, .submenu.megamenu__image {
  415. display: flex;
  416. flex-wrap: wrap;
  417. max-width: 95%;
  418. height: auto;
  419. margin: 0 auto;
  420. justify-content: space-around;
  421. }
  422. }
  423. @media (min-width: 975px) {
  424. .submenu.megamenu__text, .submenu.megamenu__image {
  425. max-width: 992px;
  426. }
  427. }
  428. .submenu.megamenu__image .submenu__inner a {
  429. display: flex;
  430. flex-flow: column;
  431. align-items: center;
  432. }
  433. @media (max-width: 766px) {
  434. .submenu.megamenu__image .submenu__inner a {
  435. flex-flow: row;
  436. align-items: center;
  437. padding-bottom: 20px;
  438. }
  439. }
  440. .submenu.megamenu__image .submenu__inner a img {
  441. display: block;
  442. width: 100%;
  443. height: 150px;
  444. margin-bottom: 15px;
  445. -o-object-fit: cover;
  446. object-fit: cover;
  447. border-radius: 10px;
  448. }
  449. @media (max-width: 766px) {
  450. .submenu.megamenu__image .submenu__inner a img {
  451. width: 30%;
  452. height: 80px;
  453. margin-bottom: 0;
  454. margin-right: 15px;
  455. }
  456. }
  457. .submenu .submenu__inner {
  458. /* width: 25%; */
  459. padding: 0 15px;
  460. }
  461. @media (max-width: 766px) {
  462. .submenu .submenu__inner {
  463. width: 100%;
  464. padding: 0;
  465. }
  466. }
  467. .submenu .submenu__inner .submenu__title {
  468. font-size: 16px;
  469. font-weight: 500;
  470. color: var(--color);
  471. text-transform: uppercase;
  472. margin-left: 30px;
  473. transition: all 0.3s ease;
  474. }
  475. .darkmode .submenu .submenu__inner .submenu__title {
  476. color: var(--color);
  477. }
  478. @media (max-width: 766px) {
  479. .submenu .submenu__list {
  480. margin-bottom: 20px;
  481. }
  482. }
  483. .submenu .submenu__list li {
  484. display: block;
  485. line-height: 1;
  486. margin: 0 auto;
  487. }
  488. .submenu .submenu__list li a {
  489. display: inline-block;
  490. padding: 10px 0;
  491. line-height: 1.4;
  492. text-transform: capitalize;
  493. color: #000;
  494. transition: all 0.25s ease-in-out;
  495. }
  496. .submenu .submenu__list li a:hover {
  497. color: var(--color);
  498. }
  499. @media (max-width: 766px) {
  500. .submenu .submenu__list li a {
  501. display: block;
  502. }
  503. }
  504. .darkmode .submenu .submenu__list li a {
  505. color: #fff;
  506. }
  507. .darkmode .submenu .submenu__list li a:hover {
  508. color: var(--color);
  509. }
  510. .switch {
  511. position: relative;
  512. display: block;
  513. cursor: pointer;
  514. -webkit-user-select: none;
  515. -moz-user-select: none;
  516. -ms-user-select: none;
  517. user-select: none;
  518. margin-right: 10px;
  519. }
  520. .switch .switch__light,
  521. .switch .switch__dark {
  522. position: absolute;
  523. top: 50%;
  524. left: 50%;
  525. transform-origin: center;
  526. transform: translate(-50%, -50%);
  527. transition: all 0.3s ease-in;
  528. }
  529. .switch .switch__light {
  530. font-size: 20px;
  531. visibility: visible;
  532. color: #000;
  533. }
  534. .darkmode .switch .switch__light {
  535. font-size: 0;
  536. visibility: hidden;
  537. }
  538. .switch .switch__dark {
  539. font-size: 0;
  540. visibility: hidden;
  541. color: #fff;
  542. }
  543. .darkmode .switch .switch__dark {
  544. font-size: 20px;
  545. visibility: visible;
  546. }
  547. .overlay {
  548. position: fixed;
  549. display: block;
  550. top: 0;
  551. left: 0;
  552. width: 100%;
  553. height: 100%;
  554. z-index: 9;
  555. opacity: 0;
  556. visibility: hidden;
  557. background-color: rgba(0, 0, 0, 0.7);
  558. transition: all 0.45s ease-in-out;
  559. pointer-events: none;
  560. }
  561. @media (max-width: 766px) {
  562. .overlay {
  563. cursor: url("https://i.imgur.com/cPh9Zm5.png"), zoom-out;
  564. pointer-events: visible;
  565. }
  566. .overlay.is-active {
  567. opacity: 1;
  568. visibility: visible;
  569. }
  570. }
  571. .burger {
  572. position: relative;
  573. display: block;
  574. cursor: pointer;
  575. width: 25px;
  576. height: 15px;
  577. margin-right: 15px;
  578. opacity: 0;
  579. visibility: hidden;
  580. background: transparent;
  581. }
  582. @media (max-width: 766px) {
  583. .burger {
  584. opacity: 1;
  585. visibility: visible;
  586. }
  587. }
  588. .burger .burger-line {
  589. position: absolute;
  590. display: block;
  591. left: 0;
  592. width: 100%;
  593. height: 2px;
  594. opacity: 1;
  595. border-radius: 15px;
  596. background: #000;
  597. }
  598. .darkmode .burger .burger-line {
  599. background: #fff;
  600. }
  601. .burger .burger-line:nth-child(1) {
  602. top: 0px;
  603. }
  604. .burger .burger-line:nth-child(2) {
  605. top: 8px;
  606. width: 70%;
  607. }
  608. .burger .burger-line:nth-child(3) {
  609. top: 16px;
  610. }