/* Master CSS - Japan Institute of HR Development */

:root {
    --color-navy: #0b2559;
    --color-navy-dark: #07193f;
    --color-navy-light: #183b82;
    --color-red: #c91c1c;
    --color-red-hover: #a81515;
    --color-gold: #d4af37;
    --color-bg-light: #f8fafc;
    --color-blue-bg: #eef5fc;
    --color-pink-bg: #fdf0f0;
    --color-text-main: #0a1c3d;
    --color-text-muted: #556885;
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

body {
    font-family: var(--font-main);
    color: var(--color-text-main);
    background-color: #ffffff;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}
.preloader-inner {
    text-align: center;
}
.preloader-logo {
    max-height: 80px;
    margin-bottom: 20px;
    animation: pulse 2s infinite ease-in-out;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(11, 37, 89, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-navy);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* Custom Text & Colors */
.text-navy { color: var(--color-navy) !important; }
.text-red { color: var(--color-red) !important; }
.text-gold { color: var(--color-gold) !important; }
.bg-navy { background-color: var(--color-navy) !important; }
.bg-navy-dark { background-color: var(--color-navy-dark) !important; }
.bg-red { background-color: var(--color-red) !important; }

/* Buttons */
.btn-navy {
    background-color: var(--color-navy);
    color: #ffffff;
    border: 1px solid var(--color-navy);
    transition: all 0.3s ease;
}
.btn-navy:hover {
    background-color: var(--color-navy-dark);
    color: #ffffff;
    border-color: var(--color-navy-dark);
}

.btn-outline-navy {
    background-color: transparent;
    color: var(--color-navy);
    border: 2px solid var(--color-navy);
    transition: all 0.3s ease;
}
.btn-outline-navy:hover {
    background-color: var(--color-navy);
    color: #ffffff;
}

.btn-red {
    background-color: var(--color-red);
    color: #ffffff;
    border: none;
    transition: all 0.3s ease;
}
.btn-red:hover {
    background-color: var(--color-red-hover);
    color: #ffffff;
}

/* Navbar */
.main-navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.brand-title {
    font-size: 0.95rem;
    letter-spacing: -0.2px;
}
.brand-subtitle {
    font-size: 0.85rem;
    color: var(--color-navy);
}
.navbar-nav .nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s ease;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.nav-active {
    color: #ffffff;
}
.navbar-nav .nav-link.nav-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: var(--color-red);
    border-radius: 2px;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0 3rem;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
    position: relative;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 520px;
}
.hero-badge {
    background: #ffffff;
    border-radius: 50px;
    padding: 0.5rem 1rem 0.5rem 0.6rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 0.85rem;
}
.badge-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
}
.hero-img-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

/* Feature Cards (Study in Japan, Vocational, Diversity) */
.program-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative;
}
.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}
.program-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.program-card-body {
    padding: 1.5rem;
    position: relative;
}
.btn-arrow-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-red);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 1.5rem;
    bottom: 1.5rem;
    transition: background 0.3s ease;
}
.btn-arrow-circle:hover {
    background-color: var(--color-navy);
    color: #ffffff;
}

/* Exam Section */
.exam-section-container {
    background-color: var(--color-navy);
    border-radius: 24px;
    padding: 3rem 2rem 2rem;
    color: #ffffff;
}
.exam-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 1.8rem 1.2rem;
    text-align: center;
    color: var(--color-text-main);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
.exam-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-navy);
    margin-bottom: 0.2rem;
}
.exam-card-sub {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: 1.2rem;
}
.exam-logo-box {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.exam-tips-bar {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    color: var(--color-text-main);
    margin-top: 2rem;
}
.exam-tip-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-main);
}
.exam-tip-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #eef4ff;
    color: var(--color-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Process Timeline */
.process-line-wrapper {
    position: relative;
}
.process-line-wrapper::before {
    content: '';
    position: absolute;
    top: 35px;
    left: 5%;
    right: 5%;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}
.process-step-item {
    position: relative;
    z-index: 2;
    text-align: center;
}
.step-icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #eef5fc;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem;
    color: var(--color-navy);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}
