/* 
 * Phone Recycle Premium Theme - Complete Rewrite
 * 2024 Phone Recycle Co., Ltd.
 */

/* =========================================
   1. Variables & Reset
   ========================================= */
:root {
    /* Colors */
    --primary-color: #0f172a;
    /* Deep Navy */
    --primary-light: #1e293b;
    /* Lighter Navy */
    --accent-color: #2563eb;
    /* Vibrant Blue */
    --accent-hover: #1d4ed8;
    /* Darker Blue */

    --text-main: #1e293b;
    /* Dark Slate */
    --text-muted: #64748b;
    /* Cool Gray */
    --text-light: #94a3b8;
    /* Light Gray */

    --bg-body: #f8fafc;
    /* Very Light Blue/Gray */
    --bg-white: #ffffff;

    --border-color: #e2e8f0;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

button,
input,
textarea {
    font-family: inherit;
}

/* =========================================
   2. Utility Classes
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* =========================================
   3. Header
   ========================================= */
header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo i {
    color: var(--accent-color);
    font-size: 1.75rem;
}

.logo-text {
    line-height: 1.1;
    display: flex;
    flex-direction: column;
}

.logo-text span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-cta {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
}

.header-cta:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* =========================================
   4. Intro (Hero)
   ========================================= */
#intro {
    padding: 10rem 0 8rem;
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.85)), url('img/hero_clean.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    overflow: hidden;
    color: white;
}

.intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--accent-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid rgba(37, 99, 235, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.intro-badge::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.intro-content p {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

/* =========================================
   5. Services Grid
   ========================================= */
#services {
    background: var(--bg-body);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    align-items: stretch;
}

.service-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: #eff6ff;
    /* Light Blue */
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--accent-color);
    color: white;
    transform: rotate(-5deg) scale(1.1);
    border-radius: 50%;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* =========================================
   6. Process Steps
   ========================================= */
.process-wrapper {
    padding: 2rem 0;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    gap: 2rem;
}

/* Connecting Line */
.process-steps::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: repeating-linear-gradient(to right, var(--border-color) 0, var(--border-color) 10px, transparent 10px, transparent 20px);
    z-index: 0;
}

.process-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-icon-box {
    width: 80px;
    height: 80px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.process-step:hover .step-icon-box {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.step-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.step-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* =========================================
   7. Achievements (Centered Timeline)
   ========================================= */
#achievements {
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.9)), url('img/partnership_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
}

.achievements-banner {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
}

.achievements-banner img {
    max-width: 100%;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
}

.achievements-banner:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.history-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Spine */
.history-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    transform: translateX(-50%);
}

.history-item {
    position: relative;
    width: 50%;
    padding: 1.5rem 0;
    box-sizing: border-box;
}

/* Alternating Layout */
.history-item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-right: 3rem;
}

.history-item:nth-child(even) {
    left: 50%;
    text-align: left;
    padding-left: 3rem;
}

/* Dots */
.history-item::before {
    content: '';
    position: absolute;
    top: 2rem;
    width: 16px;
    height: 16px;
    background: white;
    border: 4px solid var(--accent-color);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transition: all 0.3s;
}

.history-item:nth-child(odd)::before {
    right: -10px;
    /* Center on spine */
}

.history-item:nth-child(even)::before {
    left: -10px;
    /* Center on spine */
}

.history-item:hover::before {
    transform: scale(1.2);
    background: var(--accent-color);
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.2);
}

.history-year {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.history-content {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
}

/* =========================================
   8. FAQ (Accordion)
   ========================================= */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.faq-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.faq-question {
    padding: 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.faq-question i {
    color: var(--text-muted);
    transition: transform 0.3s;
}

.faq-item.active .faq-question {
    color: var(--accent-color);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--accent-color);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: none;
    border-top: 1px solid transparent;
}

.faq-item.active .faq-answer {
    display: block;
    border-top-color: var(--bg-body);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   9. Quote Form & Contact
   ========================================= */
#quote {
    background: var(--primary-color);
    color: white;
    overflow: hidden;
}

/* Background Pattern */
#quote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.15) 0%, transparent 40%);
}

#quote .section-title {
    color: white;
}

#quote .section-desc {
    color: rgba(255, 255, 255, 0.7);
}

.quote-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    position: relative;
    z-index: 1;
    align-items: start;
}

.quote-form-card {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s;
    background: var(--bg-body);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 1.25rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.contact-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.contact-item i {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* =========================================
   10. Footer
   ========================================= */
footer {
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.5);
    padding: 3rem 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* =========================================
   11. Media Queries (Responsiveness)
   ========================================= */

/* Tablet & Smaller Desktop */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quote-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.75rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .process-steps {
        flex-direction: column;
        gap: 3rem;
    }

    .process-steps::before {
        width: 2px;
        height: auto;
        top: 40px;
        bottom: 40px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        background: repeating-linear-gradient(to bottom, var(--border-color) 0, var(--border-color) 10px, transparent 10px, transparent 20px);
    }

    /* Timeline Mobile Reset */
    .history-timeline::before {
        left: 20px;
        transform: none;
    }

    .history-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 60px !important;
        padding-right: 0 !important;
    }

    .history-item::before {
        left: 11px !important;
        right: auto !important;
    }
}

/* =========================================
   12. Logo Grid (New)
   ========================================= */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.logo-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 160px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.logo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.logo-card img {
    max-width: 80%;
    max-height: 60px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.logo-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.logo-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    transition: color 0.3s;
}

.logo-card:hover .logo-name {
    color: var(--primary-color);
}

/* Responsive Logo Grid */
@media (max-width: 1024px) {
    .logo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .logo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .logo-card {
        height: 140px;
        padding: 1rem;
    }
}
#achievements .section-title { color: white; }
#achievements .section-desc { color: rgba(255, 255, 255, 0.7); }
#achievements .history-content { color: rgba(255, 255, 255, 0.9); }
#achievements .history-year { color: #60a5fa; }

#intro .section-title {
    color: white !important;
}
#intro .intro-content p {
    color: rgba(255, 255, 255, 0.95) !important;
}
#intro .intro-badge {
    color: #60a5fa !important;
}

/* =========================================
   13. Footer Company Grid (Added)
   ========================================= */
.company {
    max-width: 980px;
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    text-align: left;
}

.detail {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #fff;
    border: 1px solid #edf0f2;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 6px 20px rgba(16, 24, 40, .06);
    color: var(--text-main);
}

.detail .icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
}

.detail .icon i {
    font-size: 1.1rem;
}

.detail.phone .icon {
    background: #25d366;
}

.detail.email .icon {
    background: #fff;
    color: var(--accent-color);
    border: 1px solid #edf0f2;
}

.detail.kakao .icon {
    background: #ffe812;
    color: #3c1e1e;
}

.detail.telegram .icon {
    background: #0088cc;
}

.detail .meta strong {
    display: block;
    margin-bottom: 2px;
    color: var(--text-main);
    font-weight: 700;
}

.meta a {
    color: var(--accent-color);
    font-weight: 700;
}

@media (max-width: 900px) {
    .company {
        grid-template-columns: 1fr;
    }
}
