/* ========================================
   Landing Page Styles
   ======================================== */

/* 기본 설정 */
:root {
    --primary-color: #0f172a;
    --secondary-color: #1e293b;
    --accent-color: #06b6d4;
    --accent-secondary: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-color: #f8fafc;
    --dark-color: #0f172a;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --hero-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --brand-gradient: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 50%, #ec4899 100%);
    --card-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --shadow-hero: 0 25px 50px rgba(6, 182, 212, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--hero-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    padding: 40px 0 30px;
    background: var(--hero-gradient);
    position: relative;
    overflow: hidden;
    min-height: 30vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="%23334155" stroke-width="1" opacity="0.3"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.4;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-title {
    font-size: clamp(1.8rem, 12vw, 8rem);
    font-weight: 900;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    text-shadow: 0 8px 32px rgba(6, 182, 212, 0.3);
    font-family: 'Inter', 'Pretendard', system-ui, sans-serif;
    line-height: 0.9;
}

.text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    position: relative;
    animation: brandGlow 3s ease-in-out infinite alternate;
}

.text-gradient::before {
    content: 'GQ AI';
    position: absolute;
    top: 0;
    left: 0;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(20px);
    opacity: 0.5;
    z-index: -1;
}

@keyframes brandGlow {
    0% {
        filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.8));
    }
}

.brand-container {
    text-align: center;
    margin-bottom: 3rem;
}

.brand-tagline {
    position: relative;
    margin-bottom: 2rem;
}

.tagline-text {
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: -0.01em;
    display: inline-block;
}

.tagline-decoration {
    width: 60px;
    height: 3px;
    background: var(--brand-gradient);
    margin: 1rem auto;
    border-radius: 2px;
    position: relative;
    animation: decorationPulse 2s ease-in-out infinite;
}

.tagline-decoration::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--brand-gradient);
    border-radius: 4px;
    filter: blur(8px);
    opacity: 0.5;
    z-index: -1;
}

@keyframes decorationPulse {
    0%, 100% {
        transform: scaleX(1);
        opacity: 1;
    }
    50% {
        transform: scaleX(1.2);
        opacity: 0.8;
    }
}

.hero-description {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-cta {
    background: var(--brand-gradient);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
    color: white;
    text-decoration: none;
}

.btn-cta:hover::before {
    left: 100%;
}

.btn-cta:active {
    transform: translateY(0);
}

.btn-cta i {
    font-size: 1rem;
}

/* ========================================
   Main Cards Section
   ======================================== */
.main-cards-section {
    padding: 80px 0 !important;
    /* 강제 적용으로 확실한 밝은 배경 구현 */
    background: linear-gradient(180deg,
        rgb(245, 250, 255) 0%,
        rgb(255, 255, 255) 100%) !important;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%) !important;
    position: relative !important;
}

.card-link {
    text-decoration: none;
    display: block;
    height: 100%;
}

