/* ===================================
   Global Styles
   =================================== */
:root {
    --primary-color: #1955d7;
    --secondary-color: #1a1a1a;
    --primary-text-color: #1c2a3a;
    --dark-color: #111111;
    --light-color: #f5f5f5;
    --text-muted: #606060;
    --accent-slate: #2e2e2e;
    --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 rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.text-primary {
    color: var(--primary-text-color) !important;
}

.text-accent {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-brand-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8c1318 45%, #0c0c0c 100%) !important;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.bg-brand-gradient::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 60%);
    transform: rotate(25deg);
    pointer-events: none;
    z-index: 0;
}

.bg-brand-gradient .lead {
    color: rgba(255, 255, 255, 0.85);
}

.bg-brand-gradient > * {
    position: relative;
    z-index: 1;
}

/* ===================================
   Navigation Styles
   =================================== */
.navbar {
    transition: var(--transition);
    background-color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    backdrop-filter: none;
}

.navbar-brand {
    transition: transform 0.3s ease;
}


.navbar-brand:hover {
    transform: translateX(5px);
}

.brand-logo-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 16px;
    padding: 6px 14px;
    border: none;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.brand-logo {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .brand-logo-frame {
    transform: translateY(-2px);
}

.brand-text-group {
    line-height: 1.2;
}

.brand-text-group .brand-en {
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-slate);
}

.brand-text-group .brand-ko {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    position: relative;
    transition: var(--transition);
    margin: 0 5px;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 30px;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-text-color) !important;
    transform: translateY(-2px);
}

/* ===================================
   Hero Section Styles
   =================================== */
.hero-section {
    --hero-bg-image: url('../img/index1.jpg');
    background-image: var(--hero-bg-image);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    padding: 4rem 0;
}


.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top left, rgba(215, 25, 32, 0.7) 0%, rgba(215, 25, 32, 0.55) 35%, rgba(17, 17, 17, 0.85) 100%);
    pointer-events: none;
    z-index: 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.08" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
}

.hero-section > * {
    position: relative;
    z-index: 2;
}

@media (max-width: 991.98px) {
    .hero-section {
        min-height: 60vh;
        padding: 3rem 0;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        min-height: 50vh;
        padding: 2.5rem 0;
    }
}

.hero-image-placeholder {
    animation: float 6s ease-in-out infinite;
    transition: transform 0.3s ease;
    border: 2px dashed rgba(215, 25, 32, 0.4);
}

.hero-image-placeholder:hover {
    transform: scale(1.05) rotateZ(2deg);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-kicker::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0.8;
}

.hero-highlight {
    color: #ffffff;
    font-weight: 700;
}

.hero-description {
    color: rgba(255, 255, 255, 0.82);
}

.hero-badges {
    gap: 12px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--accent-slate);
    border: 1px solid rgba(215, 25, 32, 0.2);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.hero-badge i {
    color: var(--primary-color);
}

.hero-logo-card {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    padding: 3rem 3rem 2.75rem 3.75rem;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
    border: none;
}

.hero-logo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), #8c1318);
    border-radius: 24px 0 0 24px;
}

.hero-logo-card .brand-logo-frame {
    padding: 28px 36px;
    border-radius: 22px;
    box-shadow: none;
    border: none;
    background: #ffffff;
}

.hero-logo-card .hero-logo-image {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    margin: 0 auto;
}
.hero-logo-caption {
    margin-top: 1.75rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.78rem;
    color: var(--accent-slate);
    text-align: center;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ===================================
   Card Styles with Animations
   =================================== */
.feature-card,
.service-card,
.industry-card,
.solution-card,
.info-card,
.spec-card,
.transport-card,
.branch-card,
.value-card {
    background: white;
    border-radius: 15px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before,
.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(215, 25, 32, 0.12), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.feature-card:hover::before,
.service-card:hover::before {
    animation: shimmer 0.5s ease;
    opacity: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.feature-card:hover,
.service-card:hover,
.industry-card:hover,
.transport-card:hover,
.branch-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.solution-card {
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.solution-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(215, 25, 32, 0.25);
    border-color: rgba(215, 25, 32, 0.6);
}

/* ===================================
   Button Styles with Animations
   =================================== */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #8c1318);
    border: none;
}

.btn-outline-primary {
    color: var(--primary-text-color);
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(215, 25, 32, 0.35);
    background: linear-gradient(135deg, #8c1318, var(--primary-color));
}

.btn-outline-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(215, 25, 32, 0.2);
    color: #ffffff !important;
    background: var(--primary-color);
}

/* ===================================
   Counter Animation Styles
   =================================== */
.counter {
    display: inline-block;
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===================================
   Timeline Styles
   =================================== */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), rgba(17, 17, 17, 0.85));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item:hover::before {
    transform: translateX(-50%) scale(1.5);
    background: var(--primary-color);
}

.timeline-date {
    flex: 1;
    text-align: right;
    padding-right: 40px;
    font-weight: bold;
    color: var(--primary-text-color);
}

.timeline-content {
    flex: 1;
    padding-left: 40px;
}

/* ===================================
   Process Step Styles
   =================================== */
.process-step {
    position: relative;
    padding: 20px;
}

.step-number {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #8c1318);
    color: white;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(215, 25, 32, 0.6); }
    70% { box-shadow: 0 0 0 20px rgba(215, 25, 32, 0); }
    100% { box-shadow: 0 0 0 0 rgba(215, 25, 32, 0); }
}

