/* Job Portal - Modern Premium CSS with Day/Night Mode */
/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for Theme */
:root[data-theme="light"] {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --secondary-dark: #db2777;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;

    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
}

:root[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --secondary-color: #f472b6;
    --secondary-dark: #ec4899;

    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;

    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);

    --success-color: #34d399;
    --warning-color: #fbbf24;
    --error-color: #f87171;
    --info-color: #60a5fa;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    /* Force scrollbar to prevent layout shift between pages */
    overflow-y: scroll;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

/* Page Transition Animations */
@media (prefers-reduced-motion: no-preference) {

    /* View Transitions API support for smooth page transitions */
    @view-transition {
        navigation: auto;
    }

    /* Fallback fade animation for browsers without View Transitions */
    body {
        animation: fadeIn 0.2s ease-in;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Specific class for page content transition to avoid conflicts with footer/header */
.page-content-wrapper {
    view-transition-name: page-content;
}

.container-fluid {
    width: 100%;
    padding: 0 1.5rem;
}

/* Header & Navigation */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    /* Prevent layout shift during page load */
    will-change: transform;
    transform: translateZ(0);
    /* Optimize rendering - header is always visible */
    content-visibility: auto;
    contain: layout style paint;
    /* Isolate header for view transitions to prevent it from participating in the page fade 
       NOTE: disabled specific transition name to fix shake issues caused by layer promotion
    */
    /* view-transition-name: site-header; */
}

.navbar {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    gap: 1.5rem;
}

.navbar .logo {
    margin-right: auto;
    order: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
    order: 2;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    order: 3;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Translate Toggle Button */
.translate-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.5rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.translate-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Hide Google Translate completely */
.skiptranslate,
#goog-gt-tt,
.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

/* Base Bottom Bar (Hidden on Desktop) */
.mobile-bottom-bar {
    display: none;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: row-reverse;
        /* Logo on right, actions on left */
        justify-content: space-between;
    }

    .nav-menu {
        display: none !important;
    }

    /* Circular Navigation Styles */
    .mobile-bottom-bar {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        z-index: 1000;
        justify-content: space-between;
        align-items: flex-end;
        pointer-events: none;
        /* Clicks fall through to page */
    }

    .bottom-action-btn {
        pointer-events: auto;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        color: white;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        text-decoration: none;
        z-index: 1001;
    }

    .bottom-action-btn:active {
        transform: scale(0.95);
    }

    .email-btn {
        background-color: var(--primary-color);
    }

    .whatsapp-btn {
        background-color: #25d366;
    }

    .whatsapp-btn svg {
        width: 24px;
        height: 24px;
    }

    .email-btn svg {
        width: 22px;
        height: 22px;
    }

    /* Circular Menu container */
    .circular-menu {
        position: relative;
        pointer-events: auto;
    }

    .fab-toggle {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        border: none;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        z-index: 1002;
        position: relative;
        cursor: pointer;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .circular-menu.active .fab-toggle {
        transform: rotate(45deg);
    }

    .menu-items {
        position: absolute;
        bottom: 30px;
        /* Center of FAB */
        left: 50%;
        width: 0;
        height: 0;
        z-index: 1001;
    }

    .menu-item {
        position: absolute;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: var(--bg-card);
        color: var(--text-primary);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-decoration: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        border: 1px solid var(--border-color);
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        transform: scale(0) translate(0, 0);
        /* Start hidden at center */
        opacity: 0;
        pointer-events: none;

        /* Offset absolute position to center it around the origin point */
        margin-left: -25px;
        margin-top: -25px;
    }

    .menu-item .icon {
        font-size: 1.2rem;
        line-height: 1;
    }

    .menu-item .label {
        font-size: 0.45rem;
        font-weight: 700;
        margin-top: 2px;
        text-transform: uppercase;
    }

    .menu-item.active {
        color: var(--primary-color);
        border-color: var(--primary-color);
    }

    /* Arc coordinates for 4 items (approx 140, 105, 75, 40 degrees) with R=100px */
    .circular-menu.active .menu-item {
        opacity: 1;
        pointer-events: auto;
        transform: scale(1);
    }

    .circular-menu.active .menu-item[style*="--i:1"] {
        transform: translate(-80px, -64px) scale(1);
        transition-delay: 0.1s;
    }

    /* Left most */
    .circular-menu.active .menu-item[style*="--i:2"] {
        transform: translate(-35px, -96px) scale(1);
        transition-delay: 0.15s;
    }

    /* Top left */
    .circular-menu.active .menu-item[style*="--i:3"] {
        transform: translate(35px, -96px) scale(1);
        transition-delay: 0.2s;
    }

    /* Top right */
    .circular-menu.active .menu-item[style*="--i:4"] {
        transform: translate(80px, -64px) scale(1);
        transition-delay: 0.25s;
    }

    /* Right most */

    /* Adjust page content padding */
    main#main-content {
        padding-bottom: 90px;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    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), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-body {
    margin-bottom: 1rem;
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    cursor: pointer;
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col {
    flex: 1;
    padding: 0 0.75rem;
}

.col-1 {
    flex: 0 0 8.333%;
    max-width: 8.333%;
}

.col-2 {
    flex: 0 0 16.666%;
    max-width: 16.666%;
}

.col-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-8 {
    flex: 0 0 66.666%;
    max-width: 66.666%;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Loading Indicator */
#loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 9999;
    opacity: 0;
}

#loading-indicator.active {
    opacity: 1;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        transform: scaleX(0);
    }

    50% {
        transform: scaleX(0.7);
    }

    100% {
        transform: scaleX(1);
    }
}

/* Lazy Loading Animation */
[data-lazy-load] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-lazy-load].loaded {
    opacity: 1;
    transform: translateY(0);
}

img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* Theme Toggle Button */
#theme-toggle {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

#theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .col-1,
    .col-2,
    .col-3,
    .col-4,
    .col-6,
    .col-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
    color: var(--text-secondary);
}

/* Activity Feed Styles */
.activity-feed {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.activity-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.activity-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin-bottom: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

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

/* CMS Inline Editing Styles */
.cms-text {
    transition: outline 0.2s ease, background-color 0.2s ease;
    border-radius: 4px;
}

.cms-text:hover {
    outline: 2px dashed rgba(255, 255, 255, 0.5);
    cursor: text;
    background-color: rgba(255, 255, 255, 0.05);
}

:root[data-theme="light"] .cms-text:hover {
    outline-color: rgba(0, 0, 0, 0.2);
    background-color: rgba(0, 0, 0, 0.02);
}