.process-step-item:hover .step-icon-circle {
    background-color: var(--color-navy);
    color: #ffffff;
    border-color: var(--color-navy);
}
.step-number-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--color-navy);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -20px auto 0.6rem;
    position: relative;
    z-index: 3;
}
.step-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-navy);
    margin-bottom: 0.4rem;
}
/* Vertical Timeline for Study in Japan Process */
.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 50px;
}
.process-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e2e8f0;
    z-index: 1;
}
.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}
.timeline-item:last-child {
    margin-bottom: 0;
}
.timeline-badge {
    position: absolute;
    left: -50px;
    top: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 2;
    border: 2px solid #e2e8f0;
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.timeline-item.active .timeline-badge {
    border-color: var(--color-red) !important;
}
.timeline-content {
    background-color: #ffffff;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    position: relative;
}
.timeline-content::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 15px;
    width: 14px;
    height: 14px;
    background-color: #ffffff;
    transform: rotate(45deg);
    border-left: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}
.bg-red-soft {
    background-color: #fee2e2;
}

/* Important Callout Box */
.important-box {
    background-color: var(--color-blue-bg);
    border-radius: 12px;
    padding: 1.2rem 1.8rem;
}
.important-title {
    font-weight: 800;
    color: var(--color-navy);
    font-size: 1.1rem;
}

/* Intake & Fee Section */
.intake-card {
    background-color: var(--color-pink-bg);
    border: 1px solid #fecaca;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    height: 100%;
}
.intake-card-bg {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 200px;
    height: 200px;
    opacity: 0.8;
    pointer-events: none;
}
.intake-highlight-box {
    background-color: rgba(239, 68, 68, 0.08);
    border-left: 4px solid var(--color-red);
    padding: 1rem;
    border-radius: 8px;
    color: var(--color-red);
    font-weight: 700;
    font-size: 0.92rem;
}

.fee-card {
    background-color: var(--color-blue-bg);
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    height: 100%;
}
.fee-card-bg {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 200px;
    height: 200px;
    opacity: 0.8;
    pointer-events: none;
}
.fee-highlight-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-navy);
}

/* Why Choose Us */
.why-item {
    text-align: center;
}
.why-icon-box {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #eef5fc;
    border: 2px solid #93c5fd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem;
    color: var(--color-navy);
    font-size: 1.6rem;
}
.why-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-navy);
}

/* CTA Banner Box */
.cta-banner {
    background-color: var(--color-navy);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    color: #ffffff;
}
.trophy-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--color-gold);
    flex-shrink: 0;
}

/* Footer */
.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: #ffffff;
}
.social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}
.social-icon:hover {
    background-color: #ffffff;
    color: var(--color-navy);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-title { font-size: 2.6rem; }
    .process-line-wrapper::before { display: none; }
    .process-step-item { margin-bottom: 2rem; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 2rem; }
    .cta-banner { text-align: center; }
    .cta-banner .d-flex { flex-direction: column; text-align: center; }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    z-index: 1040;
    padding-bottom: env(safe-area-inset-bottom); /* For iPhone notch */
}
.mobile-bottom-nav .nav-item {
    flex: 1;
}
.mobile-bottom-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    padding: 0.3rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    height: 100%;
    transition: all 0.3s ease;
}
.mobile-bottom-nav .nav-link i {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}
.mobile-bottom-nav .nav-link:hover,
.mobile-bottom-nav .nav-link.active,
.mobile-bottom-nav .nav-link:focus {
    color: var(--color-red);
}
.mobile-bottom-nav .nav-enroll-btn {
    width: 50px;
    height: 50px;
    background-color: var(--color-red);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -25px; /* Protrude above the bar */
    box-shadow: 0 4px 10px rgba(201, 28, 28, 0.4);
    border: 4px solid #ffffff;
    transition: transform 0.3s ease;
}
.mobile-bottom-nav .nav-enroll-btn i {
    margin-bottom: 0;
    font-size: 1.4rem;
}
.mobile-bottom-nav .nav-link:hover .nav-enroll-btn {
    transform: translateY(-3px);
}

/* Adjust body padding for mobile to not hide content behind nav bar */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 75px;
    }
    .footer {
        padding-bottom: 75px !important;
    }
}
