Untitled
:root { --background-color: #f4f4f4; --text-color: #333333; --nav-background-color: #ffffff; --nav-text-color: #333333; --nav-border-color: #dddddd; --nav-hover-background-color: #e0e0e0; --nav-hover-text-color: #007bff; --footer-background-color: #222222; --footer-text-color: #f4f4f4; } /* Mobile devices (max width: 576px) */ @media only screen and (max-width: 576px) { h1 { font-size: 6vw; padding: 1.5rem; } nav ul { flex-direction: column; align-items: center; padding: 0.5rem; } nav ul li { margin: 0.5rem 0; width: 100%; } .container { flex-direction: column; gap: 1rem; } .card-wrapper { grid-template-columns: 1fr; } .card { padding: 1rem; } img { transform: scale(0.9); } aside { max-width: 100%; margin: 10px; } footer p { font-size: 1.2rem; } } /* Tablets (max width: 768px) */ @media only screen and (max-width: 768px) { h1 { font-size: 5vw; } nav ul { flex-wrap: wrap; padding: 0.8rem; } .card-wrapper { grid-template-columns: repeat(2, 1fr); } .card { padding: 1.2rem; } img { transform: scale(0.95); } aside { max-width: 80%; } } /* Small desktops (max width: 992px) */ @media only screen and (max-width: 992px) { h1 { font-size: 4.5vw; } nav ul li { margin: 0.8rem 1rem; } .card-wrapper { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } .card { padding: 1.5rem; } img { transform: scale(1); } aside { max-width: 60%; } } /* Medium desktops (max width: 1200px) */ @media only screen and (max-width: 1200px) { h1 { font-size: 4vw; } .card-wrapper { grid-template-columns: repeat(3, 1fr); } .container { gap: 1.2rem; } img { transform: scale(1); } aside { max-width: 50%; } } * { margin: 0; padding: 0; box-sizing: border-box; } html, body { height: 100%; } body { display: flex; flex-direction: column; min-height: 100%; } main { flex: 1; } header { margin-top: 0; background-color: var(--background-color); padding: 1.5rem 2rem; text-align: center; box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.2); } nav ul { display: flex; background-color: var(--nav-background-color); color: var(--nav-text-color); padding: 1rem; list-style-type: none; justify-content: space-between; border-bottom: 0.4rem solid var(--nav-border-color); } nav ul li { text-align: center; margin: 0 1.5rem; padding: 1rem; border-radius: 0.5rem; transition: background-color 0.3s ease, transform 0.3s ease; } nav ul li:hover { background-color: var(--nav-hover-background-color); transform: scale(1.1); } nav ul li a { text-decoration: none; color: var(--nav-text-color); font-size: 1.8rem; transition: color 0.3s ease; } nav ul li a:hover { color: var(--nav-hover-text-color); } h1 { font-size: 4vw; font-weight: bold; text-align: center; color: #2c3e50; background-color: #ecf0f1; padding: 2rem; margin-bottom: 2rem; text-transform: uppercase; letter-spacing: 0.1rem; border-radius: 1rem; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); transition: all 0.4s ease; } h1:hover { color: #fff; background-image: linear-gradient(var(--nav-hover-text-color), rgb(9, 137, 243)); transform: scale(1.05); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); } .container{ display: flex; flex-wrap: wrap; justify-content: space-between; align-items: stretch; gap: 1rem; } .card-wrapper{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; } .card { display: flex; flex-direction: column; border: 1px solid #ddd; border-radius: 0.5rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); padding: 1.5rem; background-color: #fff; transition: box-shadow 0.3s ease, transform 0.3s ease; } img { max-width: 100%; height: auto; border-radius: 10px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); display: block; margin: 0 auto; transform: scale(.8); transition: transform 0.3s ease, box-shadow 0.3s ease; } img:hover { transform: scale(1); box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2); } img:active { transform: scale(0.95); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } .card:hover { box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2); transform: translateY(-4px); } .card-title { font-size: 1.5rem; margin-bottom: 1rem; } .card-text { font-size: 1rem; color: #666; } .language-toggle { background-color: #4CAF50; /* Green background */ color: white; /* White text */ font-size: 16px; /* Font size */ padding: 10px 20px; /* Padding for the button */ border: none; /* Remove borders */ border-radius: 25px; /* Rounded corners */ cursor: pointer; /* Pointer cursor on hover */ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */ transition: all 0.3s ease; /* Smooth transitions for hover effects */ position: absolute; /* Positioning for top-right corner */ top: 20px; right: 20px; } .language-toggle:hover { background-color: #45a049; /* Slightly darker green on hover */ transform: scale(1.05); /* Slight zoom effect */ } .language-toggle:active { background-color: #3e8e41; /* Even darker green on click */ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Reduce shadow on click */ transform: scale(0.98); /* Slight compression on click */ } .btn { margin-top: 1rem; background-color: #fff; text-decoration: none; display: inline-block; padding: 0.75rem 1.5rem; border: none; border-radius: 0.25rem; text-align: center; font-size: 1.5rem; cursor: pointer; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06); transition: box-shadow 0.4s ease, transform 0.3s ease; transform-origin: left; } .btn:hover { box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1); background-color: var(--nav-hover-text-color); transform: translateY(-2px); } aside { background-color: #f4f4f4; border: 1px solid #ccc; padding: 20px; margin: 20px auto; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); max-width: 300px; } aside h2 { font-size: 1.5rem; margin-bottom: 10px; color: #333; } table{ width: 100%; border-collapse: collapse; margin: 1rem 0; } table tr,td{ border-bottom: 1px solid #ccc; } aside p { font-size: 1rem; color: #666; line-height: 1.5; } aside ul { list-style-type: square; margin-left: 20px; } aside a { color: #007BFF; text-decoration: none; } aside a:hover { text-decoration: underline; color: #0056b3; } aside:hover { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); } footer { margin-top: 3rem; background-color: var(--footer-background-color); width: 100%; box-shadow: 0 -0.4rem 0.8rem rgba(0, 0, 0, 0.1); text-align: center; padding: 1.5rem; position: relative; bottom: 0; } footer p { color: var(--footer-text-color); font-size: 1.6rem; }
Leave a Comment