.service-card {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    height: 100%;
    min-height: 500px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.card-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(45deg, #f0f4f8 0%, #e2e8f0 100%);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .card-image img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover .card-overlay {
    opacity: 1;
}

.card-icon {
    font-size: 3rem;
    color: white;
    transform: scale(0.8);
    transition: var(--transition);
}

.service-card:hover .card-icon {
    transform: scale(1);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100% - 280px);
    min-height: 220px;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.learning-card .card-title {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prompt-card .card-title {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.feature-tag {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.prompt-card .feature-tag {
    background: rgba(240, 147, 251, 0.1);
    color: #d946ef;
}

.card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.btn-text {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.prompt-card .btn-text {
    color: #d946ef;
}

.card-action i {
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.service-card:hover .card-action i {
    transform: translateX(5px);
    color: var(--primary-color);
}

.prompt-card:hover .card-action i {
    color: #d946ef;
}

/* ========================================
   Sub Services Section
   ======================================== */
.sub-services-section {
    padding: 30px 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sub-service-btn {
    display: block;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(139, 92, 246, 0.1) 50%, rgba(236, 72, 153, 0.1) 100%);
    border-radius: var(--border-radius);
    padding: 1.6rem 1.2rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    height: 176px;
    min-height: 176px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(6, 182, 212, 0.2);
    position: relative;
    overflow: hidden;
}

/* 호버 시 배경 이미지 적용 */
.sub-service-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.sub-service-btn.hover-bg {
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

/* 호버 시 텍스트 숨기기 및 배경 이미지 오버레이 */
.sub-service-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    transition: var(--transition);
    z-index: 0;
}

.sub-service-btn:hover::before {
    background: rgba(255, 255, 255, 0.3);
}


.sub-service-content {
    text-align: center;
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sub-service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
    transition: var(--transition);
}

.sub-service-btn:hover .sub-service-icon {
    transform: scale(1.1);
}

.sub-service-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 
        0 0 10px rgba(6, 182, 212, 0.8),
        0 2px 8px rgba(0, 0, 0, 0.8),
        0 4px 16px rgba(6, 182, 212, 0.6);
    margin-bottom: 0.4rem;
    transition: var(--transition);
    letter-spacing: -0.02em;
}

.sub-service-description {
    color: white;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 600;
    text-shadow: 
        0 0 8px rgba(6, 182, 212, 0.7),
        0 2px 6px rgba(0, 0, 0, 0.9),
        0 3px 12px rgba(6, 182, 212, 0.5);
    margin: 0;
    transition: var(--transition);
}

/* 호버 시 텍스트 숨기기 */
.sub-service-btn:hover .sub-service-title,
.sub-service-btn:hover .sub-service-description {
    opacity: 0;
}

/* ========================================
   Footer
   ======================================== */
.landing-footer {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(20px);
    padding: 3rem 0 2rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 방문자 통계 (랜딩 페이지용) */
.visitor-stats-landing {
    margin-bottom: 1.5rem;
}

.visitor-stats-landing .stat-item {
    text-align: center;
    margin: 0 1rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.visitor-stats-landing .stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.visitor-stats-landing .stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.3rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.visitor-stats-landing .stat-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-links span {
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0 30px;
        min-height: 40vh;
    }
    
    .hero-title {
        font-size: clamp(2rem, 10vw, 5rem);
        margin-bottom: 1.5rem;
    }
    
    .tagline-text {
        font-size: clamp(1rem, 3.5vw, 1.5rem);
    }
    
    .hero-description {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    }
    
    .main-cards-section {
        padding: 60px 0;
    }
    
    .service-card {
        min-height: 450px;
    }
    
    .card-content {
        padding: 1.5rem;
        min-height: 250px;
    }
    
    .sub-services-section {
        padding: 60px 0;
    }
    
    .sub-service-btn {
        padding: 1.2rem 0.8rem;
        height: 144px;
        min-height: 144px;
    }
    
    .sub-service-icon {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 30px 0 20px;
        min-height: 35vh;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 4rem);
        margin-bottom: 1rem;
        letter-spacing: -0.01em;
    }
    
    .tagline-text {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
    }
    
    .tagline-decoration {
        width: 40px;
        height: 2px;
        margin: 0.8rem auto;
    }
    
    .hero-description {
        font-size: clamp(0.85rem, 2.2vw, 1rem);
        br {
            display: none;
        }
    }
    
    .brand-tagline {
        margin-bottom: 1.5rem;
    }
    
    .main-cards-section {
        padding: 40px 0;
    }
    
    .service-card {
        min-height: 400px;
    }
    
    .card-image {
        height: 220px;
    }
    
    .card-content {
        padding: 1.2rem;
        height: calc(100% - 220px);
        min-height: 180px;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .card-description {
        font-size: 0.9rem;
    }
    
    .sub-services-section {
        padding: 40px 0;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    /* 모바일 방문자 통계 */
    .visitor-stats-landing .stat-item {
        margin: 0 0.5rem;
        padding: 0.6rem 1rem;
    }
    
    .visitor-stats-landing .stat-label {
        font-size: 0.75rem;
    }
    
    .visitor-stats-landing .stat-number {
        font-size: 1.1rem;
    }
}

/* ========================================
   Animation & Loading States
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.loading-placeholder {
    background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   Accessibility & Focus States
   ======================================== */
.card-link:focus,
.sub-service-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: var(--border-radius);
}

.text-gradient:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 4px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .text-gradient {
        background: linear-gradient(135deg, #ffffff 0%, #06b6d4 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .tagline-decoration,
    .tagline-decoration::before {
        background: #06b6d4;
    }
    
    .hero-description {
        color: rgba(255, 255, 255, 0.95);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .text-gradient::before,
    .tagline-decoration::before {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .hero-section,
    .sub-services-section,
    .landing-footer {
        background: white !important;
        color: black !important;
    }
    
    .service-card {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}