body {
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 50px auto 0;
    padding: 80px 20px;
    box-sizing: border-box;
}

#main-section {
    width: 100%;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-bottom: 50px;
    border-radius: 0px;
    padding-top: 100px;
    background-image: 
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
    url('https://images.unsplash.com/photo-1628595351029-c2bf17511435?q=80&w=1632&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center center;
    box-shadow: none;
    box-sizing: border-box;
}

.title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.main-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
    margin: 0 auto;
    display: block;
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.main-description {
    font-size: 1.2rem;
    color: #ffffff;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 반응형 디자인 */
@media (max-width: 900px) {
    .rnd-main-img {
        width: 100%;
        max-width: 100%;
        padding: 8px;
    }
    .rnd-adv-card {
        width: 100%;
        max-width: 100%;
        padding: 20px;
    }
}

@media screen and (max-width: 768px) {
    .main-title {
        font-size: 2rem;
        padding: 0 20px;
        line-height: 1.2;
        width: 100%;
        max-width: 100%;
    }

    .tech-container {
        grid-template-columns: 1fr;
    }

    #main-section {
        height: 300px;
        padding-top: 80px;
        background-position: center 30%;
        width: 100%;
    }

    #main {
        padding: 40px 15px;
        margin: 30px auto 0;
        width: 100%;
        max-width: 100%;
    }

    .rnd-image-section {
        padding: 15px;
        margin-bottom: 30px;
        width: 100%;
        max-width: 100%;
    }

    .rnd-main-img {
        width: 100%;
        max-width: 100%;
        padding: 12px;
        border-radius: 12px;
    }

    .rnd-image-caption {
        font-size: 1rem;
        padding: 0 10px;
        margin-bottom: 20px;
        width: 100%;
        max-width: 100%;
    }

    .rnd-advantages {
        gap: 16px;
        padding: 15px;
        width: 100%;
        max-width: 100%;
    }

    .rnd-adv-card {
        padding: 20px 16px;
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
    }

    .adv-title {
        font-size: 1.1em;
        margin-bottom: 8px;
    }

    .adv-desc {
        font-size: 1em;
        line-height: 1.5;
    }
}

@media screen and (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
    }

    #main-section {
        height: 250px;
        padding-top: 60px;
        background-position: center 25%;
        width: 100%;
    }

    #main {
        padding: 30px 10px;
        margin: 20px auto 0;
        width: 100%;
        max-width: 100%;
    }

    .rnd-image-section {
        padding: 10px;
        margin-bottom: 25px;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
    }

    .rnd-main-img {
        padding: 8px;
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
    }

    .rnd-image-caption {
        font-size: 0.95rem;
        padding: 0 5px;
        margin-bottom: 15px;
        line-height: 1.4;
        width: 100%;
        max-width: 100%;
    }

    .rnd-advantages {
        gap: 12px;
        padding: 10px;
        width: 100%;
        max-width: 100%;
    }

    .rnd-adv-card {
        padding: 16px 12px;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        width: 100%;
        max-width: 100%;
    }

    .adv-title {
        font-size: 1em;
        margin-bottom: 6px;
    }

    .adv-desc {
        font-size: 0.95em;
        line-height: 1.4;
    }

    .highlight {
        font-size: 0.95em;
    }
}

@media screen and (max-width: 360px) {
    .main-title {
        font-size: 1.6rem;
        padding: 0 10px;
        width: 100%;
        max-width: 100%;
    }

    #main-section {
        height: 200px;
        padding-top: 50px;
        width: 100%;
    }

    #main {
        width: 100%;
        max-width: 100%;
    }

    .rnd-image-section {
        width: 100%;
        max-width: 100%;
    }

    .rnd-main-img {
        width: 100%;
        max-width: 100%;
    }

    .rnd-image-caption {
        width: 100%;
        max-width: 100%;
    }

    .rnd-advantages {
        width: 100%;
        max-width: 100%;
    }

    .rnd-adv-card {
        padding: 14px 10px;
        width: 100%;
        max-width: 100%;
    }

    .adv-title {
        font-size: 0.95em;
    }

    .adv-desc {
        font-size: 0.9em;
    }
}

/* 연구개발 이미지 섹션 */
.rnd-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.rnd-main-img {
    width: 100%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.13);
    margin-bottom: 20px;
    background: #fff;
    padding: 18px;
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.rnd-main-img:hover {
    transform: scale(1.02);
}

