CS104_Assignment_1/styles.css
2025-09-12 14:34:29 +00:00

483 lines
7.9 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Georgia', serif;
line-height: 1.6;
color: #5d4037;
background-color: #faf0e6;
background-image: linear-gradient(to bottom, #faf0e6 0%, #f5e1c4 100%);
}
header {
background-color: #8b4513;
color: white;
padding: 20px 0;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.logo-container {
text-align: center;
margin-bottom: 20px;
}
.logo {
width: 150px;
height: 150px;
border-radius: 50%;
overflow: hidden;
object-fit: cover;
transition: opacity 0.3s;
border: 3px solid #daa520;
}
.logo:hover {
opacity: 0.7;
}
.main-nav ul {
list-style: none;
display: flex;
justify-content: center;
gap: 30px;
}
.main-nav a {
color: #faf0e6;
text-decoration: none;
font-size: 18px;
padding: 10px 15px;
border-radius: 5px;
transition: background-color 0.3s;
}
.main-nav a:hover {
background-color: #daa520;
}
main {
max-width: 1000px;
margin: 0 auto;
padding: 40px 20px;
}
section {
margin-bottom: 50px;
background-color: #fffaf0;
padding: 30px;
border-radius: 10px;
box-shadow: 0 3px 10px rgba(139, 69, 19, 0.1);
}
.banner {
text-align: center;
background-color: #daa520;
color: #5d4037;
}
.banner h1 {
font-size: 48px;
margin-bottom: 15px;
text-shadow: 2px 2px 4px rgba(255,255,255,0.3);
}
.tagline {
font-size: 24px;
font-style: italic;
}
.introduction h2 {
color: #8b4513;
font-size: 32px;
margin-bottom: 20px;
border-bottom: 3px solid #daa520;
padding-bottom: 10px;
}
.introduction p {
margin-bottom: 15px;
font-size: 18px;
line-height: 1.8;
}
.services h2 {
color: #8b4513;
font-size: 32px;
margin-bottom: 25px;
border-bottom: 3px solid #daa520;
padding-bottom: 10px;
}
.services-list {
list-style: none;
padding-left: 0;
}
.services-list li {
background-color: #f5e1c4;
margin-bottom: 15px;
padding: 15px;
border-left: 5px solid #daa520;
border-radius: 5px;
font-size: 16px;
}
.services-list strong {
color: #8b4513;
}
footer {
background-color: #8b4513;
color: white;
text-align: center;
padding: 30px 20px;
}
footer p {
margin-bottom: 10px;
}
footer a {
color: #daa520;
text-decoration: none;
}
footer a:hover {
text-decoration: underline;
}
.contact-details {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
margin-top: 20px;
}
.contact-item {
background-color: #f5e1c4;
padding: 25px;
border-radius: 10px;
border-left: 5px solid #daa520;
}
.contact-item h3 {
color: #8b4513;
font-size: 22px;
margin-bottom: 15px;
}
.contact-form-section {
background-color: #fffaf0;
}
.contact-form {
max-width: 600px;
margin: 0 auto;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
color: #8b4513;
font-weight: bold;
margin-bottom: 5px;
}
.form-group input,
.form-group select,
.form-group textarea {
width: 100%;
padding: 12px;
border: 2px solid #daa520;
border-radius: 5px;
font-family: 'Georgia', serif;
font-size: 16px;
background-color: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
outline: none;
border-color: #8b4513;
box-shadow: 0 0 5px rgba(139, 69, 19, 0.3);
}
.submit-btn {
background-color: #8b4513;
color: white;
padding: 15px 30px;
border: none;
border-radius: 5px;
font-size: 18px;
font-family: 'Georgia', serif;
cursor: pointer;
transition: background-color 0.3s;
}
.submit-btn:hover {
background-color: #daa520;
}
.story-origins,
.story-mission,
.story-team {
background-color: #fffaf0;
}
.values-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 25px;
margin-top: 25px;
}
.value-item {
background-color: #f5e1c4;
padding: 25px;
border-radius: 10px;
border-left: 5px solid #daa520;
}
.value-item h3 {
color: #8b4513;
font-size: 22px;
margin-bottom: 15px;
}
/* Image Gallery Styles */
.tea-gallery {
margin-top: 40px;
text-align: center;
}
.tea-gallery h3 {
color: #8b4513;
font-size: 28px;
margin-bottom: 25px;
}
.gallery-container {
max-width: 800px;
margin: 0 auto;
}
.gallery-main {
position: relative;
margin-bottom: 20px;
}
#gallery-image {
width: 100%;
max-height: 400px;
object-fit: cover;
border-radius: 10px;
box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}
.gallery-controls {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 100%;
display: flex;
justify-content: space-between;
padding: 0 20px;
pointer-events: none;
}
.gallery-btn {
background-color: rgba(139, 69, 19, 0.9);
color: white;
border: 2px solid #daa520;
font-size: 24px;
width: 50px;
height: 50px;
border-radius: 50%;
cursor: pointer;
transition: all 0.3s ease;
pointer-events: all;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.gallery-btn:hover {
background-color: #daa520;
color: #5d4037;
transform: scale(1.1);
}
.gallery-btn:active {
transform: scale(0.95);
}
.gallery-thumbnails {
display: flex;
justify-content: center;
gap: 15px;
margin-bottom: 15px;
}
.thumbnail {
width: 80px;
height: 60px;
object-fit: cover;
border-radius: 5px;
cursor: pointer;
opacity: 0.7;
transition: opacity 0.3s, transform 0.3s;
border: 2px solid transparent;
}
.thumbnail:hover,
.thumbnail.active {
opacity: 1;
transform: scale(1.1);
border-color: #daa520;
}
.gallery-caption {
font-style: italic;
color: #8b4513;
font-size: 16px;
margin-top: 10px;
}
/* FAQ Section Styles */
.faq-section {
margin-top: 40px;
}
.faq-section h3 {
color: #8b4513;
font-size: 28px;
margin-bottom: 25px;
text-align: center;
}
.faq-item {
background-color: #f5e1c4;
margin-bottom: 15px;
border-radius: 8px;
overflow: hidden;
border-left: 5px solid #daa520;
}
.faq-question {
background-color: #8b4513;
color: white;
padding: 15px 20px;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
transition: background-color 0.3s;
}
.faq-question:hover {
background-color: #daa520;
}
.faq-question h4 {
margin: 0;
font-size: 18px;
}
.faq-toggle {
font-size: 20px;
transition: transform 0.3s;
}
.faq-answer {
padding: 0 20px;
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease, padding 0.3s ease;
background-color: #fffaf0;
}
.faq-answer.active {
padding: 20px;
max-height: 200px;
}
.faq-toggle.active {
transform: rotate(45deg);
}
/* Form Validation Styles */
.error-message {
color: #d32f2f;
font-size: 14px;
margin-top: 5px;
display: block;
}
.form-group.error input,
.form-group.error textarea {
border-color: #d32f2f;
}
.form-group.success input,
.form-group.success textarea {
border-color: #4caf50;
}
/* Skip link for accessibility */
.skip-link {
position: absolute;
top: -40px;
left: 0;
background: #8b4513;
color: white;
padding: 8px;
text-decoration: none;
border-radius: 0 0 5px 0;
transition: top 0.3s;
}
.skip-link:focus {
top: 0;
}
@media (max-width: 768px) {
.main-nav ul {
flex-direction: column;
gap: 10px;
}
.hero h1 {
font-size: 36px;
}
.tagline {
font-size: 18px;
}
section {
padding: 20px;
}
.contact-details,
.values-list {
grid-template-columns: 1fr;
}
.gallery-thumbnails {
flex-wrap: wrap;
}
.thumbnail {
width: 60px;
height: 45px;
}
}