body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
}

.custom-file-upload {
    border: 2px dashed #e2e8f0;
    transition: all 0.3s ease-in-out;
}

.custom-file-upload:hover {
    border-color: #4f46e5;
    background-color: #f8fafc;
    transform: scale(1.02);
}

#modal-close-btn {
    font-size: 2.5rem;
    line-height: 1;
    font-weight: 300;
}

.candidate-card {
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.candidate-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.07);
}

.skill-tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    background-color: #eef2ff;
    color: #4338ca;
}

.spinner {
    border-color: #4f46e5;
    border-top-color: transparent;
    width: 1rem;
    height: 1rem;
    border-width: 2px;
    border-style: solid;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.pulse-dot {
    height: 8px;
    width: 8px;
    background-color: #4f46e5;
    border-radius: 50%;
    animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

.score-ring {
    width: 60px;
    height: 60px;
}

.score-ring-circle {
    transition: stroke-dashoffset 0.5s ease-in-out;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.parallax-section {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.will-animate {
    will-change: transform, opacity;
}

.will-animate-complete {
    will-change: auto;
}

.smooth-transform {
    transition: transform 0.1s ease-out;
}

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

.icon-hover:hover,
.group:hover .icon-hover {
    transform: rotate(6deg) scale(1.1);
}

.card-lift {
    transition: all 0.3s ease-out;
}

@media (max-width: 768px) {

    .parallax-section,
    .hero-parallax,
    .about-parallax {
        background-attachment: scroll;
    }

    .smooth-transform {
        transition: none;
    }

    .will-animate {
        will-change: auto;
    }
}

/* Extra Small Screens (320px-480px) */
@media (max-width: 480px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    body {
        font-size: 14px;
    }

    .candidate-card,
    .card-lift {
        border-radius: 0.5rem;
    }
}

/* Small Screens (481px-768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Touch-Friendly Enhancements */
.touch-target {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.touch-target.block,
.touch-target.w-full {
    display: flex;
    justify-content: flex-start;
}

/* Disable hover effects on touch devices */
@media (hover: none) {

    .candidate-card:hover,
    .card-lift:hover,
    .icon-hover:hover,
    .group:hover .icon-hover {
        transform: none;
    }

    *:hover {
        transform: none !important;
    }
}

/* Performance Optimizations for Mobile */
@media (max-width: 768px) {
    .card-lift:hover {
        transform: none;
    }

    .icon-hover {
        transition: none;
    }

    .icon-hover:hover,
    .group:hover .icon-hover {
        transform: none;
    }

    * {
        transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    }

    .will-animate,
    .will-animate-complete {
        will-change: auto;
    }
}

/* Restore Hover Effects on Pointer Devices */
@media (hover: hover) {
    .card-lift:hover {
        transform: translateY(-8px) scale(1.02);
    }
}

/* Typography Adjustments for Mobile */
@media (max-width: 768px) {
    body {
        line-height: 1.5;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        letter-spacing: -0.01em;
    }

    h1,
    h2,
    h3 {
        font-weight: 700;
    }
}

/* Spacing and Layout Optimizations for Landing Sections on Mobile */
@media (max-width: 640px) {

    #about,
    #job-openings,
    #why-join {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    #company-stats,
    #job-openings .grid,
    #why-join .grid {
        gap: 1rem;
    }

    #about+#job-openings,
    #job-openings+#why-join {
        margin-top: 0;
    }
}

/* Apply Page Mobile Card Styles */
.mobile-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-card-field {
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.mobile-card-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.mobile-card-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.mobile-card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.mobile-card-remove-btn {
    background-color: #ef4444;
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 44px;
    min-width: 44px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.mobile-card-remove-btn:hover {
    background-color: #dc2626;
}

.mobile-card-remove-btn:active {
    transform: scale(0.98);
}

@media (max-width: 640px) {

    /* Mobile Input Optimizations */
    #job-app-form input[type="text"],
    #job-app-form input[type="email"],
    #job-app-form input[type="tel"],
    #job-app-form input[type="date"],
    #job-app-form input[type="number"],
    #job-app-form select,
    #job-app-form textarea {
        font-size: 16px !important;
        padding: 0.625rem 0.75rem;
        -webkit-appearance: none;
        appearance: none;
    }

    #job-app-form select {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 0.5rem center;
        background-size: 1.25rem;
        padding-right: 2.5rem;
    }

    #job-app-form textarea {
        min-height: 80px;
        resize: vertical;
    }

    /* Mobile Buttons */
    #job-app-form button,
    #job-app-form .btn,
    #job-app-form [role="button"] {
        min-height: 44px;
        min-width: 44px;
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    #job-app-form button:active,
    #job-app-form .btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    /* CV Upload Zone */
    #cv-upload-zone {
        padding: 1.5rem 1rem;
        min-height: 180px;
        touch-action: manipulation;
    }

    #cv-upload-zone .text-6xl {
        font-size: 2.5rem;
    }

    #photoPreview {
        width: 6rem;
        height: 8rem;
    }

    /* Grid & Spacing Adjustments */
    #job-app-form .grid {
        gap: 0.75rem;
    }

    #job-app-form .bg-white.rounded-xl {
        border-radius: 0.75rem;
        padding: 1rem;
    }

    #job-app-form h3.text-lg {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    /* Touch-friendly radios & checkboxes */
    #job-app-form input[type="radio"],
    #job-app-form input[type="checkbox"] {
        width: 1.25rem;
        height: 1.25rem;
        min-width: 44px;
        min-height: 44px;
        cursor: pointer;
    }

    #job-app-form label:has(input[type="radio"]),
    #job-app-form label:has(input[type="checkbox"]) {
        min-height: 44px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        cursor: pointer;
    }

    /* Validation Messages */
    #pancard_error,
    #pancard_success,
    #cv-error,
    #cv-success {
        font-size: 0.75rem;
        padding: 0.625rem;
        margin-top: 0.5rem;
    }

    /* Loading States */
    #cv-loading {
        font-size: 0.875rem;
        padding: 0.75rem;
    }

    .animate-spin {
        width: 1.25rem;
        height: 1.25rem;
    }
}