/* ===================================
   Form Styles
   =================================== */
.form-control,
.form-select {
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    padding: 12px 15px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.1);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

/* ===================================
   Accordion Styles
   =================================== */
.accordion-item {
    border: none;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.accordion-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.accordion-button {
    background: white;
    color: var(--dark-color);
    font-weight: 500;
    padding: 20px;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, rgba(215, 25, 32, 0.08), rgba(26, 26, 26, 0.05));
    color: var(--primary-text-color);
}

.accordion-button:focus {
    box-shadow: none;
}

/* ===================================
   Image Placeholder Animations
   =================================== */
.card-image-placeholder,
.hero-image-placeholder,
.integrated-image-placeholder,
.ceo-image-placeholder,
.placeholder-logo {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-image-placeholder::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 70%
    );
    animation: imageShimmer 3s infinite;
}

@keyframes imageShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* ===================================
   Entrance Animation Utilities
   =================================== */
.animate-on-load {
    opacity: 0;
    animation-duration: 1s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-fade-up {
    animation-name: fadeUpIn;
}

.animate-slide-in-left {
    animation-name: slideInLeft;
}

.animate-slide-in-right {
    animation-name: slideInRight;
}

.animate-zoom-in {
    animation-name: zoomInSoft;
}

.animation-delay-100 { animation-delay: 0.1s; }
.animation-delay-150 { animation-delay: 0.15s; }
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-400 { animation-delay: 0.4s; }

@keyframes fadeUpIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-40px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(40px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomInSoft {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .animate-on-load {
        animation: none !important;
        opacity: 1 !important;
    }
}

/* ===================================
   Scroll Animations
   =================================== */
[data-aos] {
    transition-property: transform, opacity !important;
}

/* ===================================
   Location Map Styles
   =================================== */
.map-container {
    min-height: 360px;
}

@media (min-width: 992px) {
    .map-container {
        min-height: 500px;
    }
}

.map-container .root_daum_roughmap {
    width: 100% !important;
    height: 100% !important;
}

.map-container .root_daum_roughmap .wrap_map,
.map-container .root_daum_roughmap .map_wrap {
    height: 100% !important;
}

/* ===================================
   Footer Styles
   =================================== */
footer {
        --page-header-image: url('../img/index3.jpg');
    background-image: var(--page-header-image);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    animation: footerWave 15s linear infinite;
}

.footer-accordion .accordion-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.footer-accordion .accordion-item + .accordion-item {
    margin-top: 0.75rem;
}

.footer-accordion-button {
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;
    font-weight: 600;
    padding: 0.85rem 1rem;
}

.footer-accordion-button:not(.collapsed) {
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
}

.footer-accordion-button:focus {
    box-shadow: none;
}

.footer-accordion-button::after {
    filter: invert(1);
}

.footer-accordion-body {
    background: rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.85);
}

@keyframes footerWave {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===================================
   Loading Animation
   =================================== */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(215, 25, 32, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   Hover Effects
   =================================== */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ===================================
   Page Header Gradient Animation
   =================================== */
.page-header {
    --page-header-image: url('../img/index1.jpg');
    background-image: var(--page-header-image);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(215, 25, 32, 0.85) 0%, rgba(26, 26, 26, 0.95) 100%);
    z-index: 0;
}

.page-header > * {
    position: relative;
    z-index: 1;
}


@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===================================
   Custom Scrollbar
   =================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), rgba(17, 17, 17, 0.95));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(17, 17, 17, 0.95), var(--primary-color));
}

/* ===================================
   Responsive Styles
   =================================== */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item::before {
        left: 30px;
    }

    .timeline-date {
        text-align: left;
        padding-right: 0;
        padding-left: 60px;
    }

    .timeline-content {
        padding-left: 60px;
    }

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

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.5rem;
    }

    .brand-logo {
        height: 48px;
    }

    .brand-logo-frame {
        padding: 4px 10px;
        border-radius: 14px;
    }

    .hero-logo-card {
        padding: 2.25rem 2.25rem 2.25rem 3rem;
    }

    .hero-logo-card::before {
        width: 12px;
    }

    .hero-logo-card .brand-logo-frame {
        padding: 20px 26px;
        border-radius: 18px;
    }

    .hero-logo-caption {
        letter-spacing: 0.18em;
    }

    .hero-badge {
        width: 100%;
        justify-content: center;
    }
}

/* ===================================
   Image Fit Styles
   =================================== */
.img-fit {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.img-contain {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .navbar,
    footer,
    .btn,
    .page-header {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
    }
}
