/*
 * Typography Design - Main Stylesheet
 * Contains styles for navigation, footer, and overall layout
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', 'Noto Sans SC', sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="rgb(249,249,249)" /><path d="M0,0 L100,100 M100,0 L0,100" stroke="rgba(0,0,0,0.03)" stroke-width="0.5" /></svg>');
    background-size: 30px 30px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Navigation */
.main-nav {
    background-color: #333;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: #3498db;
}

.nav-links a.active {
    color: #3498db;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    color: #222;
    position: relative;
    display: inline-block;
}

.page-header h1::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: linear-gradient(to right, rgba(var(--primary-rgb), 0.1), rgba(var(--primary-rgb), 0.7), rgba(var(--primary-rgb), 0.1));
    border-radius: 3px;
}

.intro {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.15rem;
    color: #555;
    line-height: 1.8;
}

/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Category Cards */
.category-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border-bottom: 5px solid transparent;
    background-image: linear-gradient(to right, white, white),
                      linear-gradient(to right, var(--primary-light), var(--primary), var(--primary-light));
    background-origin: border-box;
    background-clip: content-box, border-box;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.category-image {
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f8f8;
    overflow: hidden;
}

.category-image svg {
    width: 100%;
    height: 100%;
}

.category-info {
    padding: 1.5rem;
}

.category-info h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.category-info p {
    color: #666;
    font-size: 0.95rem;
}

/* Tags */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.tag {
    display: inline-block;
    background-color: #f5f5f5;
    color: #666;
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: 30px;
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: #e9e9e9;
    color: #333;
}

/* SVG Animation Effects */
.svg-animate-float {
    animation: float 6s ease-in-out infinite;
}

.svg-animate-pulse {
    animation: pulse 3s ease-in-out infinite;
}

.svg-animate-rotate {
    animation: rotate 20s linear infinite;
}

.svg-animate-path {
    animation: dashOffset 5s linear infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes dashOffset {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 100; }
}

/* Footer */
.main-footer {
    background-color: #333;
    color: white;
    padding: 2rem 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-icon {
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-icon:hover {
    color: #3498db;
}

.copyright {
    color: #999;
    font-size: 0.9rem;
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #333;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        align-items: flex-start;
        transform: scaleY(0);
        transform-origin: top;
        transition: transform 0.3s ease;
        opacity: 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        transform: scaleY(1);
        opacity: 1;
    }

    .nav-links a {
        width: 100%;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .intro {
        font-size: 1rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .category-info h2 {
        font-size: 1.2rem;
    }

    .category-info p {
        font-size: 0.9rem;
    }

    .social-icons {
        gap: 1rem;
    }

    .social-icon {
        font-size: 1.3rem;
    }
}
