/* Design System */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #10b981;
    --background: #f8fafc;
    --text: #0f172a;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    caret-color: transparent;
    /* Remove default blinking cursor from non-inputs */
}

input,
textarea,
[contenteditable="true"] {
    caret-color: auto;
    /* Restore for inputs */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.header {
    height: 80px;
    display: flex;
    align-items: center;
    background-color: var(--glass);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 70px;
    /* Increased from 50px */
    width: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent),
        radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.05), transparent);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Stats Section */
.stats {
    padding: 4rem 0;
    background-color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--secondary);
    font-weight: 600;
}

/* Common Section Styles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Recruiters & Sectors Grid */
.recruiters {
    padding: 4rem 0 2rem 0;
    /* Reduced gaps */
}

.sectors {
    padding: 0 0 4rem 0;
    /* Reduced gaps */
}

.recruiters-grid,
.sectors-grid {
    display: none;
}

.card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 40px;
    height: 40px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* Registration Form */
.registration {
    padding: 6rem 0;
    background-color: #f1f5f9;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.form-section {
    margin-bottom: 2rem;
}

.form-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.form-group {
    margin-bottom: 1rem;
}

/* Address Grid */
.form-grid-address {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input:not([type]),
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--white);
    color: var(--text);
    display: block;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.error-input {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.error-hint {
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
    display: block;
}

.radio-group,
.checkbox-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
}

.radio-group label,
.checkbox-group label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Hero Details */
.hero-details {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text);
}

.hero-details p {
    margin-bottom: 0.5rem;
}

/* About Section */
.about {
    padding: 6rem 0;
    background-color: var(--white);
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--secondary);
    font-size: 1.1rem;
}

/* Infinite Carousel */
.carousel-container {
    overflow: hidden;
    padding: 2rem 0;
    position: relative;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-right {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.track-reverse {
    animation: scroll-right 40s linear infinite !important;
}

.sector-carousel {
    padding: 1rem 0;
}

.sector-carousel .logo-card {
    min-width: 240px;
    height: 70px;
    flex-direction: row;
    gap: 1rem;
    padding: 0.5rem 1.5rem;
    background: #fdfdfd;
}

.sector-carousel .card-icon {
    width: 42px;
    height: 42px;
    background: var(--primary);
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 8px;
}

.sector-carousel .card-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.sector-carousel span {
    font-size: 0.95rem;
    text-align: left;
}

.logo-card {
    background: var(--white);
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 100px;
    flex-shrink: 0;
    text-align: center;
}

.logo-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-card span {
    font-size: 0.8rem;
    font-weight: 600;
    word-break: break-word;
}

/* Form Visibility */
.hidden {
    display: none;
}

/* Helpers */
.w-100 {
    width: 100%;
}

.footer-bottom {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--secondary);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* Success Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    overflow-y: auto;
    /* Enable scroll inside the modal overlay */
    padding: 3rem 1rem;
    /* More space at top/bottom for scrolling comfort */
    backdrop-filter: blur(10px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.modal-content {
    background-color: var(--white);
    padding: 2rem;
    /* Reduced from 3rem */
    border-radius: 1.5rem;
    max-width: 600px;
    width: 95%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease-out;
    margin: 0 auto;
    /* Center horizontally */
}

/* Admit Card Styling */
.admit-card {
    background: var(--white);
    padding: 1.5rem;
    /* Reduced from 2.5rem */
    border: 3px solid var(--primary);
    border-radius: 1.25rem;
    text-align: left;
    color: var(--text);
    margin: 0.5rem 0;
    box-shadow: 0 0 0 10px var(--white);
}

.admit-card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
    margin-bottom: 1.5rem;
}

.admit-logo {
    height: 60px;
    width: auto;
}

.admit-title-box h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin: 0;
}

.admit-title-box p {
    margin: 0;
    font-weight: 600;
    color: var(--secondary);
}

.reg-id-box {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    align-items: center;
    border: 1px dashed var(--primary);
}

.info-grid-admit {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    padding: 0.5rem 0;
}

.info-grid-admit .info-item.w-100 {
    grid-column: span 2;
}

.info-item .label {
    display: block;
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 600;
}

.info-item .value {
    display: block;
    font-size: 1.1rem;
    color: var(--text);
    font-weight: 700;
    line-height: 1.5;
    word-break: break-word;
}

.value.highlight {
    color: var(--primary);
}

.admit-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: var(--secondary);
    text-align: center;
}

.modal-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Print Specific Styles */
@media print {
    body * {
        visibility: hidden !important;
    }

    #admitCardPrint,
    #admitCardPrint *,
    #applicationCard,
    #applicationCard * {
        visibility: visible !important;
        caret-color: transparent !important;
    }

    #admitCardPrint,
    #applicationCard {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 2rem;
        border: 2px solid var(--primary);
        border-radius: 0;
        background: white !important;
        box-shadow: none !important;
    }

    .modal {
        position: absolute;
        display: block;
        background: none;
        backdrop-filter: none;
        padding: 0;
    }

    .modal-actions {
        display: none;
    }
}

@keyframes modalIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.modal h2 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.modal p {
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

/* Mobile & Tablet Overhaul */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .header {
        height: auto;
        padding: 0.75rem 0;
    }

    .header nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .logo img {
        height: 45px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-btns {
        flex-direction: column;
        max-width: 300px;
        margin: 0 auto;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 0.85rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 1.5rem;
    }

    .form-row,
    .form-grid-address {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Table Mobile Card View */
    .vacancy-table,
    .vacancy-table thead,
    .vacancy-table tbody,
    .vacancy-table th,
    .vacancy-table td,
    .vacancy-table tr {
        display: block;
    }

    .vacancy-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .vacancy-table tr {
        margin-bottom: 1.5rem;
        background: var(--white);
        border: 1px solid #e2e8f0;
        border-radius: 1rem;
        padding: 1.25rem;
        box-shadow: var(--shadow);
    }

    .vacancy-table td {
        border: none;
        position: relative;
        padding: 0.75rem 0 !important;
        text-align: left;
        border-bottom: 1px solid #f1f5f9;
    }

    .vacancy-table td:last-child {
        border-bottom: none;
    }

    .vacancy-table td:before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        font-size: 0.7rem;
        color: var(--secondary);
        text-transform: uppercase;
        margin-bottom: 0.25rem;
    }

    .vacancy-table td[data-label="Action"] {
        padding-top: 1rem !important;
    }

    .carousel-track {
        animation-duration: 25s;
    }

    .modal-content {
        padding: 1.25rem;
        width: 100%;
        border-radius: 1rem;
    }

    .admit-card {
        padding: 1rem;
        border-width: 2px;
    }

    .admit-card-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding-bottom: 1rem;
    }

    .admit-logo {
        height: 45px;
    }

    .reg-id-box {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 0.75rem;
    }

    .info-grid-admit {
        grid-template-columns: 1fr;
    }

    .info-item .value {
        font-size: 0.95rem;
    }
}