.rnd-image-caption {
    font-size: 1.2rem;
    color: #222;
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 장점 카드 스타일 */
.rnd-advantages {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.rnd-adv-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 28px 40px;
    width: 100%;
    max-width: 550px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.rnd-adv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.adv-title {
    font-weight: bold;
    color: #1976d2;
    margin-bottom: 10px;
    font-size: 1.15em;
}

.adv-desc {
    font-size: 1.05em;
    color: #333;
    line-height: 1.6;
}

.highlight {
    color: #e53935;
    font-weight: bold;
}

/* 인라인 편집 스타일 */
[data-editable="true"] {
    position: relative;
    transition: all 0.2s;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid transparent;
    margin: 2px 0;
    background-color: transparent;
}

/* 로그인 상태일 때만 편집 관련 스타일 적용 */
body:has(.admin-logged-in) [data-editable="true"] {
    cursor: pointer;
    background-color: rgba(25, 118, 210, 0.02);
}

body:has(.admin-logged-in) [data-editable="true"]:hover {
    background-color: rgba(25, 118, 210, 0.08);
    border-color: rgba(25, 118, 210, 0.3);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
}

body:has(.admin-logged-in) [data-editable="true"].editing {
    background-color: #fff;
    border-color: #1976d2;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
    padding: 8px 40px 8px 12px;
}

.edit-button {
    display: none;
}

body:has(.admin-logged-in) .edit-button {
    display: flex;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(25, 118, 210, 0.3);
    color: #1976d2;
    cursor: pointer;
    padding: 6px;
    opacity: 0;
    transition: all 0.2s;
    z-index: 1;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body:has(.admin-logged-in) .edit-button:hover {
    color: #1976d2;
    background-color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

body:has(.admin-logged-in) [data-editable="true"]:hover .edit-button {
    opacity: 1;
}

/* 편집 컨트롤 스타일 */
.edit-controls {
    position: absolute;
    right: -160px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.editable.editing .edit-controls {
    opacity: 1;
}

.edit-controls button {
    background: #fff;
    border: 1px solid #1976d2;
    color: #1976d2;
    cursor: pointer;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 32px;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-weight: 500;
}

.edit-controls button:hover {
    background: #1976d2;
    color: #fff;
    transform: scale(1.05);
}

.edit-controls .save-btn {
    background: #1976d2;
    color: #fff;
}

.edit-controls .save-btn:hover {
    background: #1565c0;
}

.edit-controls .cancel-btn {
    background: #fff;
    color: #dc3545;
    border-color: #dc3545;
}

.edit-controls .cancel-btn:hover {
    background: #dc3545;
    color: #fff;
}

/* 에디터 도구 모음 스타일 */
.editor-tools {
    position: absolute;
    top: -40px;
    left: 0;
    display: flex;
    gap: 8px;
    padding: 8px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}

[data-editable="true"].editing .editor-tools {
    opacity: 1;
}

.tool-group {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 2px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.tool-btn {
    padding: 4px 8px;
    border: 1px solid #e9ecef;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
}

.tool-btn:hover {
    background-color: #f8f9fa;
    border-color: #1976d2;
    color: #1976d2;
}

.tool-btn.active {
    background-color: #1976d2;
    border-color: #1976d2;
    color: white;
}

.font-size-select,
.font-family-select {
    padding: 4px 8px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background-color: white;
    color: #495057;
    min-width: 100px;
    height: 28px;
}

.color-picker,
.bg-color-picker {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .editor-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .tool-group {
        justify-content: center;
    }
}

/* 이미지 컨테이너 스타일 */
.image-container {
    position: relative;
    display: inline-block;
    border-radius: 16px;
    overflow: hidden;
}

.image-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 16px;
}

.image-container:hover .image-upload-overlay {
    opacity: 1;
}

.image-upload-overlay i {
    font-size: 2rem;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.image-container:hover .image-upload-overlay i {
    transform: scale(1.1);
}

.image-upload-overlay span {
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 편집 가능한 요소 스타일 */
.editable {
    position: relative;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid transparent;
    margin: 2px 0;
    background-color: transparent;
    margin-right: 0px;
}

.admin-mode .editable {
    cursor: pointer;
    background-color: rgba(25, 118, 210, 0.02);
}

.admin-mode .editable:hover {
    background-color: rgba(25, 118, 210, 0.08);
    border-color: rgba(25, 118, 210, 0.3);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
}

.admin-mode .editable.editing {
    background-color: #fff;
    border-color: #1976d2;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
    padding: 8px 40px 8px 12px;
}

/* 알림 스타일 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.success {
    background-color: #4CAF50;
}

.notification.error {
    background-color: #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 관리자 전용 요소 */
.admin-only {
    display: none;
}

.admin-mode .admin-only {
    display: flex;
} 