/* Basic Layout & Typography */
body {
    margin: 0;
    padding: 0;
    font-family: 'Nanum Gothic', sans-serif;
    font-size: 11pt;
    background-color: #f4f4f4;
    color: #333;
    -webkit-text-size-adjust: none;
    overflow-x: hidden;
}

a {
    color: #333;
    text-decoration: none;
}

img {
    border: 0;
    max-width: 100%;
    height: auto;
}

/* Header & Top Bar Container */
.header-container {
    max-width: 1000px;
    margin: 0 auto;
}

.top-header {
    background-color: #fff;
    border-bottom: 1px solid #e7e7e7;
    padding: 5px 15px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    box-sizing: border-box;
}

.quick-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.quick-nav li {
    display: inline-block;
    margin-left: 15px;
    font-size: 12px;
    color: #555;
}

.quick-nav a {
    color: #555;
}

.quick-nav a:hover {
    color: #000;
}

/* Top Bar (Logo & Main Navigation) */
.top-bar {
    background-color: #4C4C4C;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.logo a {
    display: block;
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav > ul > li {
    display: inline-block;
    margin-left: 25px;
    position: relative; /* For submenu positioning */
}

.main-nav a {
    color: #fff;
    font-weight: bold;
    font-size: 11pt;
}

.main-nav > ul > li > a:hover {
    color: #FFBB00;
}

/* Submenu */
.has-submenu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 5px 0;
    min-width: 160px;
    z-index: 1000;
}

.has-submenu:hover .submenu {
    display: block;
}

.submenu li {
    display: block;
}

.submenu li a {
    display: block;
    padding: 8px 15px;
    color: #333;
    font-size: 10pt;
    white-space: nowrap;
}

.submenu li a:hover {
    background-color: #f4f4f4;
    color: #000;
}

/* Main Content */
.main-content {
    max-width: 1000px;
    margin: 10px auto;
    background-color: #fff;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Intro Section - Modern Look */
.intro-section {
    border: 1px solid #dee2e6;
    border-left: 5px solid #007bff;
    padding: 10px 25px; /* Drastically reduced vertical padding */
    margin-bottom: 25px;
    line-height: 1.7;
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    border-radius: 4px;
}

.intro-section h1 {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0 0 10px;
}

.intro-section b {
    color: #0056b3;
}

/* Site Grid */
.site-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.site-card {
    border: 1px solid #ddd;
    background-color: #fff;
    transition: box-shadow 0.2s ease-in-out;
    border-radius: 4px;
    overflow: hidden;
}

.site-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-link {
    display: block;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: 10px 14px;
    font-size: 1.1em;
    font-weight: bold;
}

.card-header.rank-1 {
    background-color: #343a40;
    color: #f8f9fa;
}

.card-header.rank-2 {
    background-color: #e9ecef;
    color: #343a40;
}

.card-header h2 {
    font-size: inherit;
    margin: 0;
    display: inline;
}

.card-body {
    padding: 15px;
    flex-grow: 1;
}

.site-preview {
    width: 100%;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.site-info p {
    font-size: 0.9em;
    line-height: 1.6;
    margin: 5px 0;
}

.site-info strong {
    color: #C90000;
}

.card-footer {
    padding: 12px 10px;
    margin: 15px;
    font-weight: bold;
    text-align: center;
    border: 1px solid #007bff;
    background-color: #f1f1f1;
    color: #007bff;
    transition: all 0.2s ease-in-out;
    border-radius: 4px;
}

.card-link:hover .card-footer {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

/* FAQ Section */
.faq-section {
    margin-top: 30px; /* Added margin to separate from gallery */
}
.faq-section h2 {
    font-size: 1.4em;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.faq-section details {
    border-bottom: 1px solid #eee;
    padding: 15px 5px;
}
.faq-section summary {
    font-weight: bold;
    cursor: pointer;
    outline: none;
    list-style: none; /* Firefox */
}
.faq-section summary::-webkit-details-marker { /* Chrome */
    display: none;
}
.faq-section summary::before {
    content: 'Q. ';
    font-weight: bold;
    color: #007bff;
}
.faq-section details[open] summary {
    color: #C90000;
}
.faq-section p {
    margin-top: 10px;
    line-height: 1.7;
    color: #555;
    padding-left: 22px;
}

/* Latest Posts */
.latest-posts-section {
    clear: both;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.latest-posts-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.latest-item {
    width: 49%;
}

/* Latest Gallery - Horizontal Flex Layout */
.latest-gallery .lt {
    padding-bottom:10px;
}
.latest-gallery .lt_title {
    margin-bottom: 15px !important;
}
.latest-gallery ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1%; /* Reduced gap */
    padding: 0;
    margin: 0;
    list-style: none;
}
.latest-gallery li {
    width: 15.8% !important; /* Adjusted for new gap */
    margin: 0 !important;
    float: none !important;
    height: auto;
}
.latest-gallery .lt_img {
    display: block;
    width: 100%;
    height: 125px; /* Reduced height */
    object-fit: cover;
    border: 1px solid #eee;
    border-radius: 4px;
}
.latest-gallery .lt_tit {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    margin-top: 5px;
}

/* SEO Description Section */
.seo-description {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.seo-description h2 {
    font-size: 1.3em;
    margin-top: 0;
}

.seo-description p {
    line-height: 1.8;
    color: #495057;
    font-size: 0.95em;
}


/* Footer */
.main-footer {
    clear: both;
    padding: 30px 0;
    width: 100%;
    font-size: 9pt;
    text-align: center;
    color: #666;
    background-color: #e9e9e9;
    margin-top: 10px;
}

.footer-nav {
    margin-bottom: 10px;
}

.footer-nav a {
    color: #666;
    margin: 0 8px;
}
.footer-nav a:hover {
    color: #000;
}

.copyright a {
    color: #000;
    font-weight: bold;
}


/* Responsive Styles */
@media (max-width: 1024px) {
    .latest-gallery li { width: 32.6% !important; margin-bottom: 15px !important; }
    .latest-gallery .lt_img { height: 165px; }
}

@media (max-width: 768px) {
    .site-grid {
        grid-template-columns: 1fr;
    }

    .header-container {
        width: 100%;
    }

    .latest-posts-container {
        flex-direction: column;
    }

    .latest-item {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .latest-gallery li { width: 49.5% !important; }
    .latest-gallery .lt_img { height: 185px; }
}

@media (max-width: 500px) {
    .top-bar {
        flex-direction: column; /* Stack logo and nav */
    }
    .main-nav {
        margin-top: 10px;
        width: 100%;
    }
    .main-nav ul {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
    .main-nav > ul > li {
        margin: 0 5px;
    }
    .main-nav a {
        font-size: 8.5pt; /* Drastically reduced font size */
    }
    
    .intro-section {
        padding: 8px 15px; /* Drastically reduced padding */
    }
    .intro-section h1 {
        font-size: 1em; /* Reduced font size */
        margin-bottom: 5px;
    }
    .intro-section p {
        font-size: 0.8em; /* Reduced font size */
        line-height: 1.5;
    }

    .latest-gallery li { 
        width: 48% !important; 
        margin-bottom: 10px !important;
    }
    .latest-gallery .lt_img { 
        height: 100px; /* Drastically reduced height */
    }
    .latest-gallery .lt_tit {
        font-size: 11px;
    }
}
