/* Custom styles for Peanut Explorer */

/* Global Styles */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

/* Modern Header Styles */
.navbar-fixed {
    z-index: 1000;
}

.modern-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: auto;
    min-height: 45px;
}

.modern-nav .nav-wrapper {
    height: auto;
    min-height: 45px;
    padding: 4px 0;
}

.modern-nav.scrolled {
    background: rgba(102, 126, 234, 0.95);
    backdrop-filter: blur(15px);
}

/* 네비게이션 컨텐츠 래퍼 */
.nav-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    gap: 3px;
}

/* 로고와 로그인 버튼 행 */
.nav-content-wrapper > * {
    position: relative;
}

/* 로고 스타일 (중앙) */
.modern-logo {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.2px;
    position: relative !important;
    left: auto !important;
    transform: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0;
    order: 1;
    line-height: 1.2;
}

.modern-logo i {
    font-size: 1.1rem;
    margin-right: 3px;
    display: inline-block;
    vertical-align: middle;
}

.modern-logo .brand-text {
    display: inline-block;
    vertical-align: middle;
}

/* 로그인 버튼 래퍼 (로고 오른쪽 - 절대 위치) */
.login-btn-wrapper {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

/* 중앙 메뉴 (로고 아래) */
.center-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    order: 2;
    line-height: 1.2;
}

.center-menu li {
    display: inline-block;
    margin: 0 3px;
}

.nav-link {
    font-weight: 600;
    padding: 3px 12px !important;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    font-size: 1.05rem;
    line-height: 1.2;
}

.nav-link:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

/* 로그인 버튼 */
.admin-nav-btn {
    font-weight: 500;
    padding: 3px 8px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    font-size: 0.75rem;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-nav-btn i {
    font-size: 0.75rem;
    margin-right: 3px;
    display: inline-flex;
    align-items: center;
}

.admin-nav-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-1px);
}

/* 모바일 메뉴 트리거 */
.sidenav-trigger {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* 반응형 디자인 */
@media only screen and (max-width: 992px) {
    .modern-nav {
        min-height: 48px;
    }

    .modern-nav .nav-wrapper {
        min-height: 48px;
    }

    .modern-logo {
        font-size: 1rem;
    }

    .modern-logo i {
        font-size: 1.1rem;
    }

    .center-menu {
        display: none;
    }

    .login-btn-wrapper {
        display: none;
    }
}

/* Modern Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0;
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="white" stop-opacity="0.1"/><stop offset="100%" stop-color="white" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>');
    opacity: 0.3;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
    letter-spacing: -1px;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 50px;
    opacity: 0.95;
    font-weight: 300;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.hero-buttons {
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

.hero-buttons .btn-large {
    margin: 12px;
    border-radius: 50px;
    text-transform: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 15px 40px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
}

.hero-buttons .btn-large:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 60px;
    color: #667eea;
    letter-spacing: -0.5px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Feature Cards */
.feature-card {
    height: 280px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.feature-card .card-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.feature-card.fade-in {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card.fade-in:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.feature-card .material-icons.large {
    font-size: 4rem;
    margin-bottom: 20px;
}

.feature-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
}

.feature-card h5 {
    color: #667eea;
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-card p {
    color: #666;
    line-height: 1.5;
}

/* Demo Section */
#demo .card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

#demo .card-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* QnA Section */
.qna-card {
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.qna-card.fade-in {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qna-card.fade-in:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.qna-card .card-title i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #667eea;
}

.qna-card .card-title h5 {
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
}

.qna-description {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.updates-wrapper {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.updates-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.updates-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    text-align: left;
    display: inline-block;
}

.updates-list li {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 6px;
}

.qna-buttons {
    margin-top: 20px;
}

.qna-buttons .btn-large {
    margin: 10px 15px;
    border-radius: 25px;
    text-transform: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 15px 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
}

.qna-buttons .btn-large:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Web Links Section */
#links {
    padding: 80px 0;
}

.weblink-card {
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 200px;
    display: flex;
    flex-direction: column;
}

.weblink-card.fade-in:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.weblink-card .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.weblink-card .material-icons {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.weblink-card .card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.weblink-card .card-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 15px;
}

.weblink-card .btn {
    border-radius: 20px;
    text-transform: none;
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-section .btn-large {
    border-radius: 25px;
    text-transform: none;
    font-size: 1.1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
    padding: 15px 40px;
}

/* Footer */
.page-footer {
    margin-top: 0;
}

.page-footer h5 {
    font-weight: 400;
}

.page-footer .material-icons.tiny {
    font-size: 1rem;
    vertical-align: middle;
    margin-right: 5px;
}

/* Modal Styles */
.modal {
    border-radius: 10px;
}

.modal h4 {
    color: #1976d2;
    font-weight: 400;
}

.modal .input-field {
    margin-bottom: 30px;
}

/* Button Icons Alignment */
.btn-large .material-icons.left {
    margin-right: 8px !important;
    margin-left: 0 !important;
    vertical-align: middle;
    font-size: 1.2em;
    line-height: 1;
}

.btn-large .material-icons:not(.left):not(.right) {
    vertical-align: middle;
    line-height: 1;
}

/* Fix Material Design button alignment issues */
.btn,
.btn-large,
.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

/* Responsive Design */
@media only screen and (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .feature-card {
        height: auto;
        margin-bottom: 20px;
    }

    .hero-buttons .btn-large {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 90%;
        margin: 10px auto;
    }
}

@media only screen and (max-width: 600px) {
    .hero-section {
        padding: 60px 0;
    }

    .section {
        padding: 60px 0;
    }

    .cta-section {
        padding: 60px 0;
    }

    /* Adjust anchor offset for mobile */
    #features,
    #demo,
    #qna,
    #hero {
        scroll-margin-top: 60px;
    }

    #features::before,
    #demo::before,
    #qna::before,
    #hero::before {
        height: 60px;
        margin-top: -60px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-in-out forwards;
    opacity: 1;
    transform: translateY(0);
}

/* Initial state for elements that will be animated */
.feature-card,
.qna-card,
.weblink-card,
.section-title {
    opacity: 0;
    transform: translateY(30px);
}

/* When animation is triggered */
.feature-card.fade-in,
.qna-card.fade-in,
.weblink-card.fade-in,
.section-title.fade-in {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Anchor Link Offset to prevent content being hidden behind fixed navbar */
#features,
#demo,
#qna,
#hero {
    scroll-margin-top: 80px; /* Adjust based on navbar height */
}

/* Alternative method for older browsers */
#features::before,
#demo::before,
#qna::before,
#hero::before {
    content: "";
    display: block;
    height: 80px;
    margin-top: -80px;
    visibility: hidden;
}
