* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
} 
 
html {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e4e6eb;
    overflow-x: hidden;
    background-color: #0f1419;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* PREVENT SCROLL WHEN MODAL IS OPEN */
body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    touch-action: none !important;
}

/* Internship Container */
.internship-container {
    flex: 1 0 auto;
    width: 100%;
    margin: 80px auto 0;
}

/* Internship Card - ENSURE PROPER STACKING */
.internship-card {
    background: #1a1f2e;
    border-radius: 20px;
    padding: 45px 50px;
    margin-bottom: 35px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 45px;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: visible; /* CHANGED FROM hidden */
    z-index: 1;
}

.internship-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #667eea, #4a9eff);
    transform: scaleY(0);
    transition: transform 0.4s ease;
}

.internship-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(74, 158, 255, 0.3);
    border-color: rgba(74, 158, 255, 0.3);
}

.internship-card:hover::before {
    transform: scaleY(1);
}

/* Icon Section */
.internship-icon {
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #252b3d 0%, #1a1f2e 100%);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: all 0.4s ease;
    position: relative;
}

.internship-card:hover .internship-icon {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.4);
}

.internship-icon img,
.internship-icon svg {
    width: 75px;
    height: 75px;
    object-fit: contain;
}

/* Content Section */
.internship-content h2 {
    color: #e4e6eb;
    font-size: 1.85rem;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.internship-details {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    color: #b0b8c1;
    font-size: 0.95rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #252b3d;
    border-radius: 8px;
    transition: all 0.3s;
}

.detail-item:hover {
    background: #2d3548;
    transform: translateX(3px);
}

.detail-item svg {
    width: 20px;
    height: 20px;
    color: #4a9eff;
    flex-shrink: 0;
}

.detail-item span {
    font-weight: 500;
}

/* Apply Button - ENHANCED FOR MOBILE WITH FIXED Z-INDEX */
.apply-btn {
    background: linear-gradient(135deg, #4a9eff 0%, #3255f0 100%);
    color: #ffffff;
    padding: 16px 45px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    z-index: 100 !important; /* INCREASED Z-INDEX */
    pointer-events: auto !important; /* ENSURE CLICKABLE */
}

.apply-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    pointer-events: none;
}

.apply-btn:hover::before {
    left: 100%;
}

.apply-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(74, 158, 255, 0.5);
}

.apply-btn:active {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #3255f0 0%, #4a9eff 100%);
}

/* Details Modal Overlay - FIXED Z-INDEX */
.details-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.details-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Details Modal Container - FIXED Z-INDEX */
.details-modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, #1a1f2e 0%, #252b3d 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
}

.details-modal-container.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Custom Scrollbar */
.details-modal-container::-webkit-scrollbar {
    width: 8px;
}

.details-modal-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.details-modal-container::-webkit-scrollbar-thumb {
    background: rgba(74, 158, 255, 0.5);
    border-radius: 10px;
}

.details-modal-header {
    position: relative;
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.details-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(74, 158, 255, 0.3);
}

.details-modal-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.details-modal-header h2 {
    color: #ffffff;
    font-size: 1.8rem;
    margin: 0 0 10px 0;
}

.details-modal-body {
    padding: 30px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.detail-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(74, 158, 255, 0.3);
}

.detail-row.highlight {
    background: rgba(72, 187, 120, 0.1);
    border-color: rgba(72, 187, 120, 0.3);
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #a0aec0;
    font-weight: 500;
}

.detail-label svg {
    color: #4a9eff;
}

.detail-value {
    color: #ffffff;
    font-weight: 600;
}

