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

html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, ul, li, form, input, button, article, aside, footer, header, nav, main {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

body {
    font-family: 'Lato', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
#header {
    background: #f8f8f8;
    border-bottom: 2px solid #ddd;
    padding: 20px 0;
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#title-area {
    flex: 1;
}

#title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

#title a {
    text-decoration: none;
    color: #2c5aa0;
}

#title a:hover {
    color: #1e4077;
}

#description {
    color: #666;
    font-size: 1.1rem;
    font-style: italic;
}

.header-widget-area {
    flex: 0 0 auto;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
}

.search-submit {
    padding: 8px 16px;
    background: #2c5aa0;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.search-submit:hover {
    background: #1e4077;
}

/* Navigation */
#nav {
    background: #2c5aa0;
    padding: 0;
}

.menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu li {
    flex: 1;
}

.menu a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.1);
    transition: background-color 0.3s ease;
}

.menu a:hover,
.menu .current a {
    background: rgba(255,255,255,0.1);
}

.menu li:last-child a {
    border-right: none;
}

/* Main Content Area */
#inner {
    padding: 40px 0;
    min-height: 500px;
}

#content-sidebar-wrap {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Content */
#content {
    background: white;
}

.entry-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 20px;
    border-bottom: 3px solid #2c5aa0;
    padding-bottom: 10px;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.7;
}

.entry-content p {
    margin-bottom: 16px;
}

.entry-content ul {
    margin: 16px 0 16px 30px;
}

.entry-content li {
    margin-bottom: 8px;
    list-style-type: disc;
}

/* Sidebar */
#sidebar {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    height: fit-content;
}

.widget-content p {
    margin-bottom: 12px;
    color: #555;
    line-height: 1.6;
}

.widget-content p:last-child {
    margin-bottom: 0;
}

/* Footer */
#footer {
    background: #2c5aa0;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gototop a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.gototop a:hover {
    text-decoration: underline;
}

.credits {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

/* Form Styles */
.contact-form {
    max-width: 600px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-submit {
    background: #2c5aa0;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.form-submit:hover {
    background: #1e4077;
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.gallery-item img:hover {
    opacity: 0.8;
}

.gallery-item-title {
    padding: 15px;
    font-weight: 500;
    text-align: center;
    color: #333;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 4px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    padding: 20px;
    transition: color 0.3s ease;
}

.lightbox-nav:hover {
    color: #ccc;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #header .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    #title {
        font-size: 2rem;
    }
    
    .search-input {
        width: 150px;
    }
    
    .menu {
        flex-direction: column;
    }
    
    .menu li {
        flex: none;
    }
    
    .menu a {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .menu li:last-child a {
        border-bottom: none;
    }
    
    #content-sidebar-wrap {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .entry-title {
        font-size: 1.8rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    #inner {
        padding: 20px 0;
    }
    
    #title {
        font-size: 1.7rem;
    }
    
    .entry-title {
        font-size: 1.5rem;
    }
    
    .search-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input {
        width: 100%;
    }
}