:root {
    --primary: #1F4E79;
    --secondary: #4B5E6B;
    --light: #f8f9fa;
    --dark: #1a1a1a;
    --primary-color: #1F4E79;
    --secondary-color: #4B5E6B;
    --light-color: #f8f9fa;
    --dark-color: #1a1a1a;
}

body {
    font-family: 'Poppins', 'Noto Sans TC', sans-serif;
    overflow-x: hidden;
}

body.auth-layout {
    background: var(--primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Navbar */
body {
    padding-top: 70px; /* Prevent content hidden behind fixed navbar */
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary) !important;
}

.custom-navbar {
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030 !important;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(31, 78, 121, 0.1);
}

.custom-navbar .nav-link {
    color: var(--primary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link.active {
    color: var(--secondary) !important;
}

.custom-navbar .dropdown-menu {
    background: var(--primary);
    border: none;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.custom-navbar .dropdown-item {
    color: #fff !important;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.custom-navbar .dropdown-item:hover {
    background: var(--secondary);
    color: #fff !important;
}

/* Hero Slider */
.hero-section {
    position: relative;
    height: 80vh;
    min-height: 600px;
}

.carousel-item {
    height: 80vh;
    min-height: 600px;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    top: 40%;
    bottom: auto;
    text-align: left;
    left: 10%;
    right: 10%;
}

.carousel-caption h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.carousel-caption p {
    font-size: 1.25rem;
    color: var(--secondary);
    font-weight: 400;
}

.btn-primary-custom {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background: var(--secondary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(31, 78, 121, 0.3);
}

/* Section Title */
.section-title {
    position: relative;
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    color: var(--primary);
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
}

/* About Section */
.about-section {
    background: #fff;
}

.about-content {
    color: #333;
    line-height: 1.8;
}

.about-content h3 {
    color: var(--primary);
    font-weight: 600;
    margin-top: 2rem;
}

.about-content h3:first-child {
    margin-top: 0;
}

.about-content ul {
    list-style: none;
    padding-left: 0;
}

.about-content ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.about-content ul li::before {
    content: '•';
    color: var(--secondary);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -0.2rem;
}

/* Sector Services */
.sector-services {
    background: var(--light);
}

.service-btn {
    background: #fff;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-align: left;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 1rem;
    cursor: pointer;
}

.service-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(31, 78, 121, 0.2);
}

.service-btn i {
    margin-right: 0.75rem;
    color: var(--secondary);
}

.service-btn:hover i {
    color: #fff;
}

/* Talent Search */
.talent-search {
    background: var(--secondary);
    color: #fff;
}

.talent-search h2 {
    color: #fff;
}

.talent-search .form-control,
.talent-search .form-select {
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.talent-search .btn-search {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
}

.talent-search .btn-search:hover {
    background: #164062;
}

/* Latest News */
.news-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(31, 78, 121, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(31, 78, 121, 0.2);
}

.news-card img {
    border-radius: 12px 12px 0 0;
    height: 200px;
    object-fit: cover;
}

.news-card .card-body {
    padding: 1.5rem;
}

.news-card h5 {
    color: var(--primary);
    font-weight: 600;
}

.news-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: var(--primary);
    color: #fff;
    padding: 4rem 0 2rem;
}

.footer h5 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer p,
.footer a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--secondary);
}

.footer .contact-info {
    line-height: 1.8;
}

.footer .contact-info i {
    color: var(--secondary);
    margin-right: 0.75rem;
    width: 20px;
}

.footer-links a {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #b0b0b0;
}

/* Auth Pages (Login & Register) */
.login-wrapper,
.register-wrapper {
    width: 100%;
    max-width: 450px;
    margin: auto;
}

.login-card,
.register-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(31, 78, 121, 0.3);
    overflow: hidden;
}

.login-header,
.register-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    padding: 2rem 2rem 1.5rem;
    text-align: center;
}

.login-header .brand-icon,
.register-header .brand-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.login-header h2,
.register-header h2 {
    margin: 0;
    font-weight: 700;
    font-size: 1.75rem;
}

.login-header p,
.register-header p {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

.login-body,
.register-body {
    padding: 2.5rem 2rem;
}

.login-body .form-label,
.register-body .form-label {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.login-body .form-control,
.register-body .form-control {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.login-body .form-control:focus,
.register-body .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(31, 78, 121, 0.15);
}

.input-group-text {
    background: #fff;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--secondary);
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.btn-login,
.btn-register {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.btn-login:hover,
.btn-register:hover {
    background: var(--secondary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(31, 78, 121, 0.3);
}

.btn-login:active,
.btn-register:active {
    transform: translateY(0);
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #ddd;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    position: relative;
    display: inline-block;
    padding: 0 0.75rem;
    background: #fff;
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
}

.social-login .btn-social {
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-login .btn-social:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.social-login .btn-social i {
    margin-right: 0.5rem;
}

.footer-login,
.footer-register {
    text-align: center;
    margin-top: 1.5rem;
    color: #fff;
    font-size: 0.9rem;
}

.footer-login a,
.footer-register a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.footer-login a:hover,
.footer-register a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert-custom {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
}

.alert-danger {
    background: #f8d7da;
    color: #842029;
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-caption h1 {
        font-size: 2rem;
    }
    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .login-wrapper,
    .register-wrapper {
        padding: 1rem;
    }
    .login-body,
    .register-body {
        padding: 1.5rem 1rem;
    }
}
