/* Children's Safety Book Magazine Website - Main Stylesheet */
/* Designed for kids 4-9 years old */

/* Color Palette */
:root {
    --primary-color: #FF6B6B; /* Bright red */
    --secondary-color: #4ECDC4; /* Turquoise */
    --accent1: #FFD166; /* Yellow */
    --accent2: #6A8EAE; /* Blue */
    --accent3: #9ACD32; /* Yellow-green */
    --background: #FFFFFF; /* White background */
    --text-color: #333333; /* Dark gray for text */
    --light-bg: #F8F9FA; /* Light background for sections */
}

/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Comic Sans MS', 'Bubblegum Sans', cursive;
    background-color: var(--background);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 18px;
    background-image: url('../images/safety-pattern-bg.png');
    background-attachment: fixed;
    background-size: 200px;
    background-repeat: repeat;
    background-blend-mode: lighten;
    background-color: rgba(255, 255, 255, 0.9);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    padding: 15px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.logo {
    max-width: 300px;
    height: auto;
}

.site-title {
    font-size: 2.5rem;
    color: white;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 10px 0;
}

/* Navigation */
nav {
    background-color: var(--secondary-color);
    border-radius: 20px;
    padding: 10px;
    margin-bottom: 20px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: inline-block;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

nav ul li a:hover {
    background-color: var(--accent1);
    color: var(--text-color);
    transform: scale(1.1);
}

/* Main Content */
main {
    padding: 30px 0;
    min-height: 500px;
}

.content-box {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--accent3);
}

.page-title {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 25px;
    font-size: 2.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Homepage Specific */
.hero-section {
    background-color: var(--accent2);
    color: white;
    text-align: center;
    padding: 40px 20px;
    border-radius: 20px;
    margin-bottom: 30px;
    background-image: linear-gradient(45deg, var(--accent2), var(--secondary-color));
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/safety-heroes.png');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-text {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 20px;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent1);
    color: var(--text-color);
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: scale(1.05);
    background-color: var(--accent3);
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 -15px;
}

.feature-box {
    flex: 1 1 300px;
    margin: 15px;
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 2px solid var(--secondary-color);
}

.feature-box:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.feature-title {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

/* Magazine Issues */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.magazine-item {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.magazine-item:hover {
    transform: translateY(-10px);
}

.magazine-cover {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: 3px solid var(--accent1);
}

.magazine-info {
    padding: 15px;
    text-align: center;
}

.magazine-title {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.magazine-date {
    color: var(--accent2);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.read-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.read-button:hover {
    background-color: var(--primary-color);
}

/* Safety Tips */
.tips-list {
    list-style: none;
}

.tip-item {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--accent3);
    transition: transform 0.3s ease;
}

.tip-item:hover {
    transform: translateX(10px);
}

.tip-title {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.tip-title i {
    margin-right: 10px;
    color: var(--accent3);
}

.tip-content {
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Contact Form */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--accent2);
    font-size: 1.1rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent1);
    box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.3);
}

.submit-button {
    background-color: var(--accent3);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.submit-button:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

/* About Page */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.team-member {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-10px);
}

.member-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.member-info {
    padding: 15px;
}

.member-name {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.member-role {
    color: var(--accent2);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    text-align: center;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-section {
    flex: 1 1 300px;
    margin: 15px;
}

.footer-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--accent1);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent1);
    text-decoration: underline;
}

.social-icons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.social-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    margin: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--accent1);
    color: white;
    transform: scale(1.1);
}

.copyright {
    margin-top: 30px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animated-element {
    animation: bounce 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 5px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-text {
        font-size: 1.1rem;
    }
    
    .features {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Accessibility */
:focus {
    outline: 3px solid var(--accent1);
    outline-offset: 3px;
}

/* Fun Elements */
.bubble {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: float 8s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -15px) rotate(5deg); }
    50% { transform: translate(20px, 0) rotate(0deg); }
    75% { transform: translate(10px, 15px) rotate(-5deg); }
}

.character {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.character:hover {
    transform: scale(1.1) rotate(10deg);
}