.curriculum-section, .benefits-section, .requirements-section {
    margin-top: 25px;
    padding: 20px;
    background: rgba(74, 158, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(74, 158, 255, 0.2);
}

.curriculum-section {
    background: rgba(139, 92, 246, 0.05);
    border-color: rgba(139, 92, 246, 0.2);
}

.requirements-section {
    background: rgba(251, 191, 36, 0.05);
    border-color: rgba(251, 191, 36, 0.2);
}

.curriculum-section h3,
.benefits-section h3,
.requirements-section h3 {
    color: #4a9eff;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.curriculum-section h3 {
    color: #a78bfa;
}

.requirements-section h3 {
    color: #fbbf24;
}

.curriculum-section ul,
.benefits-section ul,
.requirements-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.curriculum-section li,
.benefits-section li,
.requirements-section li {
    color: #cbd5e0;
    padding: 8px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.proceed-btn {
    width: 100%;
    margin-top: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

.proceed-btn:hover {
    background: linear-gradient(135deg, #357abd 0%, #2563a8 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(74, 158, 255, 0.3);
}

.proceed-btn svg {
    width: 20px;
    height: 20px;
}

/* Application Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10002;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: block;
}

/* Application Modal Container */
.modal-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: #1a1f2e;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    z-index: 10003;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.modal-container.active {
    display: block;
}

/* Modal Header */
.modal-header {
    position: relative;
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #4a9eff 0%, #3255f0 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.modal-header h2 {
    font-size: 1.75rem;
    color: #e4e6eb;
    margin-bottom: 8px;
}

.modal-header p {
    color: #b0b8c1;
    font-size: 0.9rem;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: #252b3d;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 24px;
    color: #b0b8c1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    z-index: 10;
}

.close-modal:hover {
    background: #2d3548;
    transform: rotate(90deg);
    color: #e4e6eb;
}

/* Modal Body */
.modal-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e4e6eb;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: inherit;
    background: #252b3d;
    color: #e4e6eb;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    padding: 10px;
    cursor: pointer;
}

.file-input-wrapper input[type="file"]::file-selector-button {
    padding: 8px 16px;
    background: #252b3d;
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.2s ease;
    color: #e4e6eb;
}

.file-input-wrapper input[type="file"]::file-selector-button:hover {
    background: #2d3548;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4a9eff 0%, #3255f0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    margin-top: 10px;
    text-transform: uppercase;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.5);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Locked field styling */
.form-group input:disabled,
.form-group input:read-only,
.form-group select:disabled {
    background: #1a1f2e;
    color: #b0b8c1;
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.1);
}

/* Validation Styles */
.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: #ff6b6b;
}

.form-group input:valid:not(:placeholder-shown),
.form-group select:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: #51cf66;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Animation for cards on load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.internship-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.internship-card:nth-child(1) { animation-delay: 0.1s; }
.internship-card:nth-child(2) { animation-delay: 0.2s; }
.internship-card:nth-child(3) { animation-delay: 0.3s; }
.internship-card:nth-child(4) { animation-delay: 0.4s; }
.internship-card:nth-child(5) { animation-delay: 0.5s; }
.internship-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive */
@media (max-width: 1024px) {
    .internship-card {
        grid-template-columns: 110px 1fr;
        gap: 35px;
        padding: 40px;
    }

    .apply-btn {
        grid-column: 2;
        justify-self: end;
        width: auto;
    }
}

@media (max-width: 768px) {
    .internship-container {
        margin: 60px auto 0;
    }

    .internship-card {
        display: flex;
        flex-direction: column;
        padding: 35px 28px;
        text-align: center;
        gap: 25px;
        overflow: visible !important; /* ENSURE BUTTON IS ACCESSIBLE */
    }

    .internship-icon {
        margin: 0 auto;
        width: 95px;
        height: 95px;
    }

    .internship-icon img,
    .internship-icon svg {
        width: 65px;
        height: 65px;
    }

    .internship-content {
        order: 0;
    }

    .internship-content h2 {
        font-size: 1.6rem;
        margin-bottom: 18px;
    }

    .internship-details {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .detail-item {
        justify-content: center;
        padding: 10px 16px;
    }

    .apply-btn {
        width: 100%;
        order: 1;
        padding: 16px 35px; /* INCREASED PADDING */
        z-index: 100 !important;
        min-height: 50px; /* INCREASED TAP TARGET */
        font-size: 1rem;
        position: relative !important;
        display: block !important;
    }

    /* MOBILE MODAL FIXES */
    .details-modal-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 10000 !important; /* ENSURE ABOVE EVERYTHING */
    }

    .details-modal-container {
        width: 95vw !important;
        max-width: 95vw !important;
        max-height: 90vh !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        -webkit-overflow-scrolling: touch;
        z-index: 10001 !important; /* ENSURE ABOVE OVERLAY */
        overflow-y: auto !important;
    }

    .details-modal-container.active {
        transform: translate(-50%, -50%) scale(1) !important;
    }

    .modal-container {
        width: 95% !important;
        max-height: 85vh !important;
        z-index: 10003 !important;
    }

    .modal-overlay {
        z-index: 10002 !important;
    }

    .modal-header,
    .modal-body {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .details-modal-header {
        padding: 20px;
    }

    .details-modal-body {
        padding: 20px;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .detail-value {
        margin-left: 30px;
    }

    .curriculum-section, .benefits-section, .requirements-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .internship-card {
        padding: 28px 20px;
    }

    .internship-content h2 {
        font-size: 1.4rem;
    }

    .internship-details {
        font-size: 0.9rem;
    }

    .detail-item {
        padding: 8px 14px;
    }

    .apply-btn {
        padding: 15px 30px;
        font-size: 0.95rem;
        letter-spacing: 1.2px;
        min-height: 48px; /* MINIMUM TAP TARGET SIZE */
    }
}