@media (max-width: 768px) {
    .overflow-x-auto {
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 #f1f5f9;
    }

    .overflow-x-auto::-webkit-scrollbar {
        height: 6px;
    }

    .overflow-x-auto::-webkit-scrollbar-track {
        background: #f1f5f9;
    }

    .overflow-x-auto::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }
}

/* Thank You Page Mobile Optimizations */
.thank-you-page {
    width: 100%;
    position: relative;
}

@media (max-width: 480px) {
    .thank-you-page {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .thank-you-page .max-w-5xl {
        max-width: 100%;
    }

    .thank-you-page [role="img"][aria-label="Success checkmark"] {
        width: 3.5rem !important;
        height: 3.5rem !important;
    }

    .thank-you-page [role="img"][aria-label="Success checkmark"] svg {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }

    .thank-you-page .rounded-2xl {
        border-radius: 0.75rem !important;
    }

    .thank-you-page .grid {
        grid-template-columns: 1fr !important;
    }

    .thank-you-page button,
    .thank-you-page a[role="button"],
    .thank-you-page .inline-flex,
    .thank-you-page .flex-1 {
        font-size: 14px;
    }

    .thank-you-page .border-indigo-100 p {
        word-break: break-all;
        overflow-wrap: anywhere;
    }

    .thank-you-page .timeline-step {
        gap: 0.5rem !important;
    }

    .thank-you-page .timeline-step span {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .thank-you-page .rounded-2xl {
        border-radius: 0.9rem;
    }

    .thank-you-page .border-indigo-100,
    .thank-you-page .bg-white\/90 {
        padding: 1.25rem 1.5rem !important;
    }

    .thank-you-page .border-indigo-100 p {
        font-size: 0.95rem;
    }

    .thank-you-page .border-white\/40 {
        padding: 1.25rem 1.5rem !important;
    }
}

@media (hover: none) {

    .thank-you-page button,
    .thank-you-page a {
        -webkit-tap-highlight-color: transparent;
    }

    .thank-you-page button:hover,
    .thank-you-page a:hover,
    .thank-you-page button:focus-visible,
    .thank-you-page a:focus-visible {
        transform: none !important;
    }

    .thank-you-page button:active,
    .thank-you-page a:active {
        transform: scale(0.98);
    }
}

@media (max-width: 640px) {

    .thank-you-page button,
    .thank-you-page a {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
        font-size: 14px;
    }

    .thank-you-page [onclick="window.print()"] {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .thank-you-page .flex-col>.inline-flex,
    .thank-you-page .flex-col>a {
        width: 100%;
    }
}

.thank-you-page .copy-success {
    background-color: #16a34a !important;
    color: #f8fafc !important;
    border-color: #22c55e !important;
    animation: copyFlash 0.6s ease;
}

@keyframes copyFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    }

    100% {
        box-shadow: 0 0 0 1.5rem rgba(34, 197, 94, 0);
    }
}

.thank-you-page .timeline-step p {
    line-height: 1.5;
}

.thank-you-page .timeline-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.thank-you-page .border-indigo-100,
.thank-you-page .bg-white\/90,
.thank-you-page .bg-slate-900 {
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.thank-you-page .bg-white\/10 a {
    word-break: break-all;
}

@media (max-width: 768px) {

    .thank-you-page .border-indigo-100,
    .thank-you-page .bg-white\/90,
    .thank-you-page .bg-slate-900 {
        will-change: auto;
        transition: opacity 0.2s ease, background-color 0.2s ease;
    }

    .thank-you-page .card-lift,
    .thank-you-page .hover\:shadow-xl,
    .thank-you-page .hover\:-translate-y-0\.5 {
        transition: none !important;
        transform: none !important;
    }
}

.thank-you-page button:focus-visible,
.thank-you-page a:focus-visible {
    outline: 2px solid rgba(79, 70, 229, 0.8);
    outline-offset: 2px;
}

.thank-you-page button {
    font-weight: 600;
}

@media print {
    body {
        background: #ffffff !important;
    }

    nav,
    footer,
    .site-header,
    .site-footer,
    .thank-you-page a[href="/"],
    .thank-you-page a[href="/#job-openings"] {
        display: none !important;
    }

    .thank-you-page,
    .thank-you-page .max-w-5xl {
        padding: 0;
        max-width: 100%;
    }

    .thank-you-page .border-indigo-100 p {
        font-size: 1.125rem;
        font-weight: 700;
        color: #1e1b4b;
    }
}